Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add error status to dropdown button #727

Merged
merged 3 commits into from
Feb 10, 2022

Conversation

TCL735
Copy link
Contributor

@TCL735 TCL735 commented Feb 9, 2022

Supports influxdata/ui#3404 - a new set of dropdowns will be put into Band View's options to allow the user to select only valid column names. The 3 different columns that have selectable names must choose different names. Indicate to the user that a dropdown has an invalid selection.

This is a minimalist feature. It simply allows the Dropdown.Button to add a box-shadow when the component status is error. Completely opt-in and backwards compatible.

Changes

  • adds component status to Dropdown buttons
  • adds box shadow to indicate error status for Dropdown buttons

Screenshots

Screen Shot 2022-02-08 at 5 21 50 PM

UPDATED to use a solid border without shadow:
Screen Shot 2022-02-10 at 2 25 21 PM

Checklist

Check all that apply

  • Updated documentation to reflect changes
  • Added entry to top of Changelog with link to PR (not issue)
  • Tests pass
  • Peer reviewed and approved
  • Signed CLA (if not already signed)

@TCL735 TCL735 requested review from juliajames12, mavarius and a team as code owners February 9, 2022 01:22
@TCL735 TCL735 requested a review from a team February 9, 2022 01:22
@TCL735 TCL735 force-pushed the feat_dropdown_invalid_item_selected branch from f768cee to a3c777a Compare February 10, 2022 01:41
@TCL735
Copy link
Contributor Author

TCL735 commented Feb 10, 2022

Regarding adding an error message for more visibility: yes, this is possible and is done by the consumer of Clockface. Within the <Dropdown> component, a developer may add additional elements adjacent to the <Dropdown.Button> as an error message. This is not done by default in Clockface because Clockface should not have an opinion on whether an error message is necessary or not.

@mavarius
Copy link
Collaborator

mavarius commented Feb 10, 2022

image

Let's make it have a solid border like the input components instead of the glow. It might also be good to get the red alert icon in there but that's not required for the issue fix.

@TCL735
Copy link
Contributor Author

TCL735 commented Feb 10, 2022

Updated to use solid border without shadow.

@TCL735 TCL735 merged commit f62a77b into master Feb 10, 2022
@TCL735 TCL735 deleted the feat_dropdown_invalid_item_selected branch February 10, 2022 22:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants