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

Get the list of semantic tags from REST #1822

Closed
jimtng opened this issue Apr 1, 2023 · 0 comments · Fixed by #1882
Closed

Get the list of semantic tags from REST #1822

jimtng opened this issue Apr 1, 2023 · 0 comments · Fixed by #1882
Labels
enhancement New feature or request main ui Main UI

Comments

@jimtng
Copy link
Contributor

jimtng commented Apr 1, 2023

The problem

Currently the semantic tags are hard coded into semantics.js along with the translations in the i18n asset. Not only would this need to be (manually?) synchronized with the core, but it also prevents the ability to add additional semantic tags on the fly, a feature that currently doesn't exist, but can be done in the future. I have implemented such a feature in the jruby library, and perhaps one day it can be merged into core.

Your suggestion

Create REST endpoints in core for providing the list of semantic tags + labels + relevant locales e.g. /semantics/ /semantics/locale_code to replace the current hard coded list.

It will also get tag synonyms and descriptions

@jimtng jimtng added enhancement New feature or request main ui Main UI labels Apr 1, 2023
ghys pushed a commit that referenced this issue Jun 28, 2023
)

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant