-
-
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
Dynamically load the list of semantic tags #1850
Conversation
6146f1b
to
2fea244
Compare
Job #959: Bundle Size — 15.64MiB (-0.66%).Metrics (4 changes)
Total size by type (3 changes)
|
2fea244
to
8c9d179
Compare
cca6481
to
9af96d6
Compare
Rebased |
Signed-off-by: Jimmy Tanagra <[email protected]>
Rebased. If there's a better way, I'll be happy to close this. I really don't know anything about Vue. |
|
I agree with this and I suppose this would be a trivial change.
This part I have zero knowledge of. Is there an example of other things that have implemented Vuex store? I can only find |
Unfortunately I haven’t much experience with Vuex either, but the Vuex Stores are defined here: https://github.com/openhab/openhab-webui/tree/main/bundles/org.openhab.ui/web/src/js/store You can access the store with |
Yes, I've already found that, but nothing has been implemented using it to model from. |
@jimtng I am currently didding into Vuex, I think I can open a PR soon. |
Thank you! I'll close this PR. |
) Supersedes #1850. Closes #1822. Depends on openhab/openhab-core#3559 (already merged now). Adding custom semantic tags is now possible: openhab/openhab-core#3519. This PR loads the Semantic tags when MainUI is loaded the first time and stores them in Vuex. This allows the removal of the hard-coded Semantic tags and the translations from the assets and therefore makes the initial JS smaller. -- Signed-off-by: Florian Hotze <[email protected]>
Depends on openhab/openhab-core#3559 (already merged now)
This is the first time I've ever worked with Vue and modern javascript, so I'd appreciate any tips, thanks!
Adding custom semantic tags is now possible: openhab/openhab-core#3519
This PR loads and and uses the custom tags in the Main UI. As a bonus, the hard coded semantic tags + all the translations are removed from mainui, so they no longer need to be maintained separately. They are now loaded from core through the REST API.
I could use some help in testing this PR because I am not familiar with everything that may be affected. To test, install this jar file from here: https://github.com/jimtng/openhab-webui/releases/tag/semantics-0.0.1 onto the latest snapshot
Even if you don't have any custom semantics, at least test to make sure that everywhere the semantic tags are used, work as expected. I am not entirely familiar with the MainUI especially around its page builder.