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
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
..
app DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
config DEV: Install ember-modifier and @ember/render-modifiers (#17595) 2022-07-21 18:12:29 +01:00
lib DEV: Remove rfc176-shims 2022-07-19 10:00:59 +01:00
public/assets/scripts DEV: Make sure testing-container fits in the viewport (#17446) 2022-07-12 15:32:43 +02:00
scripts COPY: Change "old" to "unsupported" browser (#17555) 2022-07-18 19:32:04 +03:00
tests DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Silence 3.x deprecations 2022-07-19 10:00:59 +01:00
jsconfig.json DEV: Add jsconfig (#17800) 2022-08-04 22:50:47 +01:00
package.json DEV: Install ember-modifier and @ember/render-modifiers (#17595) 2022-07-21 18:12:29 +01:00
testem.js DEV: Ensure ember-cli rake theme:qunit works with CSP enabled (#16541) 2022-04-22 16:59:45 +01:00