-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add option to view one attribute in the sidebar #1254
base: master
Are you sure you want to change the base?
Conversation
I don't think it makes sense to have a dedicated checkbox just for the speed. We should probably support any position attribute. |
label={t('deviceShowAttribute')} | ||
value={attributes.deviceShowAttribute || ''} | ||
onChange={(e) => { | ||
setAttributes({ ...attributes, deviceShowAttribute: e.target.value }); |
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.
Is there an easy way to clear this attribute when empty value is selected?
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.
In the existing code of the page, attributes are normally not removed when they are set with empty values; they are kept with an empty string or a default value. To maintain consistency, I manage empty values in a similar way:
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.
OK, I think it's ok to keep as is. It's a bit different though because most of the other attributes are basically expected to have something. This one is basically optional.
Add option to view speed of the device in the sidebar
With the option to activate it or not to each user's taste.