Skip to content
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

fix: use popper for form validation messages #1105

Merged
merged 8 commits into from
Jun 30, 2020
Merged

Conversation

jacobdevera
Copy link
Contributor

Description

  • use FormValidationOverlay to display validation messages. Remove direct renders of FormMessage, which consumes DOM space
  • do not display validation message until field is focused (per https://experience.sap.com/fiori-design-web/form-field-validation/)
  • refactoring keyboard navigation of Select to rely on focusManager in Popover instead
  • add firstFocusIndex prop to Popover to indicate a focusable item to focus first

Affected components with validation

  • ComboBoxInput
  • DatePicker
  • FormInput
  • FormTextarea
  • InputGroup
  • MultiSelect
  • Select
  • StepInput

Out of Scope

If a component did not already have keyboard navigation, it was not added

fixes #1095

@jacobdevera jacobdevera self-assigned this Jun 24, 2020
@netlify
Copy link

netlify bot commented Jun 24, 2020

Deploy preview for fundamental-react ready!

Built with commit 3c17a65

https://deploy-preview-1105--fundamental-react.netlify.app

@jacobdevera jacobdevera requested review from meganaconley and a team June 24, 2020 21:38
@jbadan
Copy link
Contributor

jbadan commented Jun 25, 2020

This looks really good! Two things:

  1. comboboxinput, multiInput, localizationeditor, searchInput, select - when I click into the input - the dropdown opens, when I tab into it only the validation opens. I'm totally fine with this being a followup if you need to get this DatePicker fix to production asap

  2. something went wonky with inputgroup styles

Screen Shot 2020-06-25 at 6 37 59 AM
Screen Shot 2020-06-25 at 6 37 22 AM

@jacobdevera
Copy link
Contributor Author

jacobdevera commented Jun 29, 2020

  1. comboboxinput, multiInput, localizationeditor, searchInput, select - when I click into the input - the dropdown opens, when I tab into it only the validation opens.

I believe this is consistent with previous behavior; they should only open on click. However, form validation should appear on focus as well. But a deeper dive for these components could be done in a separate PR.

  1. something went wonky with inputgroup styles

@jacobdevera jacobdevera merged commit f912d9c into master Jun 30, 2020
@jacobdevera jacobdevera deleted the fix/form-validation branch June 30, 2020 23:13
@prsdthkr prsdthkr linked an issue Jul 14, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StepInput Validation Popover widths are off FormMessage should not consume DOM space
2 participants