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

Support press and release buttons in sitemap generator #4204

Merged
merged 2 commits into from
May 5, 2024

Conversation

mherwege
Copy link
Contributor

@mherwege mherwege commented Apr 30, 2024

Depends on: #4183

This PR adds support for press and release buttons in the sitemap generator.

It will required further testing after merging Depends on: #4183

The sitemap generator in the UI so far was stripping quotes from arguments in mappings and conditions sent to core.

As more functionality is added to the sitemap syntax, this is leading to problems to correctly interpret the arguments containing complex syntax:

  • more characters become not allowed (splitting on =, :, ...)
  • blanks are not always treated properly

To get over this limit, quote stripping should be removed on the UI side, but that means it needs to be done in core when creating the widget from the UIComponent.

Related to: openhab/openhab-webui#2553

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@mherwege mherwege changed the title Handle arguments with quotes in UI provided sitemaps Support press and release buttons in sitemap generator Apr 30, 2024
@lolodomo
Copy link
Contributor

lolodomo commented May 2, 2024

Looks good but you will have to reinject the code for splitting press and release commands as I removed it from #4183

@mherwege
Copy link
Contributor Author

mherwege commented May 2, 2024

@lolodomo I don't know what happened, but the push of my commit seems to have been incomplete. I was sure I did the code for it. Should be OK now.

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM

@J-N-K J-N-K added rebuild Triggers the Jenkins PR build and removed rebuild Triggers the Jenkins PR build labels May 5, 2024
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM

@J-N-K J-N-K added enhancement An enhancement or new feature of the Core sitemap labels May 5, 2024
@J-N-K J-N-K added this to the 4.2 milestone May 5, 2024
@J-N-K J-N-K merged commit d083a53 into openhab:main May 5, 2024
5 checks passed
@mherwege mherwege deleted the sitemap_quotes branch May 5, 2024 20:43
florian-h05 pushed a commit to openhab/openhab-webui that referenced this pull request May 7, 2024
Related to openhab/openhab-core#4183.
Depends on openhab/openhab-core#4204.

This PR implements press/release button support.

Refactor code to allow proper quoting of arguments in mappings and conditions.
Quotes are now preserved, and therefore they need to be removed in core
at usage (openhab/openhab-core#4204).

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
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 sitemap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants