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

hasWarning prop is not supported in many<*Input> components #2671

Closed
jaikumar-tj opened this issue Dec 19, 2023 · 6 comments
Closed

hasWarning prop is not supported in many<*Input> components #2671

jaikumar-tj opened this issue Dec 19, 2023 · 6 comments
Assignees

Comments

@jaikumar-tj
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Not all the Field components support the orange border when we want to display warning

Describe the solution you'd like
Some components like SelectField accepts the hasWarning props but the other field components like TextField, MoneyField, etc don't have the same prop
Screenshot 2023-12-19 at 16 05 42

Pacman Team and Context Team have an upcoming feature that requires this feature in order to be implemented it in the MC. Otherwise, we have to get rid of the Field component and use the Input & Text components (i.e, replacing <TextField> from product detail page and use <TextInput> and <Text.Body> to achieve the same result) which seems like going against the idea of using the existing components.

@AnjaBuerger , @mariabarrena and @FilPob already discussed and agreed on this.

Ideally all the <*Field> components should have hasWarning feature
Screenshot 2023-12-19 at 16 06 12

Note: We(@commercetools/pacman-team-fe) were originally planning to contribute to the UI-kit repo in the next Q during our feature development stage to enable this feature. If we get any early support from @commercetools/shield-team-fe or @commercetools/context-team-fe that would be much appreciated as well

@jaikumar-tj
Copy link
Contributor Author

Just for transparency, I'll write this here.

It was decided that

  • All <*Input> components should have hasWarning prop to display orange border
  • All <*Field> component should have warning prop to display orange border + warning text below

@commercetools/pacman-team-fe will work on implementing this.

@obulaworld obulaworld changed the title hasWarning prop is not supported in many<*Field> components hasWarning prop is not supported in many<*Input> components Jan 11, 2024
@chloe0592
Copy link
Contributor

Hi @jaikumar-tj, I see your team has started working on this issue. Will your team be handling it all the way through? Thanks!

@obulaworld
Copy link
Contributor

Hi @jaikumar-tj, I see your team has started working on this issue. Will your team be handling it all the way through? Thanks!

Hi @chloe0592 Yes, the final PR for this is here: #2698

@jaikumar-tj
Copy link
Contributor Author

Hi @chloe0592, Please let us know if we need to do anything else other than what Chisom commented. We are not sure about all the procedures.

@jaikumar-tj
Copy link
Contributor Author

@obulaworld can we close this ticket or is there anything pending?

@obulaworld
Copy link
Contributor

We can close it now. Nothing is pending

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

No branches or pull requests

3 participants