* Some div soup to semantic markup.
* Small refactor to inline mapping of available tags.
* Renamed <ItemListTags /> component to <TagList />.
* Now a select is used for picking a tag to filter on.
* Added custom Cypress command to create an article.
* Added documentation for the create article custom command.
* Removed unnecesary properties from payload to create an article.
* reading list mobile view wip.
* Reworked styles in <TagList />.
* Reworked reading list to use <MediaQuery /> component.
* Removed bottom padding from reading list header.
* styling tweaks if there are no available tags.
* Added some E2E tests.
* Removed reading list component test in favour of e2e test.
* Made breakpoint values numbers.
* Added some padding and more grid gap to filter on small screens.
* Adjusted jest coverage thresholds as we're moving some tests to e2e tests.
* Reverting a VS Code setting change caused by one of my extensions.
* First pass for E2E tests for the reading list.
* Added some more grid gap.
* Fixed load next page to send tags properly.
* Added some more tests.
* Improved label and placeholder for text filter in reading list.
* Added more tests
* Fixed media queries so it works in Chrome as well.
* Removed aside as tag filters are not complimentary information.
* Update app/javascript/readingList/components/TagList.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update docs/tests/e2e-tests.md
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Turned off deprecated rule in jsx-a11y eslint plugin.
* Reverted to links instead of radio buttons.
* Added an all tags link and select option.
* Fixed relayout issue.
* Fixed View Archive button size.
* Fixed styling of the load more button.
* Fixed empty list issue toggling between archive and reading list.
* Fixed request changes from PR review.
* Removed CSS change that is no longer required.
* Trigger Build
* Fixed centering of items in top fieldset.
* Fixed issue with search text field resetting reading list.
* Fixed component tests for the reading list.
* Fixed empty state popping up between search queries.
* Fixed casing of fixture filenames.
* Update app/javascript/readingList/readingList.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Reverted change in reading list component test.
* Added missing JSDoc comment.
* Now links are in an unordered list.
* Promoted some CSS classes from the <nav /> to the <ul /> for spacing.
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Make test fail again
Minimal reproduction via `rspec
spec/system/user/trusted_user_flags_user_spec.rb --order=random
--seed=9374` which runs in this order:
- when signed in as a trusted user
- when not logged in
- when signed in as the non-trusted user
- when signed in as the user
Because "not logged in" immediately precedes "non-trusted user" in this
order, the browser store cache is cleared and there is no user. Since
there's no user, the flag is not removed.
* Wait for current user promise before processing current user
* Extract button callback registration to function
This addresses a code climate concern (function exceeded 50 lines) by
extracting the button behavior to a function of (button, id, name),
and calls that within the exported initFlag function.
* Prefer request to fetch
Addresses feedback to use @utilities/http's request method in place
of fetch (which automatically adds the needed csrf headers)
* Reorder imports
Satisfies code climate report that imports are out of order
* Add honeybadger notify to error handling
Do more than just notify that something went wrong. Notify honeybadger
on failure to flag/unflag a user.
* Remove temp variable
This makes the notify code look more like the suggestion
* Reduce function arglist
Since the user id and name are properties of the flagButton's dataset,
we can efficiently extract them from the flagButton.
Only pull user id from dataset to check if current user = profile
user, and extract id and name from dataset after passing the
flagButton.
* reorder imports
Not sure how I managed to reverse this in 18aeb675b but here we go again
* Test button behavior
The original tests only asserted that the link to reactions was
present and labeled correctly. Add additional check that we can use
the button and that the label toggling occurs (this adds a request to
the test case, but adds a test for user facing behavior).
* Tame eslint check
I was getting conflicting feedback on import ordering from code
climate and eslint. Since telling eslint to ignore its rules was
immediately clear to me (there's an example on the line before this)
that's the direction I headed, but I can revisit if it matters
https://github.com/forem/forem/pull/13279#issuecomment-814411401
captures the conflict (code climate wants @utilities/http first,
eslint wants ../chat/util first, one or the other fails regardless of
the ordering.
* Use multiple rules in one ignore comment
https://eslint.org/docs/user-guide/configuring/rules#disabling-rules
supports multiple warnings separated by commas
* Remove stray comment
* Move documentation comment to the code it describes
* Replace invalid name
I had copied from the suggested code snippet the
userData.profileUserID name, but userData in this context is a global
function, and `profileUserId` (capitalization) is the bound variable
in this context.
Fix it before we throw an error trying to report an error (ironically,
before the window alert telling the user an error occurred, I think
this would have been visible only in console).
* Actually call the remove button function
* Move authors followers out of Notifications::NotifiableAction::Send and into Article model
* Rename authors_followers to followers
* Update followers method in service, oops
* Update app/services/notifications/notifiable_action/send.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Move to crayons-tabs
* Update js logic to use crayon-tabs
* Remove toggle and add tab
The added code moved the tabs to the right hand side of the container (until mobile styles kick in then it will fill the container).
* make clean_fork executable
* fix attribute className not in a JSX context
* delete useless role main on main tag
* delete useless role banner on header
* Remove search from connect
* Remove alternate approach
* Alphabetize CHAT_CHANNEL_PARAMS
* Remove default value for user_ids
* Add spec for result ordering
* First set of changes for Ahoy 2.0
* Fix line length
* Change test
* Remove unused test
* Remove ahoy_messages.opened_at
* Simply digest email sending calculation to not rely on last_opened
* Remove outdated comment
* Fix typo in test
* Rework site config email digest to a single value
* Fix merge duplication
* Remove UTM references from ahoy emails
* Fix credits tests
* Remove UTM from expected email params
* Rename banned and comment_banned roles
* Add data update script to rename roles containing 'ban'
* Add named error for Suspended users
* Update unidiomatic method names
* Rename misc banned to suspended
* Apply suggestions from code review
Co-authored-by: Michael Kohl <me@citizen428.net>
* Add unit tests for suspended methods
This commit also adds TODO comments for removing banned and
comment_banned from the codebase after data update scripts have
successfully run on all of our Forems.
Co-authored-by: Michael Kohl <me@citizen428.net>
Since we've removed Buffer related algorithm, posts aren't automatically featured
anymore, leaving the RSS feed pretty empty. The default view should also include
those posts, above a minimum score, that are not featured.
* Limit mentions in articles
* Bump MAX_USER_MENTION_LIVE_AT to April 7th, 2021 UTC time
* Use stubbed constants in article and comment specs
* Add TODOs around extracting MAX_USER_MENTIONS into constant
We started seeing buildkite failures building after the rails 6.1
upgrade
While the bundler version probably isn't important by itself,
changing the containerfile invalidates any cached layers used to speed
up the build.