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

[basicUI] Mappings with only one entry not correctly rendered #1131

Closed
1 of 4 tasks
lolodomo opened this issue Jul 14, 2021 · 1 comment · Fixed by #1132
Closed
1 of 4 tasks

[basicUI] Mappings with only one entry not correctly rendered #1131

lolodomo opened this issue Jul 14, 2021 · 1 comment · Fixed by #1132
Labels
bug Something isn't working

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Jul 14, 2021

Which UI are you reporting an issue for?

  • Basic UI
  • HABPanel
  • HABot
  • CometVisu

The problem

Mappings with only one entry are not correctly rendered.

My item:

Switch MuteAutoNoUpdate "mute (no autoupdate)" <mute> {channel="xxx"}

My sitempa:

    Frame label="Mappings - autoupdate" {
        Switch item=MuteAutoNoUpdate
        Switch item=MuteAutoNoUpdate mappings=[ON="Muet"] 
        Switch item=MuteAutoNoUpdate mappings=[ON="Mute", OFF="Listen"] 
    }

The sound is muted so the item state is OFF.
Here is how it looks when I open the page:
image

The second widget (at right) is not as expected, it should be shown as "ppushed". It should be rendered similar as with the third widget.

Expected behavior

It shoud like this when I open the page while the device is muted:
image

And like this when the device is unmuted:
image

The problem is clearly in SwitchRenderer where "mdl-button--accent" is not set when there is only one button !

@lolodomo lolodomo added the bug Something isn't working label Jul 14, 2021
@lolodomo
Copy link
Contributor Author

Note that it is working well in Android app.

lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Jul 14, 2021
Fix openhab#1131

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
kaikreuzer pushed a commit that referenced this issue Jul 24, 2021
Fix #1131

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant