* Improve dropdown UX for internal/badges
Add a "blank" option to the dropdown to list of badges on internal/badges route.
Also add some checks to handle if an admin accidentally tries to award a "blank" badge.
* Ensure error is surfaced as flash message
* Add tests and improve pagination and caching
* Add two more specs
* Add .with_video scope
* Get rid of N+1
* Only select needed columns
* Improve efficiency of the video page as well
* Add missing set_cache_control_headers to API videos#index
* Add organizations to user profile
* Add user organization info updated at column and cache key
* Remove default value for users organization_info_updated_at column
* Update organization_memberships factory
* Remove schema organization_info_updated_at default value
Co-authored-by: rhymes <rhymesete@gmail.com>
* Fix article description issues
* Move tag info to decorator
* Fix description edge cases
* Fix description creation logic
* Fix test and adjust naming
* Modify line in processed_description
* Add StimulusJS 1.1.1
Because:
- Internal will likely need more interactivity going forward
- Vanilla JS and jQuery are great, but aren't quite as organized as we
might like
- Stimulus fits our model of what internal should be (imo)
- Adopting Preact or something with templating would require rewriting a
bunch of erb (that is currently working just fine)
Stimulus is a JavaScript framework that directly compliments turbolinks
and the approach vanilla Rails takes to JavaScript. I've set it up to
specifically be used in the internal views where we are currently using
jQuery and vanilla JS. I think we should chip away at the vanilla JS
currently in place with this, which appears to be both scalable and
pragmatic exactly the sort of tool we want for building our internal
tools.
* Replace crufty article JS with Stimulus
I'm swapping out some of the stuff going on in article_script.erb with
some StimulusJS, it seems like a good test case for Stimulus.
This lets us organize the code a little more intentionally and hopefully
fixes a small performance complaint that Michael had.
* Rename uncommunicative methods
* Add unit tests for Stimulus classes
* Move Stimulus code to javascript/internal
* Feature 🚀 : Ability to delete messages in chat channels
- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Refactoring🛠: Message controller refactoring
* Test Cases📝 : Specs for Delete message added
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* Feature 🚀 : Ability to mention member in Group [Frontend]
* Test Cases📝 : Test Cases added
* Feature 🚀 : Ability to mention member in Group [Backend]
* Bug Fix 🐞: Making messages realtime for open channels
* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count
* Feature 🚀 : Ability to remove message count on channel open
* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not
* Feature 🚀 : Ability to metion @all and notify them
* Bug Fix 🐞: Minor fixes
* Fews tweaks in code
* Bug Fix 🐞: Feature was not present for Invite only Section
* Bug Fix 🐞: In open channels one can't mention all
* Bug Fix 🐞: Markdown conversion for all only in case of invite only
* Specs added
* Delete schema.rb
* Schema file updated
* Code refactoring
* Further Code refactoring backend
* Further Code refactoring backend
* Bug Fix 🐞: Mention List error problem in switching tabs
* Test Snapshots added
* Feature 🚀 : Ability to mention member in Group [Frontend]
* Test Cases📝 : Test Cases added
* Feature 🚀 : Ability to mention member in Group [Backend]
* Bug Fix 🐞: Making messages realtime for open channels
* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count
* Feature 🚀 : Ability to remove message count on channel open
* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not
* Feature 🚀 : Ability to metion @all and notify them
* Bug Fix 🐞: Minor fixes
* Fews tweaks in code
* Bug Fix 🐞: Feature was not present for Invite only Section
* Bug Fix 🐞: In open channels one can't mention all
* Bug Fix 🐞: Markdown conversion for all only in case of invite only
* Specs added
* Code refactoring
* Further Code refactoring backend
* Further Code refactoring backend
* Bug Fix 🐞: Mention List error problem in switching tabs
* Test Snapshots added
* Feature 🚀: Ability to navigate through user list with keyboard only
* Bug Fix 🐞: Changing color of group avatars in dark themes
* Bug Fix 🐞: Setup pusher channel for open channels also
* Add gem Ransack 2.3.0
* Add sorting and search to internal/reports
The UI here should probably be revisited sooner or later, I feel like
the vomit reactions might even need to be moved to their own view.
* Add system spec for internal reports search
* Remove filter for report_type
* Use ancestry in the index and add test
* Add tests for show action
* Return complete comments trees for index, kill n+1 and use correct edge cache key
* Return complete comments tree for show, kill n+1 and use correct edge cache key
* Refactor tests and add surrogate keys tests
* Preload users for the whole subtree
* Clarify explanation of the edge cache keys construction
* Refactor partials
* Remove action caching
* Replace .map.flatten with .flat_map
* Fix surrogate key prefix according to Fastly docs
* Add comment.purge to Comments::BustCacheJob to use Fastly-Rails
* Fix surrogate key spec
Michael asked that this behavior be extended to the buffer actions on
internal/listings as well.
We should probably look for an opportunity to refactor the JS currently
living in article_script.erb.
* Do not load messages in memory, just to count them
* Add Model.estimated_count
* Use Model.estimated_count in task record_db_table_counts
* Use size and estimated_count
* Use table_name so that .estimated_count works with all models
* Add comment to explain the .load.size + .each pattern
* Ask user to add email when deleting [WIP]
* Ask to provide an email before requesting account deletion
* Additional checks to make sure that user won't be deleted w/o an email
* Revert changes on confirm destroy view
If content is unpublished it shouldn't be immediately necessary for
negative reactions to be acted on.
There is a higher touch solution here, but I'm not sure it's warranted.
* Remove mock from specs to test the actual Suggester
* Fix articles API top articles n+1
* Fix n+1 in articles API with state parameter
* Remove eager loading for organization dashboard
* Eager load notifiables in notifications only when needed
* Algolia does not like this