-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
Icons shall not be changed in rules #2222
Conversation
✅ Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).
To edit notification comments on pull requests, go to your Netlify site configuration. |
676a47a
to
462e915
Compare
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.
IMO this information should be added to the Items config page, possibly somewhere around there: https://github.com/openhab/openhab-docs/blob/main/configuration/items.md#icons.
The categories concepts page is outdated and not promoted on the docs website and IMO also does not add any information that is not found somewhere else, so IMHO it should be removed.
462e915
to
f15119e
Compare
I have deleted concepts/categories.md and added |
8401c3e
to
ea3ecea
Compare
configuration/items.md
Outdated
@@ -322,6 +322,8 @@ Note that image files with the wrong file ending will be ignored. | |||
|
|||
Users may substitute their own icon for an icon from the default icon set by placing a file in the `$OPENHAB_CONF/icons/classic/` folder with the same filename as the name of the icon being substituted. | |||
|
|||
Icons (categories) should not be changed dynamically via Rules. |
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 would rather put this in after line 299 and rephrase it a bit:
Please note that icons (also know as categories) are not meant to be changed dynamically via rules.
|
||
## Thing Categories | ||
|
||
The Thing type definition allows to specify a category. |
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 noticed that this part of the page is actually referenced by the developer Thing XML docs:
https://github.com/search?q=repo%3Aopenhab%2Fopenhab-docs%20categories.html&type=code
I am not sure how to process, but AFAIK the available categories are basically the list of icons with the icon names in the typical Java class naming style (e.g. FrontDoor instead of lowercase icon name frontdoor).
The category of a Thing and channels is AFAIK only setting the icon and not doing anything else.
Therefore I propose to remove the references to this page, and instead write under the Thing categories and the channel categories heading something like:
Thing [channel] categories are used to set an icon for that Thing [channel]. The available categories correspont with the available icons of the classic icon set, however categories are written in Java class-naming style, e.g.
FrontDoor
instead of lowercasefrontdoor
.
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 do not see how can Channels or Things get an icon/a category in file-based definitions. Is it possible to set categories for Things and Channels only at development time, and these are then fixed forerer in the .jar
file?
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.
Exactly, these are defined by the add-on developer inside the thing-type and channel-type XML definitions and used by the UI as suggested icons when you „create Items from equipment“.
ea3ecea
to
4dbf14b
Compare
The last changes represent my understanding of the comment above. |
4dbf14b
to
f9be963
Compare
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.
Overall looks good, I‘ve added a few comments.
Please do not force push from now on, but simply add a new commit.
.vuepress/docs-sidebar.js
Outdated
@@ -68,6 +68,7 @@ module.exports = [ | |||
'concepts/discovery', | |||
'concepts/audio', | |||
'concepts/units-of-measurement', | |||
'concepts/profiles', |
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.
Can you please remove this change? Let‘s focus on the icons in this PR.
developers/bindings/thing-xml.md
Outdated
@@ -58,7 +58,7 @@ In that way, a generic thing type could be listed for users and a corresponding | |||
|
|||
### Thing Categories | |||
|
|||
A description about thing categories as well as an overview about which categories exist can be found in our [categories overview](../../concepts/categories.html). | |||
Thing categories are used to set an icon for that Thing. The available categories correspond with the available icons of the classic icon set, however categories are written in Java class-naming style, e.g. FrontDoor instead of lowercase frontdoor. |
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.
Thing categories are used to set an icon for that Thing. The available categories correspond with the available icons of the classic icon set, however categories are written in Java class-naming style, e.g. FrontDoor instead of lowercase frontdoor. | |
Categories are used to provide meta information about Things. Thing categories describe how the physical device **looks like**. UIs can use this information e.g. to render icons. | |
The available categories correspond with the [available icons of the classic iconset]({{base}}/configuration/iconsets/classic/), however categories are written in Java class-naming style, e.g. `FrontDoor` instead of lowercase `frontdoor`. |
developers/bindings/thing-xml.md
Outdated
@@ -411,7 +408,7 @@ public class ExampleHandlerFactory extends BaseThingHandlerFactory { | |||
|
|||
### Channel Categories | |||
|
|||
A description about channel categories as well as an overview about which categories exist can be found in out [categories overview](../../concepts/categories.html). | |||
Channel categories are used to set an icon for that Channel. The available categories correspond with the available icons of the classic icon set, however categories are written in Java class-naming style, e.g. FrontDoor instead of lowercase frontdoor. |
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.
Channel categories are used to set an icon for that Channel. The available categories correspond with the available icons of the classic icon set, however categories are written in Java class-naming style, e.g. FrontDoor instead of lowercase frontdoor. | |
Channel categories are used to provide meta information about channels. Channel categories describe the **functional purpose** of the channel and are used by the UI to render icons. | |
The available categories correspond with the [available icons of the classic iconset]({{base}}/configuration/iconsets/classic/), however categories are written in Java class-naming style, e.g. `BatteryLevel` instead of lowercase `batterylevel`. |
developers/bindings/thing-xml.md
Outdated
@@ -434,7 +431,7 @@ Inside the thing types XML file channel groups can be defined like this: | |||
``` | |||
|
|||
The channel group type is defined on the same level as the thing types and channel types. | |||
The group type must have a label, an optional description, and an optional [category](../../concepts/categories.html). | |||
The group type must have a label, an optional description, and an optional category (icon). |
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.
The group type must have a label, an optional description, and an optional category (icon). | |
The group type must have a label, an optional description, and an optional category (e.g. used to render an icon). |
f9be963
to
8c472b0
Compare
• insert the conclusion from openhab/openhab-core#3958
8c472b0
to
88fc2df
Compare
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 now.
Haven’t I clearly stated that you should NOT force push from my last comment on?
This is the last time I will review a PR from you with force pushes in the review process.
• insert the conclusion from openhab/openhab-core#3958