-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Item edit: Dynamically load UoM dimensions #2120
Conversation
Fixes openhab#1926. Load the UoM dimensions for UoM Item types from the REST API instead of hard-coding them into the UI. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Job #1187: Bundle Size — 15.79MiB (+0.2%).Warning Bundle contains 16 duplicate packages – View duplicate packages Warning Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more – View changed packages Bundle metrics
Bundle size by type
View job #1187 report View florian-h05:uom-dimensions-rest branch activity |
<optgroup label="Numbers with Dimensions"> | ||
<option v-for="dimension in types.Dimensions" :key="dimension" :value="'Number:' + dimension" :selected="item.groupType === 'Number:' + dimension"> | ||
{{ 'Number:' + dimension }} | ||
<optgroup label="Numbers with Dimensions (System Unit)"> |
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.
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 added (System Unit)
to explain the unit which is displayed in the picker, but we can remove it.
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 understand, we probably should have a system that better reflects how the underlying things work though - i.e. remove dimensions from the type picker altogether, and have another picker for the dimension appear when Number is picked.
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.
Agreed. I have implemented and pushed this!
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.
That was quick 😅
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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 think this looks quite good!
Fixes #1926.
Awaiting openhab/openhab-core#3838.
Load the UoM dimensions for UoM Item types from the REST API instead of hard-coding them into the UI.