-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
category-list: Separate presentation and control #2588
Conversation
@TrimmingFool Develop is rebased now if you would like to resolve conflicts. I just want to review the code quickly before merging. |
fbb5d39
to
2b1f040
Compare
There is no need to hurry. BTW it would be best to merge #2562, first. |
Done and versions bumped to |
2b1f040
to
8b4947c
Compare
Thank You. I'm going to merge this on the weekend and start testing it. I already tested #2562. Works great. |
Thanks for the revisions these are noted. I didn't have time to test last weekend because I released |
@stickz Some fixes in |
Yes we will rebase before merging. Let's wait anther week until |
@TrimmingFool I have cherry picked all 6 commits from |
This allows reading new panel and label IDs of the category-list from the settings. For instance, `pstate` is interpreted as `flabel_cont`.
With the aim of improving code quality, presentation and control of the category-list have been separated. Additionally, explicit classes for model logic `PanelLabelSelection`, `CategoryListStatistic` and `TorrentLabelTree` have been created. The presentation is controlled by attributes of a custom `category-list` element which consists of `category-panel` and `panel-label` elements.
ec474d5
to
bbd9ee5
Compare
extsearch: Fix regressions by #2588
Unfortunately, this PR got bigger than I initially planned #2535 (comment). However, it is fairly well tested and limited to replacing the category-list (and quick-search).
With the aim of simplifying
js/webui.js
and improving code quality, presentation and control of the category-list have been separated and moved out oftheWebUI
. Additionally, explicit model classes forPanelLabelSelection
,CategoryListStatistic
andTorrentLabelTree
have been created.The presentation is controlled by attributes of a custom
category-list
element which consists ofcategory-panel
andpanel-label
elements. Plugins can inject custom attribute implementations to modify these components with theinjectCustomElementAttribute
function.As the components use shadow DOMs, dedicated stylesheets for
category-panel
andpanel-label
have been added.The components expose CSS variables to support theming.
Further, I changed the panel and label IDs to be more consistent:
Upgrading existing IDs is not a problem but downgrading will require category-list: Support downgrade for panel/label IDs which maps new IDs to old IDs.
Non-Functional Changes
Control category list in
js/category-list.js
CategoryList
instance is accessible bytheWebUI.categoryList
category-list
andpanel
Render category list component in
js/category-list-elements.js
category-list
containscategory-panel
s which in turn containspanel-label
s componentscategory-list-elements
Adjust category list dependent plugins:
extsearch
,rss
,tracklabels
Adjust themes to use the custom components CSS variables
(Make
"New View"
translatable)Functional Changes
Ctrl
-Click on aAll
label toggles the selection of the corresponding category⚠
now floats right