-
-
Notifications
You must be signed in to change notification settings - Fork 243
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 and item config parsing adjustments #1843
Conversation
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Job #954: Bundle Size — 15.75MiB (+0.04%).Metrics (2 changes)
Total size by type (3 changes)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to add Items from textual definition with the example from the core PR, however the icon value is not recognized and therefore not set. It seems that the functions to process the value are missing in items-lexer.nearley as well as for sitemap-lexer.nearley.
Look at #1839. Would be great if it could be fixed before tomorrow. |
#1839 is a different issue, the problem with the Item lexer is that whatever you type as icon name is not saved to the Item, because the lexer does not work properly. |
I will need to check again. I thought it was working for me with the examples from the core PR and this this PR. If it is not for you, there may still be something wrong. Unfortunately, I will not be able to do it before tomorrow night. I don’t have access to my PC at the moment. |
Is this PR only needed to make the new feature work or is it needed to fix something? |
Probably only if you want to import in Main UI items containing the extended syntax with several segments for the category/icon ? |
It seems it is only needed to to allow the new icon syntax in the „Add Items from textual definition“ and Sitemap editor’s codetab. |
Ok, so it‘s not blocking M2. |
BTW, I‘ve just checked what the transformation editor in the UI does after the recent core changes. It needs some adjustment to be fully operational, but IMO it‘s non-blocking since nothing really broke. I‘ve already worked a bit on the adjustment, should be able to open a PR soon. |
Signed-off-by: Mark Herwege <[email protected]>
I know it is a bit late for the milestone, but I committed a fix to the parser. |
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
@ghys Feel free to take over the review, I won’t have the time to finish it anytime soon. |
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM & everything works fine now!
I have just one minor question regarding the unit tests, thanks for improving them!
bundles/org.openhab.ui/web/src/pages/settings/pages/sitemap/__tests__/sitemap-edit_jest.spec.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Mark Herwege <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The sitemap DSL parser was not able to correctly recognize negative numbers. Regression from #1843 where explicit recognition of hyphens was introduced for new icon syntax. Signed-off-by: Mark Herwege <[email protected]>
This solves the issue in main UI created by openhab/openhab-core#3539 and openhab/openhab-core#3378.