Commit 06b076d
feat(ui): add item list support to search categories (#888)
* feat(categories): add item list support to search categories
Search categories can now have both a search query and a manually-added
item list, allowing users to supplement query results with additional
items.
Changes:
- config/categorypane.lua:
- Added item list UI section to CreateSearchDetailPanel (similar to
manual categories)
- Repositioned Save/Rename/Delete buttons to bottom with divider
- Added drag-and-drop support for adding items to search categories
- Updated ShowSearchCategoryDetail to load item list on display
- Item list label clarifies these are "Additional Items" to supplement
the search query
- data/categories.lua:
- Removed blocking logic in AddItemToCategory that prevented items
from being added to categories with searchCategory field (lines
175-176 and 184-185)
- Search categories can now accumulate items in their itemList just
like manual categories
How it works:
1. Search query results are cached in items:RefreshSearchCache and
looked up via searchCache[kind][slotkey]
2. Manually added items are stored in category.itemList and found via
categories:GetCustomCategory
3. When an item matches both the search query AND is in the itemList,
the priority system determines which takes precedence (both will
return the same category name, so priority comparison is consistent)
4. The UI now exposes the item list for search categories, making the
dual-matching behavior accessible to users
Technical details:
- The items module already supported this pattern - it checks both
searchCache and GetCustomCategory, comparing priorities when both
match
- SaveSearchCategory already preserved itemList via "itemList =
filter.itemList or {}" (line 801)
- The blocking logic was the only thing preventing this feature from
working
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(config): display item list for search categories in Category Pane
The Category Pane's "Additional Items" list was not displaying for search
categories, even when items had been manually added. This was because the
LoadItemList function was hardcoded to only update the manualDetail.itemListFrame,
ignoring the searchDetail.itemListFrame that search categories use.
Changes made:
1. Modified LoadItemList() to detect which detail panel is currently active
(searchDetail or manualDetail) and update the correct item list frame
accordingly. This allows both manual categories and search categories to
display their item lists properly.
2. Updated the bags/Draw event handler to refresh the item list when EITHER
a manual category OR a search category is selected, ensuring that items
added via drag-and-drop appear immediately in the UI for both category types.
The item list UI elements (frames, drag-and-drop handlers) were already present
in the searchDetail panel, and the ShowSearchCategoryDetail() function was
already calling LoadItemList(). The issue was purely that LoadItemList() was
not routing to the correct frame for search categories.
Fixes the "Additional Items" list display for search categories.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 455135f commit 06b076d
2 files changed
+69
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
465 | 468 | | |
466 | 469 | | |
467 | 470 | | |
| |||
733 | 736 | | |
734 | 737 | | |
735 | 738 | | |
736 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
737 | 747 | | |
738 | | - | |
| 748 | + | |
739 | 749 | | |
740 | 750 | | |
741 | 751 | | |
742 | 752 | | |
743 | 753 | | |
744 | 754 | | |
745 | 755 | | |
746 | | - | |
| 756 | + | |
747 | 757 | | |
748 | 758 | | |
749 | 759 | | |
| |||
754 | 764 | | |
755 | 765 | | |
756 | 766 | | |
757 | | - | |
| 767 | + | |
758 | 768 | | |
759 | 769 | | |
760 | 770 | | |
| |||
770 | 780 | | |
771 | 781 | | |
772 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
773 | 825 | | |
774 | 826 | | |
775 | 827 | | |
| |||
1078 | 1130 | | |
1079 | 1131 | | |
1080 | 1132 | | |
1081 | | - | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1082 | 1142 | | |
1083 | | - | |
| 1143 | + | |
1084 | 1144 | | |
1085 | 1145 | | |
1086 | 1146 | | |
1087 | 1147 | | |
1088 | 1148 | | |
1089 | | - | |
| 1149 | + | |
1090 | 1150 | | |
1091 | 1151 | | |
1092 | 1152 | | |
| |||
1376 | 1436 | | |
1377 | 1437 | | |
1378 | 1438 | | |
1379 | | - | |
1380 | | - | |
| 1439 | + | |
| 1440 | + | |
1381 | 1441 | | |
1382 | 1442 | | |
1383 | 1443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 181 | | |
188 | 182 | | |
189 | 183 | | |
| |||
0 commit comments