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

Support configurable visibility of semantic model cards #2144

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

wuschi
Copy link
Contributor

@wuschi wuschi commented Oct 20, 2023

Only render model-card if visible computed property is true.
Hide divs in model-tabs which do not have a visible model-card.
Closes #2143

@wuschi wuschi requested a review from a team as a code owner October 20, 2023 13:43
Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.
Closes openhab#2143

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
Signed-off-by: Thomas Wunschel <4302898+wuschi@users.noreply.github.com>
@wuschi wuschi force-pushed the 2143-model-card-visibility branch from 4024432 to e4a07e4 Compare October 20, 2023 13:53
@relativeci
Copy link

relativeci bot commented Oct 29, 2023

Job #1230: Bundle Size — 15.79MiB (+0.2%).

e4a07e4(current) vs b7270d2 main#1158(baseline)

Warning

Bundle contains 16 duplicate packages – View 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 #1230
     Baseline
Job #1158
Regression  Initial JS 1.85MiB(+10.95%) 1.67MiB
Regression  Initial CSS 609.06KiB(+0.03%) 608.89KiB
Change  Cache Invalidation 93.81% 93.95%
Change  Chunks 217(-0.91%) 219
Change  Assets 683(-0.87%) 689
Change  Modules 2987(+75.71%) 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 #1230
     Baseline
Job #1158
Regression  JS 9.28MiB (+0.24%) 9.25MiB
Regression  Other 4.74MiB (+0.19%) 4.73MiB
Regression  CSS 860.29KiB (+0.09%) 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 #1230 reportView wuschi:2143-model-card-visibilit... branch activity

@florian-h05
Copy link
Contributor

florian-h05 commented Oct 29, 2023

Hide divs in model-tabs which do not have a visible model-card.

What do you mean by this? EDIT: I got it.

Just a sidenote: Have you noticed that you cannot propertly configure a model card? The drop down seems to have some CSS problems:

image

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! Congrats to your first contribution!

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Oct 29, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Oct 29, 2023
@florian-h05 florian-h05 merged commit c2d071a into openhab:main Oct 29, 2023
5 checks passed
@florian-h05 florian-h05 changed the title Configurable visibility of semantic model cards Support configurable visibility of semantic model cards Oct 29, 2023
@wuschi
Copy link
Contributor Author

wuschi commented Oct 29, 2023

Thanks for merging!

Just a sidenote: Have you noticed that you cannot propertly configure a model card? The drop down seems to have some CSS problems:

image

Didn't notice that as I'm mostly doing configuration by code. I just checked - looks normal on my system:

Bildschirmfoto 2023-10-29 um 16 39 47

@florian-h05
Copy link
Contributor

Can you open the drop down and it works? It’s the icon besides the orange checkbox.

@wuschi
Copy link
Contributor Author

wuschi commented Oct 29, 2023

Can you open the drop down and it works? It’s the icon besides the orange checkbox.

Now i see what you mean.
Took me a while to figure out - the problem only seems to occur for the last item in the list.
For all other items the dropdown seems to work.

@florian-h05
Copy link
Contributor

Exactly. But I don’t find the cause of this issue, do you have an idea what’s going on?

@wuschi
Copy link
Contributor Author

wuschi commented Nov 2, 2023

Not really - I'm not a css expert, but as far as i can tell the z-index of the .menu-dropdown-link elements seems to get messed up.

You can observe this clearly when you set the background-color for the .config-sheet containing the Equipment List to e.g. red in your browser tools: This sheet seems to get rendered above the dropdown-menu.

For the .menu-dropdown-link the chrome developer tools complain that the z-index has no effect because of "position: static" being set for the element, but I have no idea where that "position: static" comes from as css clearly states that it should be "position: relative".

Even more strange - if you disable the "position: relative" in the .list css class of the .homecards-list div, the z-index gets applied and the dropdown renders correclty.

Btw., the discussion seems to have gotten a little bit off-topic here, maybe you should create an issue for the css problem.

florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Feb 5, 2024
Fixes issue mentioned in openhab#2144 (comment).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
ghys pushed a commit that referenced this pull request Feb 15, 2024
Fixes issue mentioned in
#2144 (comment).

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this pull request Feb 17, 2024
Fixes issue mentioned in
#2144 (comment).

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit 80a172e)
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.

Configurable visibility of semantic model cards (with visible / visibleTo)
2 participants