Refactor how user avatar is updated
What does this MR do and why?
Refactor how user avatar is updated
Updating the user avatar was done by simply replacing the URL of the avatar elements. This is potentially tricky if the underlying Avatar implementation changes (and also was done via the test-id).
Let's trigger a custom event instead once a user uploads a new avatar.
Remove legacy tracking for "buy minutes" link
The legacy buy minutes link isn't used any longer. The new one has tracking enabled as well. So this part of the code can be deleted.
Remove old todo counter logic
The legacy sidebar used to update todo counts by manipulating the DOM directly. As we do not use the sidebar any longer, we can remove this code. The new sidebar still has this functionality, see: app/assets/javascripts/super_sidebar/user_counts_manager.js
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2023-11-20_at_09.49.37 |
How to set up and validate locally
- Upload an avatar to a user
- Remove avatar if necessary.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.