-
Notifications
You must be signed in to change notification settings - Fork 296
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
Do not hide not secret settings in the web plugin UI #1964
Conversation
@vadimkerr what do you think? |
I personally like all values hidden by default so it's safe to open this page when screen sharing / making screenshots. Hiding all values by default also makes things simpler IMO, so there's only two options – either all settings are hidden or all settings are exposed. |
@vadimkerr I don't like, that all values are hidden. With ability to change phone provider or ESP for inbound email it feels strange to hide chosen options. |
When I want to change the value of a setting, I scroll down for some non-secret setting. But when I press the "Edit" button, the input is cleared, so you can't see the current value, because of this
I close the modal window, scroll up, click the "Show values" button, scroll down again, and only then can I edit the value. After refreshing the page, all the values are hidden again. That's a little cumbersome. |
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.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.
Overall LGTM. Consider adding a jest snapshot test for the two cases where a value is hidden, and when it is not hidden.
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.
nit can the hideValues && item.is_secret
logic be deduplicated into a function on the LiveSettings
class?
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 don't suppose that it's necessary.
I've tried to write a test, but I have not much experience in frontend. All my attempts failed. |
# What this PR does In the web plugin UI Settings -> Env Variables if variable is not secret, do not hide its value. ## Which issue(s) this PR fixes ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com> Co-authored-by: Joey Orlando <joey.orlando@grafana.com> Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
What this PR does
In the web plugin UI Settings -> Env Variables if variable is not secret, do not hide its value.
Which issue(s) this PR fixes
Checklist
pr:no public docs
PR label added if not required)CHANGELOG.md
updated (orpr:no changelog
PR label added if not required)