* WIP - basic init of comment dropdowns with open and close on click
* WIP - initialize the share dropdown
* initialize all post dropdowns within packs, init copy to clipboard announcer
* refactor and add JSDocs to helper
* undo changes to base jsx
* update accessible name of post actions button in cypress test
* make sure dropdowns pack loaded on comment index page
* undo prettier changes in base jsx
* undo prettier changes in base jsx
* initialize comment dropdowns in podcasts
* add test for the post actions
* add article comment tests
* add cypress tests for comment dropdowns
* Rename SiteConfig
* More renaming
* Update spec
* Update mandatory settings mapping
* More renaming
* e2e test fixes
* You have a rename, and you have a rename
* Spec fix
* More changes
* Temporarily disable specs
* After-merge update
* Undo rename for migration
* undo rename of DUS
* Fix DUS
* Fix merge problem
* Remove redundant DUS
* Fix specs
* Remove unused code
* Change wrong class name
* More cleanup
* Re-add missing values to constant
* Fix constant
* Fix spec
* Remove obsolete fields
* Add accidentally removed field
* Update spec
* Move methods from Settings::General to ForemInstance
* Remove unneeded model
* Change mentions of 'site config'
* Adds error handling to clipboard promise - post editor
* Adds a reload when rendering the Editor to get missing navigator.clipboard
* Remove reload logic from Post Editor
* Adds Honeybadger notify on error handling
* update storybook example and docs
* update desktop home feed tabs with a11y enhancements
* update storybook to reflect buttons usage, update post editor buttons
* update admin html variants tabs
* update admin sponsorships tabs
* re-add flex to the crayons-tab class to prevent regression in tab components not updated
* Revert "update admin sponsorships tabs"
This reverts commit d9e4a5e4b0d362e38a11c795b35ceb4442bc4d90.
* Revert "update admin html variants tabs"
This reverts commit 3d9f119e88dc2f2f102d664c57a1f56413490a36.
* update search tabs
* update v2 form erb html
* update tag index tabs
* update notifications tabs
* label the notifications nav
* update mod sidebar tabs
* update main analytics page tabs
* add cypress tests for home feed tabs
* add tab tests for the post editor
* add cypress tests for tags index navigation
* fix UI issue with search tabs, add search cypress tests
* add tests for the analytics dashboard tabs
* add mod nav tests
* add notifications navigation tests
* get new handles after view switch
* replace hardcoded mod paths
* apply review suggestions
* Refactoring Help component
* Fixing typo
* Adding missing prop types
* Removing setCommonProps
* Moving show to parent component
* Renaming Format component
* Converting help component to functional component
* Removing html from state
* Fixing modal toggle and eslint errors
* Adding arria hidden
* Using optional chaining
* Fixing variable names
* Renaming state variable
* Adding jsdoc
Co-authored-by: Nick Taylor <nick@dev.to>
* add prefer object destructuring lint rule
* fix typo
* sweep up lint errors missed in config controller
* Revert "fix typo"
This reverts commit 44f9d57e3f0dc4007ab9020c8c659c2f770230c2.
* Revert "sweep up lint errors missed in config controller"
This reverts commit 3f8d5d782fe110607c2172b713c74c08c883eda3.
* make this a warning rather than error for now
* undo auto change
* add modal code to Forem namespace, use showModal in the rate limit modal generator
* add cypress tests for both modals
* styling tweaks
* tidy up
* make sure modal trap selector is unique to page, update Modal JSDoc
* add additional jest test for focusTrapSelector
* feat: add the collapse style css + a script for the intercepting the bootstrap event
* chore: remove old code
* Add some guards for missing elements and simplify show/hide collapse interaction
* Update app/assets/stylesheets/admin.scss
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: rhymes <rhymes@hey.com>
* fix: remove hardcoded paths
* fix: use path helpers
* swap href for link_to
* feat: use path helpers
* feat: use a data path to send through the path that we will be calling
* feat: pass route through to js
* dus index path
* chore: change to use path_helpers
* feat: update DUS controller
* chore: oops remove these paths
* Fix bug when responding to listings
Sending a message to a listing author works about half the time. I
can't determine exactly what user behavior causes it to fail or succeed,
but after making this change it doesn't fail anymore. Looking at the
code, I'm not sure how it ever works...
* Notify Honeybadger when listing responses fail
* Add E2E test for contacting through listings
* Update e2e test
* Small UI refactor that makes the stats page resonsive (to some degree)
* Add import to scss file
* Whoops
* Implement feedback from review
* Extract flex value into variable
* Update app/javascript/analytics/dashboard.js
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Navigate back to dashboard instead of article.path
* Set mainImage to null to remove image properly
* Use dashboard_path over string path
Co-authored-by: Michael Kohl <me@citizen428.net>
* Handle apostrophe edge cases
* Allow main image to be set
* Add new test for removing article cover img
* Use potentially less flaky find
* Use findByAltText instead of get
Co-authored-by: Michael Kohl <me@citizen428.net>
* 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 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).
* Remove search from connect
* Remove alternate approach
* Alphabetize CHAT_CHANNEL_PARAMS
* Remove default value for user_ids
* Add spec for result ordering
* Add flag link to profile dropdown view
* Add JS for flag button on profile
* Only show flag button to trusted users
* Quick fix for accidental unflagging
This will be more properly addressed in a future refactoring.
* Update reaction specs
* Update spec
* Make flagging togglable
* Make CodeClimate happy
* Revert accidentally changed file
* CodeClimate
* Update app/javascript/profileDropdown/flagButton.js
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Add JSDoc
* Remove second popup
* Refactor and add system spec
* CodeClimate
* Change send to public_send
* Address PR feedback by @aitchiss
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* WIP - initial exploration into post mentioon autocomplete
* replace the autosize textarea with mention autocomplete, adjusting height
* add cypress tests for mentioning in a post
* fix resizing of text areas
* refactor text area resize hook
* refactoring
* update cypress tests
* remove mergeRefs from utils, extract UserListItemContent
* allow useTextAreaAutoResize elements to have height greater than minimum, apply styles to container
* Trigger Travis CI
* Travis plz
* small refactors
* add comments and constants as per PR feedback
Co-authored-by: Nick Taylor <nick@dev.to>
* Remove pro role on user, expose pro dashboard to all users as analytics
* Remove pro from Elasticsearch mappings
* Update user role docs to use :trusted over :pro
* Remove pro from Role model spec
* Remove more references to pro, as noted by @rhymes