This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/unit
Osama Sayegh 0df1c4eab2
DEV: Refactor notification/reviewable items rendering in the new user menu (#17792)
Prior to this commit, we had a default Glimmer component that was responsible for handling generic rendering of notifications in the user menu, and many notification types had a custom Glimmer component that inherited from the default component to customize how they were rendered. That implementation was less than ideal because it meant plugins would have to create Glimmer components to customize notification types added by them and that would make the surface area of the API too big.

This commit changes the implementation so there's only one Glimmer component for rendering notifications, and then notification types that need to be customized can create a regular JavaScript class - `renderDirector` in the code - that provides the Glimmer component with the content it should display. We also introduce an API for plugins to register a renderer for a notification type or override an existing one.

Some of the changes are partially extracted from https://github.com/discourse/discourse/pull/17379.
2022-08-05 07:55:00 +03:00
..
controllers DEV: Replace current-user:main with service:current-user 2022-08-02 20:16:11 +01:00
ember FIX: Ensure admin templates are not used for non-admin controllers (#17667) 2022-07-26 17:03:49 +01:00
lib DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
mixins DEV: Deprecate assert.not() (#15595) 2022-02-09 18:49:05 +01:00
models Revert "DEV: Minor topic-tracking-state refactor (#17707)" (#17724) 2022-07-29 09:36:14 +10:00
services FIX: Inject appEvents in ScreenTrack (#17751) 2022-08-02 16:22:17 -03:00
utils DEV: Switch from htmlbars-inline-precompile to ember-cli-htmlbars (#17424) 2022-07-11 15:25:40 +01:00
localization-test.js FIX: Translation overrides from fallback locale didn't work on client 2021-12-17 14:03:35 +01:00