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
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
..
acceptance DEV: Replace topic-tracking-state:main with service:topic-tracking-state (#17802) 2022-08-05 08:48:55 +08:00
fixtures DEV: Wire up the dimiss button in the new notifications menu (#17745) 2022-08-03 15:32:35 +03:00
helpers DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
integration DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
unit DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
active-plugins.js.erb DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
core-tests.js DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
index.html DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
plugin-tests.js.erb DEV: Transpile all plugin js by default (#17175) 2022-06-21 22:07:10 +02:00
setup-tests.js DEV: Replace site:main with service:site (#17766) 2022-08-03 14:38:35 +01:00
test-boot-ember-cli.js DEV: Randomize tests order in more cases (#17588) 2022-07-21 03:50:32 +02:00