* 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
* feat: add the nested sidebar with some elements
* feat: create a tabbed nav item menu
* feat: add the tabbed nav_item partial to the views that need tabbed nav items
* fix: change variable back
* feat: style the sidebar a bit more
* chore: add some more styles
* feat: add a spec for the nested navigational items
* refactor: a more dynamic tabbed admin helper
* feat: add some more nav items
* fix: controller for reports
* refactor: shorthand if statement
* chore: add the whitespace back
* refactor: rubocop fixes
* chore: use any
* chore: remove whitespace
* refactor: rename the variable
* refactor: use a DSL style admin helper
* chore: variable renaming and routes
* rubocop: fixes
* refactor: move files to more apt places
* chore: keep overview as it was previously
* Update app/views/admin/secrets/index.html.erb
Co-authored-by: Michael Kohl <me@citizen428.net>
* Update app/views/admin/shared/_tabbed_navbar.erb
Co-authored-by: Michael Kohl <me@citizen428.net>
* Update app/views/admin/badges/index.html.erb
Co-authored-by: Michael Kohl <me@citizen428.net>
* chore: disable blocklength
* refactor: move the logic to the model instead of in the view
* chore: remove get_ prefix
* chore: move the request mangling to a helper that finds the controller and scope
* Update app/helpers/admin_helper.rb
Co-authored-by: rhymes <rhymes@hey.com>
* Update app/helpers/admin_helper.rb
Co-authored-by: rhymes <rhymes@hey.com>
* refactor: Address feedback
* oops
* oops use tr
* feat: update specs
* feat: make the navbar a dropdown
* feat: add a cursor pointer to the dropdown
* feat: add the icons which results in changed data structure
* fix: badge achievements
* feat: rename to an html file, show and collapse links + show active links
* chore: rename tabbed view to an html file
* fix: scope should be apps not app
* feat: add icons for the admin menu
* feat: increase the margin left
* feat: move the overview into the feature flag block and add an icon
* chore:remove files
* chore: indent
* feat: update crayons -link to have no text-decoration
* feat: current link for a scope with one controller
* Update app/lib/menu.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* Update app/models/admin_menu.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* refactor: we added svg to the builder so remove it from creating the hash
* feat: undo change to crayons and add it to the admin stylesheet
* Update app/views/admin/shared/_nested_sidebar.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* refactor: change to use ul and li's + a button
* chore: add bracket to next line
* feat: add aria-page
* chore: remove brackets
* feat: added focus specifically for the sidebar
* Update app/views/admin/shared/_nested_sidebar.html.erb
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
* chore: remove additional title
* chore: indent
* feat: add a visibilee keyword to the payload and set it to true by default
* feat: move the feature flagged routes into the correct sections
* feat: check if an item is visible before rendering it
* feat: amend the tabbed_navbar to be more accessible and add in visibilty checks
* chore: update comment
* chore: amend the styles
* chore: change url to path
* chore: comment
* test: add more tests
* Update app/assets/stylesheets/admin.scss
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/admin/shared/_nested_sidebar.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/layouts/admin.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* chore: merge
* feat: use focus for browsers that dont support focus-visible (I'm looking at you Safari) and move it within the crayons-link so we dont see it on mouse click
* WIP: first pass of stimulus controller code
* feat: interaction design
* chore: remove unnecessary condiition
* chore: only add transparent background when not the current link
* Update app/models/admin_menu.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* feat; comment explaining
* feat: add an id on the button to be clicked
* feat: disable currentNavItem
* chore: remove event params
* chore: update cursor
* feat: (safe fail)
only show the tabbed navbar when the roures contain values form the data structure
* chore: pass events through + tests
* trigger an onload event and test the disabling of the menu item
* refactor: tabbed menu items
* feat: account for the visibility of the feature flags
* chore: rubocop fixes
* chore: indentation
* feat: some refactors and updates for rubocop
* Update app/javascript/admin/controllers/sidebar_controller.js
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* feat: set to true
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* adds focusTrap wrapper to preact Modal component
* add view specific code for focus trap in admin add nav link
* add script to return a focustrap toggle, use in add nav link modal partial
* add trap to edit nav link modal
* add handlers for sign up modal
* update modal controller for admin section, update nav link modals to use
* update other admin modals with new data values for trap
* remove unneeded erb script file
* remove unneeded target
* refactor to remove extra unneeded param
* remove duplicate code, store getFocusTrapToggle in window
* trap focus in comment and bookmark showModal instances for not logged in user
* remove need for activator id
* clean up id refs no longer needed
* remove custom code and re-use focsu-trap lib
* update storybook docs
* update default export in focusTrap
* prevent close button click triggering a modal toggle twice
* ensure if user navigates from a modal the trap is deactivated
* add jsdoc comments and add dynamic import
* ensure admin controller modal traps are cleaned up on disconnect
* update sign up modal to use crayons
* update modal controller and admin nav links modals to use preact modal
* update profile fields modals for new controller
* tweak styling of sign up and admin modals to match previous
* update listings modal to use crayons modal, adapt focus trap to work with click outside
* memoize deactivate callback to ensure modal can be presented on first page load
* add missed focustrap changes
* fix focus trap issues in onboarding flow
* refactor onboarding focus trap, remove getFocusTrapToggle
* tweaks for styling and article modal toggle
* add click outside tests to modal
* add cypress tests for the login modal
* update liquid tag tests affected by change
* refactors to address review comments
* fix issue with login modal presented twice on comment add
* change ids to selectors in admin modals
* small pr comment refactors
* add listings e2e tests
* add nav link modal tests
* fix issue with help modal
* tweak to fix ui bug from merge
* remove context from showLoginModal
* rename toggleModal
* rename state property for clarity
Co-authored-by: Nick Taylor <nick@dev.to>
* Added svg image picker to navigation link form
* Added svg image picker to navigation link form
* removed unnecessary attribute at _form.html.erb
* Added targets into SvgIconUploadController
* Fixed accept file type in .erb and stimulus controller
* Fixed UI form elements
* feat: add an error column to the data update script
* feat: save the error to the error field
* feat: save the error when the script fails
* feat: show the script error on the data update script page
* chore: pass the error to mark_as_failed instead of having its own function
* refactor: use presence
* test: ensure that we test an error case of a data update script
* chore: rename errorneous to failing
* test: update some specs, working on the others
* chore: update tests now that there are two files
* chore: change error from a string to a text to allow for more char
* feat: order the data update scripts by the latest script that ran
* feat: when the script has succeeded reset error to nil
* feat: create a model function that will allow the script to be force run
* chore: oops remove the functions form the worker to the model so it can be re-used
* feat: create an endpoint that will call the model method force run when we hit the api by clicking the button
* feat: ensure that the we add an ajax call that calls the controller endpoint
* chore: remove newline
* refactor: change to a more Restful route
* refactor: use Stimulus
* fix: move the code from the model back into the worker so that we can reuse it in the controller
* feat:call the worker in the force_run action and create a show route
* feat: very first draft of using a polling mechanism on the show method after we kickoff the sidekiq job (still need to error handle)
* chore: some syntax changes and unused variables
* fix: call the method correctly with the paramters
* feat: do some error handling
* feat: error handing on the frontend
* chore: use e instead of err
* refactor: just pass the id instead of the whole script
* chore: remove the button
* fix: allow the id to be passed
* feat: handle errors better
* feat: limit the filename column width
* refactor: use a common function to set the banner error
* test: add a test fro rerun button
* test: v1 of the data update script request
* test: write some specs for the js controller
* Update app/controllers/admin/data_update_scripts_controller.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* tests: update the data worker spec
* chore: clean up the js controller and its tests
* chore: remove whitespaces
* chore: swap the functions based on the controller
* chore: updates to the UI
* chore: remove the standard error catch
* chore: update the alert and error messages
* chore: remove test for error handling for sidekiq run
Co-authored-by: Michael Kohl <me@citizen428.net>
* Start hooking things up
* further generalize adminModal, hook up relevant code
* Complete implementation
* remove comments
* Address QA suggestions
* Address QA suggestions
* Use object parameter for adminModal
* starting the admin cypress tests
* Code review suggestions
* remove incomplete test
* rename data attributes to make more sense
* complete the work
* use destructuring
* edit warning modal text
* Removes collective_noun and collective_noun_disabled from app
* Config Generalization: replaces community_qualified_name with community_name
- Generalizes SiteConfig after the removal of collective_noun field
- Updates copy where necessary to be readable with community_name
- Makes the community_name SiteConfig description more explicit
- Adds flexibility for Admins by removing appended "community"
* Adds a data_update script to remove collective_noun and collective_noun_disabled
* Removes appended community from stories_controller.rb
* Removes unnecessary quotation marks around SiteConfig.community_name.to_s
* Makes SiteConfig community_name description more explicit
* Removes topic from #email_from and replaces arg with _
* Removes argument from #email_from (facepalm)
* Reverts changes to application_mailer and notify_mailer_spec
* Removes default "Community" topic from application_mailer and makes topic optional
* Refactors #prepopulate_new_form to resolve Code Climate failures
* Refactors #email_from even further by use of a ternary operator per review suggestion
* Simplifies the data_update script used to remove collective_noun per review request
* Adds a data_update script to append community to community_name
* Updates data_update script to correctly append Community to community_name
* Removes RemoveCollectiveNounFromConfig and updates other script
* Removes superfluous false from data_update script
* Updates data_update script to be more idiomatic
* Upgrade Stimulus to 2.0
* Convert ArticleController to use Stimulus 2
* Convert ModalController to Stimulus 2
* Convert BufferController to Stimulus 2
* Convert ConfigController to use Stimuus 2
* Convert ImageUploadController to Stimulus 2
* Convert Reaction controller to Stimulus 2
* Allow authors to restrict which emails can sign up
* Add form and tests
* Check for email presence in allowed email flow
* Fix test domains
* Fix codeclimate issue
* Genericize AdminConfig Modal
* Rename function, add JSDoc documentation
* Tests for modal-building function
* Still trying to get jest test to pass
* Fix failing jest test
* Hooked "Enable" button to hidden checkbox
* Hooked "Close" button to close email settings and show "Enable/Edit" button
* Additional hookups
* Start building generalized Modal blocks
* Everything hooked up except styling and a few Qs
* last of the hookups; ensure logic flow
* clean up
* specs to cover email auth refactor
* Fix bug surfaced by Vaidehi
* Incorporate PR feedback
* prevent email auth disable if invite-only-mode
* adjust emailAuthModal body text
* Sundry improvements
* Last-mile tweaks
* Trying to get 3rd party auth deselect to work
* delete unnecssary function
* remove superfluous comment
* Move inline styling into CSS file
* Incorporate PR feedback
* Incorporate more PR feedback
* Make Confirm btn intent clearer
* Add TODO comment
* Adds valid status to the feedback_message model and a spec to validate the status
* Adds an unresolve button to resolved vomits in _abuse_reports.html.erb
* Adds functions to update valid status in reaction_controller.js
* Use invalidate in place of unresolve for unconfirming vomit button
* Add option to reopen vomit reactions marked as invalid and invalidate resolved vomits
- Adds a Reopen button under the invalid tab
- Adds confirmedStatus JS to reaction_controller.js
- Adds conditional to _abuse_reports.html.erb
* First draft - all the big changes
* Changing some more references to 'internal'
* Relocate internal request tests to admin
* Relocate internal system tests to admin
* Fix trailing space
* Test fix
* Move queries from internal to admin
* Docs updates
* Rename internal stimuls controllers to admin (plus docs)
* Rename admin layout
* Fix routing after rebase
* Fixes for latest added admin interfaces
* Serviceworker ignore paths