* Basics might be working?
* Stop propagating button clicks in autocomplete pills
* Better blank slate
* Better location to stop propagation
* Remove author_id from org co-authors
* Move UserStore and try testing it
* Remove extraneous comments
* OH... that's what that does!
* Very basic testing
* Re-organize javascripts
* Rename & re-org for testing
* Cleanup
* More tests
* Remove unnecessary nesting
* Coninuing to try to bump coverage
* Include /packs/ in code coverage metric
* Try tweaking jest coverage more?
We probably can't collect coverage from all of packs/* (because coverage is too low) but maybe we can try to opt-in for newer areas as we go?
* Relocate JS tests, for build & coverage
* User ID exception on search, not fetch
* Remove commented-out console.log
---------
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* WIP: add the validation
* feat/WIP: set the color of the button to red
* feat: change color temporarily
* feat: add accessibility for validation
* feat: add the styling changes for the multi input
* feat: add focus visible styling as well
* fix: add comma to scss file to separate attributes
* chore: rename regex to inputRegex
* refactor: move out validation into a function
* chore: rename regex to inputRegex
* feat: add a validation Regex as a prop
* feat: update the text description
* chore: update spelling oops
* feat: remove comment
* remove comments
* rename error
* feat: add showLabel and labelText to the stories component
* cater for when we don't pass in a validationRegex
* some small tweaks
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* add the date picker into view
* allow date picker to overflow modal
* allow aria labels to be passed to inputs
* filter records
* add missing comment
* set earliest date
* specs and a small fix
* cypress spec
* fix typo
* tidying up
* fetch date_format
* commit code review suggestion to params
* Revert "commit code review suggestion to params"
This reverts commit 84fb0e0d3acc13257a362eb41c17b2bb8089606a.
* show added filter pill
* add cypress specs for applied filters
* woops! fix unintended change to filter code
* show the toolbar (WIP - includes some hacks and todos)
* allow calling component to pass additional toolbar elements
* add templates behaviour
* get templates working
* tweaks following mention autocomplete refactor
* remove image upload handler no longer needed
* rename method
* some small refactors
* only comment text area controls visibility of templates area
* fix error in role name
* fix mobile view
* update specs
* WIP: new autocomplete, search executed, dropdown positioned
* WIP: most features working in Editor
* handle textarea blur
* fix bug with id not attached to textarea
* updates to textAreaUtils tests
* aria live, fix border style
* replace comment text area
* fix some height and style issues
* update preact tests
* clean up styles, rename files, use portal for popover
* clean up styles, rename files, use portal for popover
* scroll popover items into view if necessary
* refactor cypress specs
* actually remove the package
* add some more specs
* remove storybook stories for now
* remove relative class causing issues
* small fixes for cypress specs
* make live region assertive to ensure change to combobox is known
* some comments
* add a storybook story
* replace % font size, add explainer to story
* refactor: use the DefaultSelectionTemplate to list out the items
* refactor: rename function so that we map it to the deselect item event
* feat: first pass of adding edit functionality
* feat: update the name of the function from clearSelection to clearInput
* feat: setup the edit state by ensuring that we set the editValue and the inputPosition and then use useEffect to monitor changes
* chore: remove the old method in favour of a shared component
* feat: set the order of the items
* refactor: rename handleBlur function name to handleInputBlur
* feat: ensure that the edit field gets resized according to its current input
* feat: oops add inputSizerRef
* feat: when an item is being edited we need to ensure that it gets set back into the correct position and that we clear the previous state
* feat: handle the actual resizing fo the field on an input edit
* feat: use a shared DefaultSelectionTemplate for both the multiautocomplete and the multiinput component
* feat: make the defaultSelectionTemplate customizable based on the variant adn the classname
* feat: pressing backspace will start editing a previous selection if there is one
* feat: read out the selected items as its removed or edited
* feat: pass the regex through as a prop
* feat: move the functions around
* feat: add screen-reader only class
* Update app/javascript/crayons/MultiInput/__stories__/MultiInput.stories.jsx
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Update app/javascript/crayons/MultiInput/MultiInput.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* feat: add the props to JSDoc
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* 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
* 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>
* 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>
* 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>
* add runtime utilities in webpack land, refactor webpack JS using old class
* access Runtime in legacy JS code via window.Forem namespace
* refactor
* make sure data-runtime added only after page does initial load
* Re-enable imageUpload native integration
* remove temporary inline comments
* move addEventListener to useEffect hook
* console.log on native messages from image upload integration
* Debug suggestions
* store text area in ref rather than state
* call error callback from native message handler
* Remove debug logs
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* add default placeholder, remove focus on first load
* fix some bugs re autofocus and mouse click to select
* allow custom selected styles to be passed in
* operate on objects with name property rather than plain strings
* WIP main functionality in place
* set default selections, allow a max to be placed on selections
* switch help context
* bug fixes to edit mode, static suggestions
* make sure suggestion resumes when edit begins
* cleanup and docs
* update existing form test
* add component tests
* add more component test cases
* refactor max selections flow, ensure default tag data only loads once
* stop removing combobox properties now the input stays visible
* add max selections test
* refactor
* make sure input refocus happens after blur event
* update cypress tests
* some small renames and doc changes
* only fetch exact matches from added tags
* fix test, update dark theme background
* set a max height on the popover, and ensure options can be scrolled into view
* woops - max height
* Update app/javascript/article-form/components/TagsField.jsx
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* refactors
* stop dropdown from flickering
* use ButtonNew
* remove redundant variant
* nudge PR checks
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* updates
* updating doc
* Fixed broken documentation in Storybook stories.
* bring back a element
* md --> mdx
* c-* doc update
Co-authored-by: Nick Taylor <nick@dev.to>