mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 14:49:57 +08:00
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" /> |
||
|---|---|---|
| .. | ||
| addon | ||
| app | ||
| .npmrc | ||
| ember-cli-build.js | ||
| index.js | ||
| package.json | ||