discourse/app/assets/javascripts/select-kit/addon/components
David Battersby 875a56921f
FIX: pass ancestor data to category badge helper (#35169)
The badge in `CategoryChooser` is incorrectly showing the child category
badge when displaying both parent and child as the selected option. This
was already fixed for cases where the `ancestors` option is passed to
`categoryBadgeHTML` in the category link helper.

Updating the option within CategoryChooser fixes this issue, but I have
also added a fallback fix for any other components that still use the
recursive option.

_Note: as part of #26638 the preferred approach was to pass `ancestors:
category.predecessors` in place of `recursive: true`. That way reducing
multiple calls to `Category.findById` at the component level when
looping through category parents. We may want to completely remove the
recursive option in the future but leaving it be for now._

### Before

The category emojis are working correctly on the top header:

<img width="448" height="68" alt="Screenshot 2025-10-03 at 2 44 02 PM"
src="https://github.com/user-attachments/assets/f929cebf-3523-40cd-ac44-4c8d240793d5"
/>

The category chooser is showing the incorrect emoji for the parent
category when editing the topic:

<img width="430" height="159" alt="Screenshot 2025-10-03 at 2 43 55 PM"
src="https://github.com/user-attachments/assets/a7ed5cff-db10-4899-8096-45bd2b882eea"
/>

### After

<img width="451" height="153" alt="Screenshot 2025-10-03 at 2 43 02 PM"
src="https://github.com/user-attachments/assets/6033c164-3451-4526-8ff0-29819f8ae3d7"
/>
2025-10-03 15:43:34 +04:00
..
category-drop DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
color-palette-picker FEATURE: Add previews to color palette selectors (#34129) 2025-08-11 11:51:01 +08:00
color-palettes DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
combo-box DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
dropdown-select-box DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
font-selector FEATURE: Improve wizard quality and rearrange steps (#30055) 2025-01-02 09:28:23 +10:00
future-date-input-selector DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
homepage-style-selector DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
mini-tag-chooser DEV: Enable ember/no-classic-components (#33978) 2025-07-30 14:54:24 +02:00
multi-select DEV: Enable ember/no-classic-components (#33978) 2025-07-30 14:54:24 +02:00
notifications-button Cleanup mobile topic footer area (#30132) 2024-12-11 14:59:37 +01:00
notifications-filter DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
period-chooser DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
select-kit DEV: adds support for disabled in select-kit (#35037) 2025-09-30 10:48:35 +02:00
tag-drop DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
user-chooser DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
bulk-select-bookmarks-dropdown.js DEV: standardise toasts duration (#32741) 2025-05-15 14:59:37 +02:00
categories-admin-dropdown.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
category-chooser.js FIX: pass ancestor data to category badge helper (#35169) 2025-10-03 15:43:34 +04:00
category-drop-more-collection.gjs DEV: Remove unused services from core (#34236) 2025-08-18 13:15:11 +02:00
category-drop.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
category-notifications-button.js DEV: Update lint-configs and rubocop-discourse (#31728) 2025-03-10 19:52:19 +01:00
category-row.gjs FEATURE: new topic button always enabled (#34603) 2025-09-16 17:01:49 +04:00
category-selector.js DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00
color-palette-picker.js FEATURE: Add previews to color palette selectors (#34129) 2025-08-11 11:51:01 +08:00
color-palettes.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
combo-box.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
composer-actions.js UX: remove topic status actions from composer more menu (#33369) 2025-07-08 17:29:26 -03:00
create-color-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
dropdown-select-box.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
email-group-user-chooser-filter.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
email-group-user-chooser-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
email-group-user-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
filter-for-more.gjs DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
flair-chooser.js DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
flair-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
font-selector.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
form-template-chooser.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
future-date-input-selector.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
group-chooser.js FIX: Limit displayed groups in <GroupChooser /> to 100 groups (#31288) 2025-02-12 03:14:57 +03:00
group-dropdown.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
group-notifications-button.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
homepage-style-selector.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
icon-picker.js DEV: Move discourse-common/config/environment to discourse/lib (#30738) 2025-01-13 15:29:26 +00:00
list-setting.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
mini-tag-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
multi-select.gjs DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00
none-category-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
notifications-button.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
notifications-filter.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
period-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
search-advanced-category-chooser.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
select-kit.js DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
selected-choice-category.gjs DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
selected-choice-color.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
selected-choice.gjs DEV: Enable ember/no-classic-components (#33978) 2025-07-30 14:54:24 +02:00
selected-color.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
selected-flair.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
selected-font.gjs FEATURE: Improve wizard quality and rearrange steps (#30055) 2025-01-02 09:28:23 +10:00
selected-name.gjs DEV: Enable ember/no-classic-components (#33978) 2025-07-30 14:54:24 +02:00
single-select.gjs DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
tag-chooser-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
tag-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
tag-drop.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
tag-group-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
tag-notifications-button.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
tag-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
tags-intersection-chooser.js UX: direct to single tag page from tag intersection when one tag remains (#34038) 2025-08-04 09:42:25 -04:00
timezone-input.js DEV: maps IST rails timezone to kolkata (#32896) 2025-05-26 08:56:04 +02:00
topic-chooser.js DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00
topic-notifications-button.gjs FIX: prevents d-menu trigger/untrigger propagation (#32078) 2025-03-31 13:47:24 +02:00
topic-notifications-options.js DEV: Convert select-kit components to native class syntax (#28489) 2024-08-23 12:17:07 +01:00
topic-row.gjs DEV: [gjs-codemod] Convert automation/styleguide/other to gjs 2025-04-14 15:36:16 +01:00
user-chooser.js DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
user-notifications-dropdown.js DEV: Add optional callback in notification dropdown action (#31257) 2025-02-10 13:26:19 -03:00
watched-words.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00