[MainUI] Add dynamic info badge for Things#4069
[MainUI] Add dynamic info badge for Things#4069andrewfg wants to merge 12 commits intoopenhab:mainfrom
Conversation
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
#5227 Bundle Size — 13.24MiB (~+0.01%).7c52105(current) vs d04a233 main#5211(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch andrewfg:thing-info-badge Project dashboard Generated by RelativeCI Documentation Report issue |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
|
Why not just render the description directly, instead of putting the description in a tooltip? |
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. |
I agree this is a valid point of view. |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This comment was marked as outdated.
This comment was marked as outdated.
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>
The purpose of this PR is to allow a dynamic information badge 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'itsstatusInfo.statusDetail === 'NONE'and itsstatusInfo.description is not emptythen this PR adds a "blue dot" information badge to the overview list as shown in the screenshot below.Example code for setting and removing the badge
Signed-off-by: Andrew Fiddian-Green software@whitebear.ch