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

Prevent some undesired 'NULL' labels in lists for un-typed Groups. #1398

Merged
merged 1 commit into from
May 29, 2022

Conversation

tarag
Copy link
Contributor

@tarag tarag commented May 23, 2022

When non-typed Group items are rendered automatically in lists as oh-label-item, or following listWidget metadata application, the label displayed is 'NULL'. On these un-typed Group items this can be corrected without hiding information side-effect since there will never be a state with any meaning. It will always be NULL.

This PR forces the label not to be displayed.

Combined with last PR #1396, it allows automatic generation of Model UI that makes sense and does not require manual metadata adjustment when equipment are configured as accordion. This also fixes automatically generated hierarchical Group browsing list pages. For typed groups, manual setting of metadata (PR #1285) is still required if needed.

Signed-off-by: Gautier Taravella <tarag@mailbox.org>
@tarag tarag requested a review from a team as a code owner May 23, 2022 15:19
@relativeci
Copy link

relativeci bot commented May 23, 2022

Job #405: Bundle Size — 10.71MB (-0.03%).

56d9243 vs a3ea712

Changed metrics (5/10)
Metric Current Baseline
Initial JS 1.67MB(-0.04%) 1.67MB
Cache Invalidation 60.47% 66.24%
Chunks 218(-0.46%) 219
Assets 240(-0.41%) 241
Modules 1509(-0.07%) 1510
Changed assets by type (1/7)
            Current     Baseline
JS 8.65MB (-0.04%) 8.65MB

View Job #405 report on app.relative-ci.com

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

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

Agreed on the principle, should be fine as the group should (hopefully) have a meaningful state only when it has a groupType.
Another option could simply be checking whether item.state === 'NULL'.

@ghys ghys merged commit c8edabd into openhab:main May 29, 2022
@ghys ghys added enhancement New feature or request main ui Main UI labels May 29, 2022
@ghys ghys added this to the 3.3 milestone May 29, 2022
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.

2 participants