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

Add (invalid) validation styling to form components #4082

Closed
vertonghenb opened this issue Oct 28, 2020 · 7 comments
Closed

Add (invalid) validation styling to form components #4082

vertonghenb opened this issue Oct 28, 2020 · 7 comments
Labels
closed:obsolete No longer valid community:request Issues specifically reported by a member of the community. feature A new feature

Comments

@vertonghenb
Copy link
Contributor

What feature are you requesting?
Adding validation styles when the form component is invalid.

What would be the benefit of adding this feature?
Uniform styling of validation errors.

What solution would be ideal for you?
using an attribute aria-invalid

What alternatives have you considered?
Adding custom styling

Attach screenshots or images add detail to your request:
Some examples:

image

image

@vertonghenb vertonghenb added the status:triage New Issue - needs triage label Oct 28, 2020
@EisenbergEffect EisenbergEffect added area:fast-components community:request Issues specifically reported by a member of the community. feature A new feature status:needs-investigation Needs additional investigation and removed status:triage New Issue - needs triage labels Nov 2, 2020
@EisenbergEffect EisenbergEffect added status:needs-design and removed status:needs-investigation Needs additional investigation labels Nov 2, 2020
@janechu
Copy link
Collaborator

janechu commented Jan 28, 2021

The @microsoft/fast-tooling-react migration to use the @microsoft/fast-components is effectively blocked without visual validation. The use of a pink accent color border for such inputs as <fast-text-field> is also confusing as from a user perspective this should have a red border if it is invalid. Having pink on a form filled with such inputs lends the impression that all fields are currently invalid.

I would suggest changing the border to a neutral color as well as things like the <fast-checkbox> background.

@bheston
Copy link
Collaborator

bheston commented Apr 29, 2021

I agree this is something we should support in the base components, as well as for unblocking the tooling work. I think from the styling perspective this will be easier to support once the new color work lands because it will make additional palettes like success and error easier to support. Obviously the other plumbing needs to be in place for the validation logic first still.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the warning:stale No recent activity within a reasonable amount of time label Apr 16, 2022
@fcollonval
Copy link
Contributor

Hey I would like to add this to our toolkit. But it would definitely be better if it can be upstream. Is there some pointers on the API design to implement this feature - presumably linked to that issue too #2442?

@stale stale bot removed the warning:stale No recent activity within a reasonable amount of time label Apr 23, 2022
@bheston
Copy link
Collaborator

bheston commented May 10, 2022

That would be great. I would still love to see this come in as a feature. In general we keep the API consistent with any existing public API, like https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation#validation-related_attributes. I suspect there is probably a tie-in with the form-associated portion of the components, which I don't have a ton of familiarity around, but perhaps you could propose modifications to that spec.md file through a PR and people can comment there.

I'm happy to help with design implications if you run into anything. For context, we've considered adding 'error' and 'success' base colors and palettes to support this. Now that we'd be officially supporting this in the foundation it seems time to add them. Of course, with the fast-components updates, that belongs in the future color and design package I've drafted in #5895 but will be writing up in proposal form soon.

@chrisdholt
Copy link
Member

I think we'll want to move this over to the CLI repository where the components will be living. We can certainly look to take up the feature request there.

@janechu
Copy link
Collaborator

janechu commented May 28, 2024

Unfortunately @microsoft/fast-components has been deprecated for some time now.

@janechu janechu closed this as completed May 28, 2024
@janechu janechu added the closed:obsolete No longer valid label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:obsolete No longer valid community:request Issues specifically reported by a member of the community. feature A new feature
Projects
None yet
Development

No branches or pull requests

6 participants