-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: required field error is not displayed when clearing the field #61653
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
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@ahmedGaber93 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@ahmedGaber93 Sorry for the ping, I linked the wrong issue in this PR. @s77rt Will review this PR. |
@@ -101,7 +101,6 @@ function GroupChatNameEditPage({report}: GroupChatNameEditPageProps) { | |||
inputID={INPUT_IDS.NEW_CHAT_NAME} | |||
role={CONST.ROLE.PRESENTATION} | |||
ref={inputCallbackRef} | |||
shouldShowClearButton |
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.
I think we can keep the clear button here because an empty string is a valid option here
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.
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.
I don't think we want to keep the clear X
icon here. We said only:
- Search input fields (added here: Fix: add search bar to lists with items above 15 #60488).
- DatePicker input field
This is neither, right? CC: @Expensify/design for vis
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.
Yeah, I think we can probably get rid of it here based on our little framework. Curious what the other designers think though!
I could see it being helpful here in the case where we think it's likely that you would rename a group to something custom. But I am also fine following our framework for consistency's sake.
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.
Makes sense to me
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.
If you want the group name to take its default name you'd have to clear the input and submit an empty string. I think the clear button serves as an indication here that is an empty string is allowed.
Generally I would say that if an empty string is meaningful we should have a clear button.
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.
If you want the group name to take its default name you'd have to clear the input and submit an empty string.
Personally I think this is pretty weird behavior and doesn't feel expected to me. It would make more sense to me if you could not save an empty string here.
@@ -72,7 +72,6 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin | |||
onChangeText={(renamedName) => setNewName(renamedName)} | |||
ref={inputCallbackRef} | |||
defaultValue={name} | |||
shouldShowClearButton |
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.
I think we still need this as it's coming from #50163
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.
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.
@dannymcclain as the linked issue was yours. Are we deeming this one a "search input field" because it technically has the search query named stored before you rename it?
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.
No I don't think so. IMO this input is more like a Group name than the search input, so we can probably ditch this one too. cc @Expensify/design
(I think in our little framework we decided that we're not super worried about the usability of clearing a long text field, so we decided to remove the clear button from inputs like this, group names, etc)
Reviewer Checklist
Screenshots/VideosiOS: HybridAppJS bundle issue. NAB MacOS: Chrome / Safariweb.mov |
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.
Thank you!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Explanation of Change
Fixed Issues
$ #60243
PROPOSAL: #60243 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2025-05-08.at.22.36.30.mov
Android: mWeb Chrome
Screen.Recording.2025-05-08.at.22.36.54.mov
iOS: Native
Screen.Recording.2025-05-08.at.22.37.28.mov
iOS: mWeb Safari
Screen.Recording.2025-05-08.at.22.37.54.mov
MacOS: Chrome / Safari
Screen.Recording.2025-05-08.at.22.38.13.mov
MacOS: Desktop
Screen.Recording.2025-05-08.at.22.38.38.mov