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

[sitemap] Buttongrid as container for new Button elements #4223

Merged
merged 1 commit into from
May 18, 2024

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented May 8, 2024

Related to #4173

Signed-off-by: Laurent Garnier lg.hc@free.fr

@lolodomo lolodomo requested a review from a team as a code owner May 8, 2024 10:01
@lolodomo lolodomo marked this pull request as draft May 8, 2024 10:01
@lolodomo lolodomo force-pushed the sitemap_button_element branch 4 times, most recently from 7a3552c to 034d909 Compare May 9, 2024 11:18
@lolodomo
Copy link
Contributor Author

lolodomo commented May 9, 2024

The proposed syntax for the Button is :

Button item=<item> [label=<label>] [icon=<icon>] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]
Button item=<item> [label=<label>] [staticIcon=<icon>] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]
Button item=<item> [label=<label>] [icon=[...]] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]

Explanations of the parameters:

  • The position of the button in the grid is defined by the row and column parameters.
  • The label parameter defines the text to display in the button. If not present, the value of the command (click parameter) is used as text.
  • The icon parameter defines the icon to display in the button. If not present, the button will contain a text. The icon can be dynamic by defining rules in the icon parameter.
  • By default, a button is stateful. It is stateless if stateless parameter is present.
  • A button is a click button by default, the command to send to the item is defined by the click parameter. Press & release behaviour is possible by setting the click and release parameters.
  • Label and icon color can be dynamic using the labelcolor and iconcolor parameters.
  • Visibility of the button can be dynamic using the visibility parameter.

Such Button element is valid only inside a Buttongrid element.

@lolodomo lolodomo force-pushed the sitemap_button_element branch 3 times, most recently from 44db537 to 1aed720 Compare May 10, 2024 09:21
Related to openhab#4173

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo marked this pull request as ready for review May 10, 2024 10:06
lolodomo added a commit to lolodomo/openhab-webui that referenced this pull request May 10, 2024
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this pull request May 10, 2024
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this pull request May 11, 2024
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this pull request May 11, 2024
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
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.

Thanks!

@kaikreuzer kaikreuzer merged commit 3b9a971 into openhab:main May 18, 2024
5 checks passed
@kaikreuzer kaikreuzer added the enhancement An enhancement or new feature of the Core label May 18, 2024
@kaikreuzer kaikreuzer added this to the 4.2 milestone May 18, 2024
@lolodomo lolodomo deleted the sitemap_button_element branch May 18, 2024 12:53
kaikreuzer pushed a commit to openhab/openhab-webui that referenced this pull request May 18, 2024
lolodomo added a commit to lolodomo/openhab-core that referenced this pull request May 21, 2024
Problem introduced by openhab#4223

checkFramesInWidgetList for LinkableWidget was triggering an error when the Buttongrid element has no parameter set.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
ccutrer pushed a commit to openhab/openhab-jruby that referenced this pull request May 21, 2024
This is to adapt to the change in core:
openhab/openhab-core#4223

A separate PR will be created to add support for the new `Button` widget

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
kaikreuzer pushed a commit that referenced this pull request May 26, 2024
Problem introduced by #4223

checkFramesInWidgetList for LinkableWidget was triggering an error when the Buttongrid element has no parameter set.

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
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants