-
Notifications
You must be signed in to change notification settings - Fork 1k
Allowing to reverse icon in DateInput #6160
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
Allowing to reverse icon in DateInput #6160
Conversation
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.
Just a few notes:
-
We should support both passing the reverse prop through
inputProps
and having thereverse
prop on DateInput. Ideally just using thereverse
prop is preferred but we need to support passing reverse throughinputProps
for backwards compatibility since we supported this in the past. See https://github.com/grommet/grommet/pull/6160/files for a similar discussion about the icon prop on DateInput. -
When the icon is on the left side of DateInput the tab order is messed up. The focus moves first to the input and then the icon. It should move to the icon first and then the input since that is how it is visually ordered.
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.
looks good to me! tab order goes from icon to input, following logical order. allows for reverse
prop and passing in via inputProps
for backwards compatibility
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.
Coming along nicely, just a few comments
3042aa4
to
5f25beb
Compare
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.
Looks good!
What does this PR do?
Fixed issue #6153 which consists of allowing to reverse icon in DateInput.
Where should the reviewer start?
Just access:
http://localhost:9001/?path=/story/input-dateinput-format--format
What testing has been done on this PR?
Unit test to Match Snapshot.
How should this be manually tested?
It is not necessary
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
No
What are the relevant issues?
No
Screenshots
Do the grommet docs need to be updated?
Yes, to add the new DateInput prop,
reverse
Should this PR be mentioned in the release notes?
No
Is this change backwards compatible or is it a breaking change?
No