Skip to content

Semantic tags: Apply description texts for Point/Property/Equipment #4750

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

Merged
merged 28 commits into from
May 18, 2025

Conversation

andrewfg
Copy link
Contributor

Relates to #4746

Pinging @mherwege / @jimtng / @jlaur

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg requested a review from a team as a code owner April 25, 2025 15:06
Copy link
Contributor

@jimtng jimtng left a comment

Choose a reason for hiding this comment

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

Thanks for the massive work done here.

A few comments:

  • I think that all the "Related to ..." are too vague and should just be removed.
  • Sentence casing or Title Casing?
  • @merwege, do you think that when the description is the same as the label, we should just not set a description here, and in the UI it can do something like description || label ?

andrewfg and others added 17 commits April 25, 2025 18:13
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg
Copy link
Contributor Author

all the "Related to ..." are too vague and should just be removed.

OK

Sentence casing or Title Casing?

Sentence

do you think that when the description is the same as the label, we should just not set a description here, and in the UI it can do something like description || label ?

It shows the label anyway. And the description underneath. So it's Ok to leave the description blank (which therefore just leaves an empty line)..

@andrewfg andrewfg requested a review from jimtng April 25, 2025 17:29
@mherwege
Copy link
Contributor

It shows the label anyway. And the description underneath. So it's Ok to leave the description blank (which therefore just leaves an empty line)..

At the moment, it does not show it in the semantic picker. I was intending to make it a tooltip. This would allow longer, more descriptive, text. The label is also not shown at the moment. This should be short and can be multiple words. I intend to (optionally) show these. The only thing shown is the name.

@mherwege
Copy link
Contributor

  • @mherwege, do you think that when the description is the same as the label, we should just not set a description here, and in the UI it can do something like description || label ?

My intention was to use a tooltip and show a tooltip icon when there is a description available. I see this as help for the user to choose the right category. Look at the existing longer text for Indoor.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@mherwege
Copy link
Contributor

I wouldn’t include a description if it is the same as the label or one of the synonyms. That doesn’t add value and I would rather have it to clarify usage.

@andrewfg
Copy link
Contributor Author

Based on the above feedbacks, I shall end up stripping away most of the applied description texts again.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@mherwege
Copy link
Contributor

Based on the above feedbacks, I shall end up stripping away most of the applied description texts again.

Sorry about that. I appreciate all your effort on this.

@andrewfg
Copy link
Contributor Author

:)

andrewfg added 2 commits May 12, 2025 18:55
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg
Copy link
Contributor Author

@mherwege I resolved the merge conflict, so I think it would be good to actually merge this asap (before someone comes up with any other new tags)

@andrewfg andrewfg requested a review from mherwege May 12, 2025 18:03
@mherwege
Copy link
Contributor

Is DefaultSemanticTags.java generated, or does it need to be reviewed separately as well?

@mherwege
Copy link
Contributor

LGTM after the 2 remarks I made.

@andrewfg
Copy link
Contributor Author

Is DefaultSemanticTags.java generated, or does it need to be reviewed separately as well?

It is generated. So not required to be reviewed.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg requested a review from mherwege May 12, 2025 21:51
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@holgerfriedrich
Copy link
Member

@andrewfg could you pls rebase and re-run the generator?
Thanks!

btw: do you know if installing with profile -Pgenerate-tag-classes should work with Windows? I have some issues getting the generator to work in Windows? Linux works fine, but I cant get it to run on Windows...

@andrewfg
Copy link
Contributor Author

do you know if installing with profile -Pgenerate-tag-classes should work with Windows?

As I recall it does work. But maybe it creates files with CRLF line endings rather than LF? In that case I use Visual Studio to do a manual search and replace.

andrewfg added 2 commits May 18, 2025 16:14
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg
Copy link
Contributor Author

pls rebase and re-run the generator?

@holgerfriedrich done!

Copy link
Member

@holgerfriedrich holgerfriedrich 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 a lot!
Unfortunately it will take some time until we get this into the translated property files....

@holgerfriedrich holgerfriedrich merged commit c4c2c4c into openhab:main May 18, 2025
4 checks passed
@holgerfriedrich holgerfriedrich added the enhancement An enhancement or new feature of the Core label May 18, 2025
@holgerfriedrich holgerfriedrich added this to the 5.0 milestone May 18, 2025
@andrewfg andrewfg deleted the tag-descriptions branch May 18, 2025 16:05
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants