discourse/app/assets/javascripts
Alan Guo Xiang Tan 913fd3a7b3
DEV: Improve addToolbarPopupMenuOptionsCallback plugin api (#23769)
Why this change?

Previously just using the `addToolbarPopupMenuOptionsCallback` plugin
API itself was insufficient because it required the return object to
include an `action` key which only accepted a name of the action
function as a string. This was highly problematic because the action
function had to be defined on the `composer` service which means using
the `modifyClass` API to add the action function. This made the API
awkward to use leading to poor developer experiencec.

What does this change do?

This commit introduces a couple of improvemnts to the API.

1. First the API has been renamed to `addComposerToolbarPopupMenuOption` because
   the API no longer accepts a callback function which was quite
   redundant. Instead, it now accepts an Object. The
   `addToolbarPopupMenuOptionsCallback` API function is deprecated and
   will be dropped in Discourse 3.3. Note that passing the API a
   function is still supported but will be dropped when the `addToolbarPopupMenuOptionsCallback`
   is removed.

2. The `action` key in the Object passed to the function can now be a
   function and is passed the `toolbarEvent` object when called.

3. The `condition` on key in the Object passed to the function can now be a
   function and is passed the `composer` service when called.
2023-10-06 07:43:40 +08:00
..
admin FIX: call UserBadge.grant with badgeReason in admin interface (#23753) 2023-10-05 13:08:09 +08:00
bootstrap-json DEV: Make index.html a valid html (#23289) 2023-08-28 14:44:38 +02:00
confirm-new-email DEV: Add error message styling (#21225) 2023-04-25 08:40:18 -04:00
deprecation-silencer DEV: move deprecation silencer to a shared package (#22668) 2023-07-18 19:07:20 +01:00
dialog-holder Build(deps): Bump a11y-dialog in /app/assets/javascripts (#23755) 2023-10-03 11:08:46 +02:00
discourse DEV: Improve addToolbarPopupMenuOptionsCallback plugin api (#23769) 2023-10-06 07:43:40 +08:00
discourse-common DEV: Add gjs support for themes (#23473) 2023-10-02 12:36:06 +02:00
discourse-hbr Build(deps-dev): Bump the embroider group (#23728) 2023-09-29 18:00:33 +01:00
discourse-plugins Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23667) 2023-09-26 17:52:08 +02:00
discourse-widget-hbs Build(deps-dev): Bump the embroider group (#23728) 2023-09-29 18:00:33 +01:00
docs
ember-addons
ember-cli-progress-ci
ember-production-deprecations DEV: Clean up package.json files (#22349) 2023-06-30 13:01:45 +02:00
float-kit FIX: ensures close arg from d-menu/:content works (#23773) 2023-10-04 19:58:17 +02:00
locales DEV: Raise an error in test env when I18n interpolate argument is missing (#23527) 2023-09-13 10:53:48 +08:00
patches DEV: Update content-tag patch following version bump (#23762) 2023-10-03 18:32:09 +01:00
pretty-text Build(deps-dev): Bump the embroider group (#23728) 2023-09-29 18:00:33 +01:00
select-kit A11Y: remove title from notification menu icons (#23735) 2023-10-02 13:54:59 -04:00
theme-transpiler Build(deps): Bump terser in /app/assets/javascripts (#23765) 2023-10-03 23:58:43 +02:00
truth-helpers Build(deps-dev): Bump the embroider group (#23728) 2023-09-29 18:00:33 +01:00
wizard Build(deps-dev): Bump the embroider group (#23728) 2023-09-29 18:00:33 +01:00
.licensee.json DEV: Update sub-dependencies (#22325) 2023-06-29 17:08:33 +02:00
.npmrc
handlebars-shim.js
package.json DEV: Add gjs support for themes (#23473) 2023-10-02 12:36:06 +02:00
polyfills.js
run-patch-package DEV: Automatically retry patch-package on failure (#23583) 2023-09-14 12:25:06 +01:00
service-worker.js.erb FIX: Ensure service-worker cache is cleaned correctly (#23204) 2023-08-23 13:58:32 +01:00
yarn.lock Build(deps): Bump zod from 3.22.2 to 3.22.3 in /app/assets/javascripts (#23766) 2023-10-04 01:01:22 +02:00