Skip to content
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

Rules list: Add filtering by (multiple) tags #2122

Merged
merged 17 commits into from
Nov 19, 2023

Conversation

d51x
Copy link
Contributor

@d51x d51x commented Oct 9, 2023

Closes #2123.

This adds filtering by tags to the rules list, the filter is inside an accordion.
In case you select multiple tags, the filter behaves like OR, which means all rules which have at least one of the selected tags are displayed.
In case you use the searchbar, the rules list will be narrowed down to the rules which match the search query and have the selected tags.

@d51x d51x requested a review from a team as a code owner October 9, 2023 17:56
@d51x d51x changed the title Add grouping rules/scripts by semantic and by all tags [MainUI] Add grouping rules/scripts by semantic and by all tags Oct 9, 2023
@d51x d51x changed the title [MainUI] Add grouping rules/scripts by semantic and by all tags [MainUI] Grouping rules/scripts by semantic and by all tags and Filtering by Multiple tags Oct 9, 2023
@relativeci
Copy link

relativeci bot commented Oct 9, 2023

Job #1265: Bundle Size — 15.81MiB (+0.29%).

62865b6(current) vs b7270d2 main#1158(baseline)

Important

Bundle introduced 1 and removed 1 duplicate package – View changed duplicate packages

Warning

Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more – View changed packages

Bundle metrics  Change 10 changes Regression 5 regressions Improvement 1 improvement
                 Current
Job #1265
     Baseline
Job #1158
Regression  Initial JS 1.89MiB(+13.11%) 1.67MiB
Regression  Initial CSS 609.63KiB(+0.12%) 608.89KiB
Change  Cache Invalidation 93.81% 93.95%
Change  Chunks 217(-0.91%) 219
Change  Assets 683(-0.87%) 689
Change  Modules 3027(+78.06%) 1700
Regression  Duplicate Modules 173(+92.22%) 90
Improvement  Duplicate Code 1.61%(-17.44%) 1.95%
Regression  Packages 152(+10.14%) 138
Regression  Duplicate Packages 16(+6.67%) 15
Bundle size by type  Change 3 changes Regression 3 regressions
                 Current
Job #1265
     Baseline
Job #1158
Regression  JS 9.28MiB (+0.31%) 9.25MiB
Regression  Other 4.74MiB (+0.33%) 4.73MiB
Regression  CSS 860.87KiB (+0.16%) 859.49KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.23KiB 1.23KiB

View job #1265 reportView d51x:rules_group_by_semantic branch activity

@d51x d51x changed the title [MainUI] Grouping rules/scripts by semantic and by all tags and Filtering by Multiple tags Rules list: Grouping rules/scripts by semantic and by all tags and Filtering by Multiple tags Oct 10, 2023
d51x added 11 commits November 19, 2023 15:49
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
@florian-h05 florian-h05 force-pushed the rules_group_by_semantic branch from 738e28b to 9110877 Compare November 19, 2023 14:56
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the rules_group_by_semantic branch from 9110877 to ee8800b Compare November 19, 2023 14:57
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 changed the title Rules list: Grouping rules/scripts by semantic and by all tags and Filtering by Multiple tags Rules list: Add filtering by (multiple) tags Nov 19, 2023
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Nice contribution.

To save me some time, I decided to implent my review:

  • I removed sort by semantics (as I want to generally remove semantics for rules) and sort by tags (as this is type of duplicated functionality of the tag filter).
  • For the tag filter, I cleaned-up and refactored the code a bit, and removed the capitalization of the tags.
  • I added a "Reset filter" functionality for convenience. I don't want to unselect all tags by hand ;-)
  • I wrapped the tag filter inside an accordion, so the filter does not need much space by default, when you need it, just open the accordion.

BTW I can imagine having this capability implemented for pages and Items as well. In that case, the filtering should be refactored into a mixin and Vue component to avoid code duplication.

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Nov 19, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Nov 19, 2023
@florian-h05
Copy link
Contributor

image

This is how it looks now.

@florian-h05 florian-h05 merged commit fbcc07e into openhab:main Nov 19, 2023
6 checks passed
florian-h05 added a commit that referenced this pull request Dec 7, 2023
Follow-up for #2122.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rules list: Grouping rules/scripts by semantic and by all tags and Filtering by Multiple tags
2 participants