* feat: Add a pack file that pulls in the MultiSelect Component
* feat: move the tags to its own component
* save tags
* refactor: create a getCSRFToken function in the packs files so that it can be used in the admin
* feat: import the new module in request.js
* feat: remove unnecessary id
* feat: first pass of csrf token test
* chore: update the test
* fix: csrf token
* feat: hide the enw functionality behinda feature flag
* fix: loading form twice
* refactor: import for csrftoken
* chore: update the description of the function
* feat: use acts_on_taggable to craete a relationship between display_ad and tag
* feat: add a tag field to the display_ad form
* feat: add the selected tags from the multiselect autocomplete component to the input text field that references the tag_list
* feat: add the tag_list to the controller so that we can save it to the db with the display ad parameters
* feat: pull out the tag validation from the article and the display_ads into a concern
* feat: write soem tests for validating the tag on the display_ads model
* feat: add the tag_list as a hidden field
* feat: set the selected tags on edit
* feat: add a js class for the placement area
* feat: use the change in the dropdown to determine whether we show the tags field dropdown
* refactor: rename and brak up fucntions
* feat: show the tags field if the value of the placement area is already set
* fix: move if statement out of the change event
* feat: hide tags field and clear the tag list
* refactor: delete the display ads
* tests: ensure that we test the toggle
* fix:ensure that the tags on the hidden field show up as a string in the input field
* feat: update the jsdoc
* fix: no need to replace space with comma since we showing as string in form
* feat: update the name of the label
* fix: add hidden back
* Makes reason for adjustment optional for mod tag adjustments
* Makes reason for adjustment in notification conditional on adjustment reason
* Fix cypress element lookup by placeholder text
* Sort comments in articles page
* Clickable area in sort comments article is now more approriate
* Comments subtitle is now responsive in articles page
* Consider comments sort order for cache in articles page
* On selecting sort option the refreshed page lands to comments section
* feat: add a migration that creates a display_to column on the display_ads table
* feat: add an enum for display_to
* feat/WIP: add rough draft of the field to the UI and permit it in the controller
* feat: take into account on whether an ad needs to be shown on logged in or out or both + update cache keys on sign in
* fix: if a user is not signed in then we want to display all and logged out
* fix: display_for spec in model
* feat: add some tests for display_to
* feat: style the label
* feat: show the display_to on the index page
* feat: add a seed for e2e
* chore: force true
* Try context-based sorting for username search
* Use the search
* Comment cleanup
* Working on specs for new context behavior
* Front-end provides context
* Try refactoring away from class-level methods
* Comments don't always have context
* Try refactor query to avoid joins and get under timeout
* If we stub the request, the tests might work
* Cleanup unused join fragments
* Change all tooltip text on heart/like reactions icons
All texts of like reactions were changed to 'Like' instead of 'Heart' as well as the style used to display these tooltips.
Some tooltip styles have been changed to maintain consistency in the style between new 'Like' reaction tooltip style
* Add button accessible name
* Append new Like tooltip hasn't been added
Append the missing tooltips and refactored the code. The related E2E test has been updated
* Remove unnecessary tooltips
the new non-required tooltips that were aggregated were deleted
* Fix error code
* Refactoring code
* Adjust hover media queries
* building again
* still building
* still building
* stuck
* Suzanne Holmes on the case
* make report content a button not a link
* revert to link
* add tests
* revert changes made trying to get ModCenter to work
* hide nonworking actions_panel btns in Mod Center
* nudge Travis
* incorporate PR comments
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* building again
* still building
* still building
* stuck
* Suzanne Holmes on the case
* make report content a button not a link
* revert to link
* add tests
* revert changes made trying to get ModCenter to work
* hide nonworking actions_panel btns in Mod Center
* nudge Travis
* incorporate PR comments
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* feat: remove feature flags
* separate forms for the duplicating layouts
* tweak controls and filters
* remove partial no longer used
* retain layout when pagination appears or disappears
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* show the statuses in the modal
* filter the results
* add some todo around good standing
* Enable Rails framework 7.0's isolation_level, partial_inserts, & raise_on_open_redirects (#17970)
* Member index: Show applied org filters (#17977)
* show applied org filters
* correct casing
* API V1 transition (#17835)
* API Articles v0-v1 restructure
* Remove unused helper
* Bulk move API controllers into concerns + add V1 controllers
* Extract API routes + some fixes
* Fix v1 api_controller authenticate! + add more article_controller specs
* Completed spec/requests/api/v1/articles_spec.rb
* specs up to listings
* All v1 specs except for 9 skips
* mime_types cleanup + authenticate! relocation
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* Fix email confirmation logic when registering via Omniauth (#17878)
* Move .skip_confirmation! call to .find_or_create_user! method
* Add regression tests to avoid email confirmation delivery
* Keep the original place where we had user.skip_confirmation! too
* Update logic to require email confirmation from omniauth
* test confirmation is required with SMTP
* Keep :notice instead of :global_notice
* Forem Account bypass email confirmation reorg
* inline comment reorder + clarification
* Apply suggestions from code review
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Member Index View Actions: "Adjust Credit Balance" (#17974)
* Adds the Adjust credit balance modal to index view
* Adds e2e tests for adjusting credit balances via modal
* Adds the ability to update credits to #user_status
* Adjusts the e2e to address failures
* Introducing a quick and dirty fix for abtests/admin (#17982)
This is a "quick and dirty" hack. Do I like it? No. Do I want to delve
into further debugging/refactoring of [a 72 line method][1]? Not at the
moment. There are a few pathways forward, but for now, this is the
pathway to hopefully give us insight into the
**Why will this likely address the issue?**
Prior to this commit, for an experiment we would render each of the
goals (anywhere from 8 to 11); each of which would require 2 expensive
queries; which means about 16 expensive queries.
After this commit, the experiment page has none of those expensive
queries; instead each goal now runs the 2 expensive queries.
The hope is that this will help us show the results (albeit on multiple
pages) while coming in under the response time out handlers we have in
place.
**Why no tests?**
Ugh; I know right?!? I'm beginning to ask that myself. But for now,
because this is only visible to tech_admins, the consequences of
breaking are limited. In otherwords, this is not a customer facing
feature, so it can be a bit less robust in it's testing. At least
that's the rationalization I'm establishing.
Further, local tests would not reveal the production environment
complications of large data sets. The aforementioned expensive queries
are blisteringly fast on my local machine...in part because I don't much
field_test experiment data.
Closesforem/forem#17981
Related to:
- forem/forem#17895
- forem/forem#17869
[1]:ab2d7d29d0/lib/field_test/experiment.rb (L98-L160)
* Adding test for redundant roles
* Adding filter for roles
* forget about good standing status
* remove good standing specs
* Update app/helpers/admin/users_helper.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* appease rubocop
* simplify
* add e2e tests
* add the applied filter pills for status
* make sure clear all button shows
* add a comment to explain good standing
* tweak
* set the registered dates of test users
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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
* Adds the Adjust credit balance modal to index view
* Adds e2e tests for adjusting credit balances via modal
* Adds the ability to update credits to #user_status
* Adjusts the e2e to address failures
* 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
* show the organizations checkboxes
* apply clear filter button and indicator
* filter by org in users query
* add some rspec tests
* add cypress specs
* correct cypress spec
* Fixing UsersQuery to ensure singular user by organization
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
* 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 an Add Organization modal and e2e tests for the modal
* Conditionally redirects to the correct view upon adding org
* Combines modal tests within userIndexView.spec.js
* Removes redundant code and switches assign role and add org button positions
* Updates RSpec tests to account for conditional redirection
* Lowercases the o in organization within _user_actions_dropdown.html.erb
* Fixes failing e2e tests
* 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 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
* added ability to assign moderator role via admin/super admin
* create Mod User in seeds
* add Cypress specs
* fix failing Cypress tests
* fix failing specs by moving test Mod user to the end
* nudge Travis
* nudge Travis
Co-authored-by: Arit Amana <msarit@gmail.com>