NPM Resource Changed bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
22 Apr 2025

Pull request for #45362

Summary of Changes

In a fancy-select filter such as the list of categories in the article manager the dropdown excludes the currently selected category.

This causes problems if that category has any subcategories as they now appear to be the children of a completely different category

This is caused by the choices.js script which by default removes selected items from the list which is fine for a flat list but causes the described problem on a nested list.

The solution is documented here https://github.com/Choices-js/Choices?tab=readme-ov-file#renderselectedchoices

Usage: Whether selected choices should be removed from the list. By default choices are removed when they are selected in multiple select box. To always render choices pass always.

This PR changes the setting from auto to always

Testing Instructions

Create two categories
Create subcategories for both of the above
Using the category filter select one of the parent categories
Now try to select one of the child categories

As this is a JS change you will need to test either a prebuilt package or npm run build:js

Actual result BEFORE applying this Pull Request

The previously selected category is removed from the list

No category selected

Image

Category selected

Image

Expected result AFTER applying this Pull Request

The categories in the list never changes

No category selected

image

Category selected

image

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

cc @laoneo

avatar brianteeman brianteeman - open - 22 Apr 2025
avatar brianteeman brianteeman - change - 22 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Apr 2025
Category JavaScript Repository NPM Change
avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar QuyTon QuyTon - test_item - 22 Apr 2025 - Tested successfully
avatar QuyTon
QuyTon - comment - 22 Apr 2025

I have tested this item ✅ successfully on ceba074


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

avatar richard67
richard67 - comment - 23 Apr 2025

@brianteeman What happens if you have selected an item in the pull down so it is in the filter, and then select it again in the pull down? Does that deselect the item, or does it stay selected, i.e. no change? Just am curious how it works, not that I would have a problem with the one or the other. But I don't have the time right now to test it myself.

avatar brianteeman
brianteeman - comment - 23 Apr 2025

no change

avatar ChristineWk ChristineWk - test_item - 24 Apr 2025 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 24 Apr 2025

I have tested this item ✅ successfully on ceba074

with NPM Package


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

avatar richard67 richard67 - change - 24 Apr 2025
Status Pending Ready to Commit
Labels Added: NPM Resource Changed bug PR-5.3-dev
avatar richard67
richard67 - comment - 24 Apr 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

avatar s-harsh
s-harsh - comment - 24 Apr 2025

Commit for teh PR - 45365


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

avatar s-harsh s-harsh - test_item - 24 Apr 2025 - Tested successfully
avatar s-harsh
s-harsh - comment - 24 Apr 2025

I have tested this item ✅ successfully on ceba074

Raise PR for -45365


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

avatar brianteeman
brianteeman - comment - 25 Apr 2025

thanks

Add a Comment

Login with GitHub to post a comment