* Create showModalAfterError function
* Show modal when comments rate limit is reached
* Show modal when article reaction rate limit is reached
* Show modal when follow user rate limit is reached
* Show form error when listing creation rate limit is reached
* Show form error when feedback messages rate limit is reached
* Rename functions for listings rate limit checks
* Show modal when notifications reaction rate limit is reached
* Show modal when picture upload rate limit reached
* Show modal for reactable objects when rate limit reached
* Add and modify tests
* empty commit
* Match modal messages to tests
* Fix error updating Modals
Co-authored-by: Dan Uber <dan@forem.com>
* added aria-pressed value to all follow_buttons
* added check to remove aria pressed attribute and added cypress tests
* removed unfollow aria-label setting and cypress test fixes
* fixed cypress failing tests
* failing cypress test fix
* added steps to check correct states are loaded when page refreshed
* refreshed alias after page reload
* Add internal top tags API
* Add rules_html to tag API
* Move tags autocomplete to custom route
* Simplify spec
* Change route from autocomplete to suggest
* Update pin post button to be an admin articles button instead
* Rename file since we don't pin posts on show page
* Don't use instant click for admin link
* Update tests to visit the article from the start
All providers except apple use a common key/secret form partial, but
the apple authentication section uses client_id, key_id, pem, and
team_id.
Assuming all four of these are required, when the enabled provider
name is 'apple', check for those values. For other providers (github,
facebook, etc) only check secret and key as before.
* Start cleaning up feed code
* Move published_articles_by_tag to service
* Add timeframe and latest feed services
* fixup! Move published_articles_by_tag to service
* Move constant to correct location
* Fix spec
* sliding tabs
* Add aria-label to the navigation
This supports the cypress tests, as well as retaining existing accessibility features.
* Adapt feedNavigation cypress test to handle new navigation layout
Before looking for week, month, year, or infinity top feeds, select
"Top" and wait for the page refresh.
* increasing tappable area + making foucs outline visible
Co-authored-by: Dan Uber <dan@forem.com>
* Since we're pasting a multi-line key, use a textarea for apple_pem
* Update app/views/admin/settings/forms/authentication/_apple_auth_provider_settings.html.erb
set style on pem input to show expected input size.
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* schema file undelete description
* update with main
* update with origin
* update
* create controller; hook up to badge_achievements
* almost done with implementation
* push up what I have
* complete implementation; generalize snackbar usage
* start writing tests
* add confirmation text entry step to test
* Fix delete via JS
* implement danger notice for errors
* complete cypress test
* create ErrorAlert CustomEvent and implement
* fix failing badge_achievements spec
* start applying PR review changes
* hook up Preact Modal
* fix cypress tests
* remove old comment
Co-authored-by: Nick Taylor <nick@forem.com>
* consolidate messaging functions
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: Nick Taylor <nick@forem.com>
* Use regex to replace with https
* Refactor a bit
* Update logic to handle edge cases
* url being nil
* url not a valid URL (weak validation, checks for starting
string of http)
* Add new test case for http to https conversion
* Relax tag validation restriction to permit alphanumeric strings
Non-word symbols like musical notes are still blocked, but most
languages should work.
* Handle redirect after tag edit
The URI.parse(tag.name) was not updated in #13720
Move reused logic into tag_path method in URL module.
* FactoryBot generated tags are non-ascii
This should help expose any cases where we're mistakenly counting on
ascii-only content in tags by causing all generated tags without a
specified name to be of the form `tag你好#{n}` instead of `tag#{n}`.
* Revert "FactoryBot generated tags are non-ascii"
This reverts commit ed1035cd1e91619b2c1599e521b6ddf962c97f80.
It was useful to see how many places the path knowledge is in the
tests (a lot of requests have GET /t/tag.name and need to have GET
URL.tag_path instead).
https://app.travis-ci.com/github/forem/forem/builds/237542600 has the
results.
Reverting because those test-side changes seem like a secondary
concern to the change in this PR (I'll file a follow on issue)
* When an api key was not set - handle gibbon error as mailchimp error
see https://app.honeybadger.io/projects/72638/faults/73753178
It's possible the right answer is instead to either (1) not make the
call at all (2) not log as a mailchimp error but treat distinctly
* Only report error if GibbonError, don't attempt to resubscribe
Separate the rescue blocks since resubscribing doesn't make sense if
we're handling a gibbon error rather than a mailchimp error
* Add test for gibbon error being raised (and rescued)
Copied the existing test specifying that resubscribe is attempted on a
raised mailchimp error.
* Remove irrelevant resubscribe check - assert error is handled only
* Add feature flag for connect
* Start using Connect feature flag
* Add feature flag check to plaintext mailers
* Minor fixes/formatting issues
* Fix typo
* Enable Connect feature flag for tests
* Fix feature flag in tests
* Update rails_helper
* Fix typo
* (╯°□°)╯︵ ┻━┻
* One more try
* connect announcement
* Use connect feature flag in admin and admin routes
* Add aria-live attribute to announcement
* Undo schema.rb changes
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
* In dashboard show api eager load collection with articles
* Dashboard Article Row view now loads collection to suppress bullet warning of eager loading
* enable debug for warnings in dev env
* remove preact/devtools call no longer needed
* fix majority of proptype errors on home page
* sweep up proptype errors from listings page
* fix article form error
ActiveRecord already implements this at the model level and also makes
use of the ActiveRecord schema cache. `Database.table_available?` did
not use this query cache and ended up sending *all* of those queries to
Postgres every single time.