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

Semantic model: Remove duplicate non-semantic tags in Item component #2095

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

Davek145
Copy link
Contributor

@Davek145 Davek145 commented Sep 26, 2023

Changes introduced into #2087 in combination with #2093 create duplicity in showing non-semantic tags in the model page (component/model/item-details.vue).
Non-semantic tags are displayed both in the Item and when edit mode is enabled, in the accordion tag input in item-form.

Signed-off-by: David Kesl <david_git@keslovi.cz>
@Davek145 Davek145 requested a review from a team as a code owner September 26, 2023 18:20
@relativeci
Copy link

relativeci bot commented Sep 26, 2023

Job #1164: Bundle Size — 15.78MiB (+0.11%).

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

⚠️ Bundle contains 16 duplicate packages
⚠️ Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more

Metrics (7 changes)
                 Current
Job #1164
     Baseline
Job #1158
Initial JS 1.67MiB(+0.19%) 1.67MiB
Initial CSS 608.89KiB 608.89KiB
Cache Invalidation 93.94% 93.95%
Chunks 219 219
Assets 689 689
Modules 2980(+75.29%) 1700
Duplicate Modules 170(+88.89%) 90
Duplicate Code 1.62%(-16.92%) 1.95%
Packages 152(+10.14%) 138
Duplicate Packages 16(+6.67%) 15
Total size by type (3 changes)
                 Current
Job #1164
     Baseline
Job #1158
CSS 859.97KiB (+0.06%) 859.49KiB
Fonts 526.1KiB 526.1KiB
HTML 1.23KiB 1.23KiB
IMG 140.74KiB 140.74KiB
JS 9.27MiB (+0.12%) 9.25MiB
Media 295.6KiB 295.6KiB
Other 4.73MiB (+0.11%) 4.73MiB

View job #1164 reportView Davek145:model-item-tag-fix branch activity

@florian-h05
Copy link
Contributor

Can you please provide a screenshot where you see those duplicate tags?

@Davek145
Copy link
Contributor Author

It is in the Model when you select an Item and expand it by Edit:

After your change in item.vue:
image

With my minor fix it looks like this:
image

@florian-h05
Copy link
Contributor

florian-h05 commented Sep 26, 2023

I am a bit hesitate here, because on one hand they are duplicate, but only if edit mode is active. If it is not active, you won't see the tags. It is the semantic model, one could argue that you don't need to see the normal tags ...

@Davek145
Copy link
Contributor Author

It just looked weird to me. But you are right that it is like this only when in edit mode.
What about having them hidden only in the edit mode? :no-tags="editMode || createMode"

@florian-h05
Copy link
Contributor

Agreed! :no-tags="editMode" is enough, the component is only rendered if not in create mode (v-if="!createMode").

Signed-off-by: David Kesl <david_git@keslovi.cz>
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!

@florian-h05 florian-h05 changed the title Remove duplicate non-semantic tags in Item component in Model Semantic model: Remove duplicate non-semantic tags in Item component Sep 27, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Sep 27, 2023
@florian-h05 florian-h05 merged commit c402d32 into openhab:main Sep 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants