* show the pills
* clicking pills removes filter
* add some more spacing
* another alignment tweak
* add cypress spec
* put it behind the feature flag
* make the clear all link a button for consistency
* tweak to comment for clarity
* prevent ID conflicts in filters modal by caching content
* show roles with expandable section
* minor tweak
* don't use the hidden field
* send array of role
* role -> roles. small refactor
* set initial checked status
* show an indicator when a filter is applied
* add JS to toggle filter clear buttons and indicators
* update some comments, make sure users only appear once in list
* add some cypress specs, fix some bugs
* Adds the Assign Role modal to the Member Index View
* Adds e2e tests for the Assign role modal
* WIP: Conditionally redirects to the correct view upon assigning a role
* Conditionally renders the redirect in the correct method :|
* Adjusts the conditional redirect to account for ID
* Adds an even more explicit check for the correct refferer
* Add utils for preset date ranges
* show the preset options in the calendar
* allow ranges to be selected in storybook
* add some more docs
* add missing prop type
* add tests
* move story out of beta
* fix last time periods
* small refactors
* refactor(listings-dashboard): migrates comp to pure comp
* refactor(listing-dashboard): organizes data setup for tests
* refactor(listing-dashboard): uses func to setup tests and starts using screen
* test(listing-dashboard): refactors tests using role query and expects
* test(listing-dashboard): separate first listing tests into another description block
* test(listing-dashboard): separate second listing tests into another description block
* test(listing-dashboard): separate third listing tests into another description block
* feat: create a crayons component called MultiInput that appears under App Components/MultiInput
* feat: add the doc describing the components to storybook
* feat: create the component ina different file and reference its usage from the stories
* feat: add a random class to hook up a stylesheet to the component
* lets just copy soem HTML
* chore: remove arias that will not be used for the multiinput
* feat: update the classnames and remove unneeded html
* feat: multi input css updates
* feat: add the ability to set the list of emails using state
* feat: add the ability to clear the input selection
* feat: remove item
* feat: handle key events like space, comma and enter in the input
* refactor: clean up code a bit
* refactor: rename email to item
* fix: remove space keydown as its causing weird behaviour
* refactor: remove unused css now that we using pills
* feat: ensure that we do not add blank pills
* feat: add the component to BETA
* feat: rename addToList to addItemToList to be more verbose
* feat: add the first component prop i.e. placeholder
* feat: add a more descriptive text
* feat: add a padding to the field
* remove unused arial labels, and erword soem descriptions
* feat: add imports to scss
* Update app/javascript/crayons/MultiInput/MultiInput.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/javascript/crayons/MultiInput/MultiInput.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/javascript/crayons/MultiInput/__stories__/MultiInput.mdx
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Add tooltip for cover image button
* Add cover img tooltip to v1 editor
* Use a slightly different message
* Fix tests
* Use proper comment syntax for front matter
* Fix Cypress test
* Use regex to find matching label
* target modal content by a classname to avoid duplicate IDs
* woops - fix missed selector
* use showWindowModal in editUser
* move add org to a partial
* move add role into a partial
* move adjust credits to a partial
* move profile modals to be re-used
* generalise approach to add organisation modal
* generalise add role modal form
* generalise adjust credits modal
* rework unpublish modal
* refactor banish user modal
* refactors
* prevent issues with duplicate ids
* fix banish form action
* make sure role management specs covered in cypress
* let hidden modal content use IDs
* rename file for clarity
* add some JSDoc notes
* cleanup some redundant changes
* one more
* woops - fixed id that contained a classname
* WIP initial component/story
* examples of customisation
* populate the month year pickers
* change the calendar view when the month or year is chosen
* fix which dates should be disabled
* style left right nav buttons
* add calendar icon, fix some date range styles
* extract some color variables
* some minor changes to styles and comments
* add phrases, allow all dates to be toggled in story
* consolidate styles
* conditional navigation given max and min dates
* labels on selects, tweaks to story
* undo unrelated changes from merge
* undo unrelated changes from merge
* undo unrelated changes from merge
* undo unrelated changes from merge
* retry adding dependencies, not feeling hopeful XD
* is this a preact issue?
* Revert "is this a preact issue?"
This reverts commit 5f3f720f8e739cc3dcca7fd54f8d97e08d8bb88c.
* without css import
* import styles via sass file, not component
* Apply suggestions from code review
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* make feed image consistent with cover image
* small tweaks for the logged out view of the feed cover image`
* update feed cover image for logged in users
* update to reflect new cover image
* reverting to see if the build, builds?
* snapshot tests
* update spec to look for the right class
* too long by ONE character 121/120 🙄
* Update app/javascript/articles/components/ArticleCoverImage.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/articles/_single_story.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/articles/_single_story.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* no need for the anchor tag to have a bg color
* update snapshot test expectations
* remove unnecessary span with hidden class
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
The [`ArticlePolicy#moderate?`][1] method answers the questions around article
moderation.
At present this change does not introduce any significant changes (aside
from the JS logic loop). The next "step" is to adjust the
`ArticlePolicy#moderate?` method to test if the user has a moderator
role.
Further, we'd need to see what is available on the action panel.
Related to forem/forem#17606
[1]:5ac3216a5a/app/policies/article_policy.rb (L160-L174)
* test(cover-image): uses correct queries for ui unit tests
* test(form): replaces queries to getByRole and adds expect where necessary
* feat(help): adds expect assert and uses within to test inside specific block
* feat(image-uploader): uses correct queries to validate behaviour
* test: corrects queries and adds expect assertions to some unit tests
* update Modal to add sheet variant
* dont use prompt title for modal sheet stories, to better reflect intended purpose
* Apply suggestions from code review
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>