* Update notifications_helper
* Update notification decorator
* Removed old notifications views
* Remove flag check from _actions partial
* Remove feature flag from views
* Remove flag from model
* Update logic in reaction drawer button
* Missed this somehow
* Update app/assets/javascripts/initializers/initializeArticleReactions.js
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Update these tests to multiple reactions
* Adjust logged-out test to account for multiple reactions
* Removed unused
* Try to boost coverage
---------
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Try disabling text-select (mobile long-tap)
* Try to force button color on mobile safari
* Try making notification decorator more helpful
* More using notification decorator
* Helper so I can see exceptions
* As we toggle feature flag, temporary show 'heart' for unsupported reactions
* Reaction on Comment is a 'reaction'-type notification
* Temporarily add new emojis to i18n
* Render full-color, unique SVGs for multiple_reactions
* Restore card layout
* Aggregate reaction icons also need unique SVGs
* This seems unnecessary?
* Multiple is -more-than-one-
* Display *unique* reaction categories on /notifications
* Comment notification no longer needs to re-render as reaction
* Decorator needs to handle some data gaps
* Fix NotificationHelper
* Try a better name for this
* Tests for the notification decorator
* These partials wound up without an outer layer
* Add a descriptive comment
* index needs force_unique
* Try multiple reactions external img (#19076)
* Try external img SVGs
* Unique SVG might not be necessary if this works
* Can also remove this spec if successful
* Restore flash icon behavior
* Plus external img for #index as well
* Try renaming moderator -> super_moderator
* Still finding 'moderator' words
* Fixes for failing specs
* Update test with new role name
* Update app/services/moderator/manage_activity_and_roles.rb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* add new column with enum value
* refactor to use display_to column
* add some more specs to application_helper
* test for the backfill DUS
* fix line length
* refactor
* feat: add the export route
* feat: base export csv
* refactor: move the svg into its own file
* feat: add the export partial
* feat: export teh correct fields etc. for the csv
* user status helper
* feat: ensure that we format the time
* feat: add a spec for the CSV
* remove space
* remove puts
* chore: remove blank space
* feat: update traits
* Update app/views/admin/users/export.csv.erb
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
* Update spec/requests/admin/users/users_export_spec.rb
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
* Update spec/requests/admin/users/users_export_spec.rb
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
* fix: export should not error for unregistered users
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
* Encapsulating the "why we hide/show" something
Prior to this commit, we were relying on our views/templates to
understand why it might want to append the "hidden" dom class. That is
not ideal, because it required repeating knowledge about the conditions
of the policy outside of the policy's domain.
With this commit, we're removing a duplication of knowledge; or more
appropriately asking the steward responsible for the knowledge to
produce the answer.
* Refining the note to not describe a course of action
* Adjusts Member Index View tooltips to include resource type
* Adds .compact to the list of resource_types in #format_role_tooltip
* Updates users_helper.rb#format_role_tooltip tests
* right align tooltip
* Update app/views/admin/users/_member_index.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Prior to this commit, we always assumed a policy based attribute would
have the "hidden" class and then we'd rely on JavaScript to toggle the
visibility.
With this approach, we are "cheating" a bit by specifically referencing
a feature flag that is the driver for the visibility behavior.
This mirrors the one-off behavior of forem/forem#16606. Namely, when
the flag is off, we render without default hiding. And when it's on, we
include the "hidden" attribute.
In both cases, we will still leveraged the [applyApplicationPolicyToggles.js][1]
introduced in forem/forem#17076.
An impact could be that if multiple flags are fiddling with the policy,
we could see an area disappear or wrongly remain present. This would be
a warning to fix (the server would still enforce correct policies so
this would be a bit of a "heads up we have a mismatch in understanding
that happens to impact UI behavior").
[1]:https://github.com/forem/forem/blob/main/app/javascript/packs/applyApplicationPolicyToggles.js
* Adds data to the member column in Member Index View
* Adds roles, statuses, and latest activity to Member Index views
* Adds the list of orgs a user belongs to in Member Index view
* Updates the image URL to link to each users member detail view
* Adds comment_suspended to user current_status and makes roles prettier
* Fixes bullet warning and encapsulates org logic in method
* Properly displays today and yesterday in words
* Refactors #current_organizations to use ternary
* Updates user.rb Member Index View-related methods
* Adjusts the styling of user roles and adds tooltip to roles
* Updates Member Index View to be mobile-friendly
* Updates userIndexView.spec.js
* Updates capitalization within userIndexView.spec.js
* Updates Member Index View per mobile designs and feedback
* Adds member status logic inline with SVGs
* Updates the status column for mobile layout
* Adjust current_role tooltips for Member Index View
* Adds organization name tooltip to member orgas
* Adds organization pics to Member Index View and cleans up helpers
* Addresses PR review feedback (Thanks, Suzanne!)
* Uses CSS in place of SVGs for member statuses
* Adds E2E test for and removes link to org page from Member Index View
* Addresses PR feedback comments by refactoring Member Index View code
* Removes leftover code in user.rb
* Update method that tooltips rely on
* Spells regular correctly :
* Adds a spec that tests Admin::UsersHelper#format_last_activity_timestamp
* Adjusts #cascading_high_level_roles logic and roles
* Adds a spec for #cascading_high_level_roles
* Adds a #last_activity spec to the User model
* Adjusts code a bit per PR feedback. Thanks, Ridhwana! :)
* Updates specs for Member Index View helpers
* Adds Timecop.freeze to help with timestamp failure in user_spec.rb
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section
* refactor: rename the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email
* chore: alignment
* feat: use the contact_email helper
* feat: move the contact_email to the ForemInstance model
* feat: use ForemInstance.contact_email instead of the application helper method
* removed the application Helper
* feat: set the dafault on the contact_email
* fix: cypress tests
* Update app/lib/constants/settings/general.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Michael Kohl <me@citizen428.net>
Prior to this commit we had an inline logic check on whether or not to
render a navigation link. As we are looking to rollout the feature flag
for Listings, we needed to add another somewhat complex conditional.
This commit moves the inline conditionals to a helper function, which
makes testing the logic far easier. Especially since we need to bombard
the tests with the combination of 3 different boolean checks. (And one
of those boolean checks requires even more but could be stubbed).
There should be no UI differences, as we're presently assuming the
Listings feature is enabled.
Related to forem/rfcs#291
* Moving the "Null" user object closer to User
Prior to this commit, we had the presentation concept of a DELETED_USER
in the ApplicationHelper. Further, we did type checks against that
object instead of relying attributes of the object.
With this commit, I moved the "Null" user closer to the User definition
to help highlight the concept that there might be deleted users.
I didn't remove all of the type checks, but did attempt to create a more
"duck-type" object.
Further, I moved away from an OpenStruct which in the past (and perhaps
present) had performance issues.
* Moving DeletedUser into Users module space
* Enable Forem (Passport) Auth
* Remove feature flag DUS
* Add prompt for Forem Passport in admin
* Add spec & fix broken one
* Link to docs instead of passport site
* rough starting point, roving tabindex in toolbar, bold and italic buttons
* refactor, add link
* add ul
* add ordered list
* core formatters in place, wip
* overflow options
* add keyboard shortcuts
* tidy up some dodgy classes
* add mocks for runtime in test and storybook, use correct modifier key for tooltip
* style tweaks
* refactor tooltips
* add markdown formatters tests
* add tests for toolbar component, fix mistake in overflow menu tooltips
* undo change no longer needed to button
* fix issue accessing runtime in formatters file
* only show darkened buttons and tooltips when focus-visible is true
* mobile view
* fix for responsive buttons & roving tabindex
* tweaks from PR review
* update cursor position on link insertion
* add a new line after block selection formatting
* align icons in center
* tidy up overflow menu listeners
* small refactors
* test for new text area util
* tidy up new lines after syntaxes
* fix logic in cursor offsets for links
* prevent scroll jumps after inserting syntax
* some style tweaks
* insert level 2 heading with new lines above and below
* update icons
* use margin instead of gap
* Replaced granular emails with the default one
* Set reply to header in emails
* Extract shared_examples from NotifyMailer
* Removed unused code
* Replaced SiteConfig with Settings::General
* Fixes related to replacing SiteConfig with Settings
* Removed duplicate line from specs
* 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'
* Fallback to the image URL if neither Cloudinary nor Imgproxy are configured
* Fix specs
* Cloudinary api_secret is required
* Update spec/models/message_spec.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update format specifiers in readable_publish_date
* Trigger Travis manually
* Update format specifiers in readable_publish_date
* Update format specifiers in readable_publish_date
Co-authored-by: rhymes <rhymes@hey.com>
* Remove references to social link profile fields
* Add some dummy data
* Remove special display social links
* Remove unnecessary tests
* Add tests for profile social icons
* PR feedback
* Remove nil check from erb
* Move view method into helper
* Don't render links in user settings