* Add release scripts
* Use `delete` over `gsub` with an empty string
Co-authored-by: Michael Kohl <citizen428@dev.to>
* wip
* wip
* Include stable release-channel branches in builds
* Add changelog stub
* Include the union of changes to the changelog
* Add things
* Add stuff
* Remove test changelog content
* Fix String#delete call
Extraneous `.` made Ruby parse it as a range
* Fix suggested release command
* Use backticks to denote a command to run
* Add debugging output to script
* Build more appropriate containers for stable
This includes tags
* Check if branch *starts with* release channel name
* Cache tag builds from production tag
* Skip trying to build containers for untagged pushes
* Clear out stubbed changelog
* Update PR template to incorporate CHANGELOG.md
* Run Rubocop on release scripts
This excludes some linter rules that only make sense in code that is
running as part of the Rails app. For example, we can't rely on
`ActiveSupport::TimeWithZone` because these scripts don't load Rails,
and we define top-level methods because they're scripts rather than
complex applications.
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Tests are failing to find header:nth-child(1)
Not sure why this did not fail in the branch - but the merge build
failed
Use 'div > header' (shudder), replacing the prior 'main > header'
selection, and avoiding the nth-child pseudoclass selector, to find
the "header" in the dashboard body containing the summary statistics.
This avoids the conflict with the top header (forem logo, search,
dropdowns) from the body/summary header (post views, credits
available, etc).
* Specify which div we want to look at
* change dashboard landmark nesting
* switch to main db/schema.rb
* remove unnecessary div
* revert scema.rb to main
* fix user_visits_dashboard test
* change aside to nav, put nav back into main-content
* remove unnecessary file
* remove duplicate nav
* add id to main
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* create new pack, handle user follow buttons, use pack on article page, remove initializeUserFollowButts
* init all follow button types, add pack to tag index and podcast episode pages
* add pack to all relevant pages, listen for newly inserted follow buttons
* change to searchParams to remove follow button initializer calls
* fix bug with tag page, add pack to notifications page
* fix issue with follow back inner text
* update cypress specs
* run the followbuttons code on sponsors page
* remove extra foreach
* add test for follow from article sidebar
* add test for follow and unfollow tag
* add test for the tag index page
* add spec for organisation profile follow
* add tests for follow buttons in search results
* add tests for notification follows
* commit missed file - woops
* show login modal if user is logged out when they click
* add cypress tests for logged out state
* change tag button initialization
* remove data-button-initialized
* init follow buttons from base pack
* handle the case where multiple follow buttons exist on a page for the same user
* account for instantclick and userdata not being defined, lower coverage for jest
* use getInstantClick
* fix issue with set initialisation
* only listen for mutations in areas we know follow buttons may be added dynamically
* small refactors
* schema file undelete description
* update with main
* update with origin
* add sections in Admin
* Add "Section" radio btns to New-Link form
* Ensure links created in correct section
* Ensure links created in correct section pt2
* fix styling in admin
* complete section split on frontend
* start on specs
* complete specs
* remove unnecessary Cypress test file
* address all a11y comments in PR review
* fix broken specs due to a11y changes
* Show the navigation options regardless of screen size
* Add link back to forem homepage for small screens
* Fix link URL + add small padding
* Remove padding class
* Add additional test cases to the DUS
And then handle them.
* rubocop changes
Keep let blocks together
prefer blank? to ! + present?
* Test copied script as well
Since the file was fixed, then copied - we want to test the copy that
will actually run (these _should_ be idempotent and running both back
to back will cause no harm).
* Validate website_url profile field is a url
related to issue #14300
May need a data update script to (fixup? remove?) invalid profiles
since not being able to save existing profiles will cause problems.
* Check that URI is a valid url
Require the scheme to be one of https or http, not something like
mailto:// or telnet:// (nobody would do that, but don't try and link
to it if they did).
* Rubocop fixup for validation rule
URI::regexp is obsolete and should not be used. Instead, use URI::DEFAULT_PARSER.make_regexp
Prefer %w[] literals for arrays of words
Prefer the new style validations `validates :column, format: value` to validates_format_of
* Permit empty website_url fields
The previous validation was rejecting nil, which was the default. This
caused a lot of user factory calls to fail (since users didn't need
website urls in the profiles during testing unless the test was about
the website url link).
* Use :url validation as suggested
* Update validation error message
The validate_url gem gives a more complete error message to the
user. Update the spec to expect this.
* Use url_field rather than text_field in profile form
https://apidock.com/rails/v6.1.3.1/ActionView/Helpers/FormHelper/url_field
* Add data update to either fixup or clear invalid website urls
Checking blazer there are about 2600 profiles with "invalid" website
urls, typically a hostname, sometimes a hostname + path component,
which should be fixed up.
Naively add https:// to the front of the url, check that a valid
scheme and host are present on the resulting url, and save.
If an invalid url is generated (specifically, if host or scheme are
nil), just set the website url (with the invalid link) to an empty
string.
It's possible we'd want to notify users affected by this, that was not
included in this pass.
* Skip validations for intentionally invalid test cases
* Add tests and Railsify a few things
* Adds JSON representation of ProfilePreviewCardsController
* Load profile and setting eagerly
* Add profile preview card color