Skip to content

feat: Categories picker as tree, only assignable categories selectable - #1498

Open
nikazzio wants to merge 1 commit into
masterfrom
feat/6.x/categories-filter-tree
Open

nikazzio wants to merge 1 commit into
masterfrom
feat/6.x/categories-filter-tree

Conversation

@nikazzio

Copy link
Copy Markdown
Member

Categories picker (index filter and bulk categories action) listed all categories flat: parents and children mixed at the same level, and parent categories with children were selectable even though objects can't be assigned to them from the Manager (filtering by them returns no results).

Changes

  • category-picker: options built as a tree. Root categories with children are groups (not selectable), only enabled children and enabled root categories without children can be selected. Groups with no enabled children are hidden. Sorted by label, name when label is empty.
  • New app/helpers/categories.js with categoriesTree() and compareCategories(): two levels tree grouping and sorting, shared by category-picker and object-categories (removes duplicated tree building and sort logic from object-categories).
  • object-categories: same rendering as before; groups count used to open all groups now counts actual groups (previously included an extra key for root categories).
  • Picker dropdown menu as wide as its labels (at least as wide as the control, max 30rem), so long labels are readable without widening the control.

Category picker (index filter and bulk action) shows parent categories as groups with their children; only children and root categories without children can be selected. Categories tree logic shared with object categories form.
@didoda didoda added this to the 6.x milestone Oct 29, 2026
@nikazzio nikazzio changed the title Categories picker as tree, only assignable categories selectable feat: Categories picker as tree, only assignable categories selectable Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants