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] Prefer icon over text in buttons (switch element) #2085

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented Sep 23, 2023

Related to openhab/openhab-core#3441

Depends on openhab/openhab-core#3809

Icons will not be used if icons are nbot enabled (app setting).

Signed-off-by: Laurent Garnier [email protected]

@lolodomo lolodomo added enhancement New feature or request basic ui Basic UI awaiting other PR Depends on another PR labels Sep 23, 2023
@lolodomo lolodomo requested a review from a team as a code owner September 23, 2023 12:05
@lolodomo
Copy link
Contributor Author

lolodomo commented Sep 23, 2023

Here is an example with these three element defined like that:

Switch item=TestCommand mappings=[0=NULL,1=UNDEF,2="Set 1",3="Set 2"]
Switch item=TestCommand mappings=[0=NULL=f7:house,1=UNDEF="material:favorite",2="Set 1"=if:lucide:activity-square,3="Set 2"=chart]
Switch item=TestCommand mappings=[0=NULL=f7:house,1=UNDEF,2="Set 1"=if:lucide:activity-square,3="Set 2"]

The first element shows that nothing is changed if no icon is provided.
The second element shows how it looks when an icon is provided and also that it work whatever the icon source.
The third element shows it is possible to mix buttons with text and buttons with icon.
image

Related to openhab/openhab-core#3441

Depends on openhab/openhab-core#3809

Icons will not be used if icons are nbot enabled (app setting).

Signed-off-by: Laurent Garnier <[email protected]>
@lolodomo lolodomo removed the awaiting other PR Depends on another PR label Oct 2, 2023
@lolodomo
Copy link
Contributor Author

lolodomo commented Oct 2, 2023

Just waiting for a new build of the core framework to rebuild this PR.

@wborn
Copy link
Member

wborn commented Oct 2, 2023

I have triggered a build. 🚀

@lolodomo lolodomo added rebuild trigger a new Jenkins job and removed rebuild trigger a new Jenkins job labels Oct 2, 2023
@lolodomo
Copy link
Contributor Author

lolodomo commented Oct 2, 2023

I have triggered a build. 🚀

Thank you.

A rebase of my branch was also required.
Build is now OK.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Thank you!

@kaikreuzer kaikreuzer merged commit 23550c6 into openhab:main Oct 3, 2023
2 checks passed
@kaikreuzer kaikreuzer added this to the 4.1 milestone Oct 3, 2023
@lolodomo lolodomo deleted the basicui_mapping_icon branch October 3, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants