-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Improve UX of modifying single line text inputs populated with very long text #40313
Comments
Triggered auto assignment to @twisterdotcom ( |
|
Job added to Upwork: https://www.upwork.com/jobs/~01644d92b58b119eb5 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 ( |
@nkdengineer Removing your proposal as it's insufficient. Please post a full proposal once you are done drafting it. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Improve UX of modifying single line text inputs populated with very long text What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?To fix this issue we can update App/src/components/TextInput/BaseTextInput/index.native.tsx Lines 384 to 390 in 5e3cca2
Draft button ( It is a little unclear when we should show the button (Immediately after entering the first character or at a certain length of text?) Following this comment I think we'd better disable this button for mobile devices
I don't remember that we have a round icon with x ![]() And in case Group name we can update group name screen to show error when we clear input and try to save Plus we need to add new param to make this optional But for this we need to add condition to show element only when isLoading is false (But here it already depends on the design team ) What alternative solutions did you explore? (Optional)NA |
@marcaaron I doubt we should add such icon to help clear long text. I see following downsides if adding the clearing icon
I tested deleting text on both Android (using emulator) and iOS devices and I found that we only need to long press the text, press
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Adding an What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?To address the issue of improving the user experience when modifying single line text inputs populated with very long text, we propose the following changes:
{isFocused && !isReadOnly && shouldShowClearButton && value && (
<Tooltip text="Clear">
<PressableWithoutFeedback
style={[styles.mt4, styles.ml1]}
onMouseDown={(e) => {
e.preventDefault();
}}
onPress={(e) => {
onInputChange?.('');
onClearInput?.(inputID);
}}
>
<ClearIcon />
</PressableWithoutFeedback>
</Tooltip>
)}
onClearInput: (key) => {
// Implement side effects when clearing input
// For example:
setValue('');
},
{isFocused && !isReadOnly && shouldShowClearButton && value && (
// Render the clear button
)}
What alternative solutions did you explore? (Optional)N/A |
@twisterdotcom What do you think of this #40313 (comment) ? Is it really necessary to add this feature? cc @marcaaron |
Thank you all for your proposals. I think we can go with @nkdengineer 's proposal if we want to add this feature. I also added my thoughts about this feature here #40313 (comment). @nkdengineer was first to figure out the key ideas for implementing this feature, and their refined version includes additional details that need consideration. However, it's advisable to avoid excessive editing to maintain clarity. 🎀👀🎀 C+ reviewed |
Current assignee @marcaaron is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@eh2077 While I appreciate the concerns I don't share them. This is a fairly common pattern. The problem with the current design is that the field will always be very full of text if you invite a few people or more so it's an improvement over long press, select all, delete (which is harder to perform). |
📣 @eh2077 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@marcaaron Can you give me a design for the "Clear" icon? Thanks |
Triggered auto assignment to @dannymcclain ( |
Here is the I thought we already had it in |
@dannymcclain Please finalize the size of the button and its position. Below are the results when I set the height and width both to 18.
|
We generally do base4 for all of our sizing, so I have a feeling this should be 20x20. Will wait for Danny to chime in though! |
Yeah let's stick with 20x20! I'm fine with the default image you've shown there. |
Looks like this was deployed to prod 5 days ago, so I need to pay @eh2077 and @nkdengineer in a few days right? Not sure why the automation didn't work. |
Payment Summary:
No regression requirement for new feature. |
Coming from https://expensify.slack.com/archives/C05RECHFBEW/p1712957589044869
Problem
When updating an existing Group chat "name" field in the App it is difficult to clear the pre-populated text in mobile views and on mobile devices.
Example:
Solution
Let's solve this problem by adding an x circle icon to allow clearing the input.
Let's also do this in a cross-platform way and universally across different areas of the app where it might be useful.
Deliverables:
TextInput
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: