Skip to content

Things list: Add dynamic blue dot to status badges if status detail is set#4069

Merged
florian-h05 merged 20 commits intoopenhab:mainfrom
andrewfg:thing-info-badge
Apr 20, 2026
Merged

Things list: Add dynamic blue dot to status badges if status detail is set#4069
florian-h05 merged 20 commits intoopenhab:mainfrom
andrewfg:thing-info-badge

Conversation

@andrewfg
Copy link
Copy Markdown
Contributor

@andrewfg andrewfg commented Mar 31, 2026

The purpose of this PR is to allow a dynamic information badge ("blue dot") to be applied to Things in the overview page in order to mark when the Thing has a special status. For example "low battery" or "firmware update available".

Resolves #4063

When a Thing's statusInfo.status === 'ONLINE' and its statusInfo.description is not empty then this PR adds a "blue dot" information badge to the overview list as shown in the screenshot below.

image image

Example code for setting and removing the badge

ThingStatusInfo status = thing.getStatusInfo();

// show the badge
updateStatus(status.getStatus(), status.getStatusDetail(), "I have a special status");

// hide the badge
updateStatus(status.getStatus(), status.getStatusDetail(), null);

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@relativeci
Copy link
Copy Markdown

relativeci Bot commented Mar 31, 2026

#5307 Bundle Size — 13.84MiB (~+0.01%).

85c658e(current) vs b84ffb9 main#5280(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#5307
     Baseline
#5280
No change  Initial JS 1.41MiB 1.41MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 16.18% 16.18%
No change  Chunks 697 697
No change  Assets 816 816
No change  Modules 2817 2817
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 126 126
No change  Duplicate Packages 1 1
Bundle size by type  Change 2 changes Regression 2 regressions
                 Current
#5307
     Baseline
#5280
Regression  JS 11.53MiB (~+0.01%) 11.53MiB
Regression  CSS 901.98KiB (+0.03%) 901.7KiB
No change  IMG 638.41KiB 638.41KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  Other 847B 847B

Bundle analysis reportBranch andrewfg:thing-info-badgeProject dashboard


Generated by RelativeCIDocumentationReport issue

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Mar 31, 2026
@dilyanpalauzov
Copy link
Copy Markdown
Contributor

Why not just render the description directly, instead of putting the description in a tooltip?

@andrewfg
Copy link
Copy Markdown
Contributor Author

andrewfg commented Apr 1, 2026

Why not just render the description directly

The text may be quite long. So on the Things list page we show a badge. Whereas on the Thing detail page the text is shown in full.

Also the idea is that the text may be dynamically added or removed so the badge is only displayed when there is something special to say. For example it can display a badge when there is a software update available, and no badge when there is not.

In other words the badge only shows when something new has happened. Rather like the blue dot your inbox when there is mail. Or the blue dot on an app on your phone when it has an update. Or when a device has a low battery, etc.


EDIT: I added some sample code for setting and removing the badge in the top post above.

@dilyanpalauzov
Copy link
Copy Markdown
Contributor

The text may be quite long. So on the Things list page we show a badge. Whereas on the Thing detail page the text is shown in full.

I agree this is a valid point of view.

@andrewfg andrewfg changed the title [MainUI] Add info badge for Things [MainUI] Add dynamic info badge for Things Apr 1, 2026
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg

This comment was marked as outdated.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrewfg added 5 commits April 2, 2026 15:10
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg changed the title [MainUI] Add dynamic info badge for Things [MainUI] Add dynamic info "blue dot" badge for Things Apr 5, 2026
andrewfg added 2 commits April 9, 2026 18:58
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg marked this pull request as draft April 10, 2026 19:08
@andrewfg andrewfg marked this pull request as ready for review April 10, 2026 22:27
Comment thread bundles/org.openhab.ui/web/src/pages/settings/things/things-list.vue Outdated
andrewfg and others added 5 commits April 11, 2026 12:43
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Copy link
Copy Markdown
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!

I've changed the intendation of the new styling to ensure it is encapsulated inside .things-list.

@florian-h05 florian-h05 changed the title [MainUI] Add dynamic info "blue dot" badge for Things Things list: Add dynamic blue dot to status badges indicating status detail Apr 20, 2026
@florian-h05 florian-h05 changed the title Things list: Add dynamic blue dot to status badges indicating status detail Things list: Add dynamic blue dot to status badges if status detail is set Apr 20, 2026
@florian-h05 florian-h05 added this to the 5.2 milestone Apr 20, 2026
@florian-h05 florian-h05 merged commit 48f187c into openhab:main Apr 20, 2026
5 checks passed
@andrewfg andrewfg deleted the thing-info-badge branch April 20, 2026 15:31
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.

[MainUI] Add dynamic info badge for Things

3 participants