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 editor: Trim spaces from color value #2091

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

mherwege
Copy link
Contributor

When generating the sitemap DSL from a UI configured sitemap with color conditions, if the color in the condition has a leading space, it will be included in the color string.
While this does not have an impact on the sitemap functionality (it works), it is an issue if one would copy this sitemap to a sitemap file.
This PR strips the blanks from the color.

See #2082 and the example provided there:

sitemap page_c6c037636f label="New Sitemap" {
    Text item=KitchenLights labelcolor=[KitchenLights == ON =" red"] label="Lights are: [%s]"
}

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@mherwege mherwege requested a review from a team as a code owner September 25, 2023 11:01
@florian-h05 florian-h05 changed the title [sitemap mainUI] trim spaces from color value Sitemap editor: Trim spaces from color value Sep 25, 2023
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Sep 25, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Sep 25, 2023
@florian-h05 florian-h05 merged commit 35c3ae0 into openhab:main Sep 25, 2023
4 checks passed
@mherwege mherwege deleted the sitemap_ui_spaces_fix branch September 26, 2023 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants