-
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
[Pending Checklist] [$1000] Description - Cursor half visible when hitting Enter and going to next line of Task Description #21271
Comments
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Description - Cursor half visible when hitting Enter and going to next line of Task Description What is the root cause of that problem?Root cause is the custom autoGrowHeight styles which we are using by passing the autoGrowHeight prop to dynamically update the height of App/src/pages/tasks/TaskDescriptionPage.js Lines 77 to 91 in 82558a1
What changes do you think we should make in order to solve the problem?This is more of an hack but you could see that for first 3-4 lines it partially hides the cursor and post that, it behaves well. const [height, setHeight] = useState(60);
...................
<TextInput
containerStyles={[styles.autoGrowHeightMultilineInputNew(height)]}
onContentSizeChange={(e) => setHeight(e.nativeEvent.contentSize.height)}
>
</TextInput> autoGrowHeightMultilineInputNew: (height) => ({
height: height,
minHeight: 60
}), ResultsWhat alternative solutions did you explore? (Optional)None |
@greg-schroeder this should be opened again |
Please check this proposal. This will solve the all kind of issues related to auto-grow |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?The root cause of the issue is the difference in behaviour of the Text Component on different platforms (web, iOS and Android). React Native Web uses white-space: pre-wrap to render new lines and spaces
https://snack.expo.dev/@fabrizio.bertoglio/grounded-croissant React Native uses native Layout APIs to calculate the View height and sets the height of the View onMeasure
snack https://snack.expo.dev/@fabrizio.bertoglio/grounded-croissant When the Text has some text in the new line:
When the Text has an empty line:
iOS What changes do you think we should make in order to solve the problem?https://reactnative.dev/docs/tutorial#whats-going-on-here
react-native-community/discussions-and-proposals#496
React Native is based on Web Standards. For this reason, iOS and Android should uniform to Web. What alternative solutions did you explore? (Optional)Fixing the issue in react-native-web and adding a new line when using |
I can reproduce this, @greg-schroeder (albeit in a different place in the product but there are proposals in here that will address both) - #21205 did not fix this issue. |
Hey I am coming from #21905 aren't these two issues found on different places of the product? Doesn't that make me eligible for reporting @sophiepintoraetz , thanks. |
@Nathan-Mulugeta - they are different areas but the same issue - #21905 has been closed out as a dupe. I see you are prolific in reporting issues, so I think you'll make this one up quickly!. |
Thanks for your reply and for the compliment @sophiepintoraetz 🙂 |
I think we have to fix the root cause of the problem. Please check my proposal |
ProposalPlease re-state the problem that we are trying to solve in this issue.Autogrow height does not respond to line breaks when pressing enter. What is the root cause of that problem?We are using a hidden App/src/components/TextInput/BaseTextInput.js Lines 387 to 395 in 7e908b1
It is a general browser behaviour to remove any trailing newlines, this means the What changes do you think we should make in order to solve the problem?We can add a character such as a zero width space (
This won't affect the measurement seeing as it doesn't take up any space, it will just trigger the browser to accept the line break when the user presses enter, and update the textinput height accordingly. What alternative solutions did you explore? (Optional)None |
Hey folks, I just closed another duplicate issue (#21449) on yet another page of the product. I think that whatever solution we go with, it should be a global solution that fixes this across all pages. |
@greg-schroeder this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Job added to Upwork: https://www.upwork.com/jobs/~014922e794dd66dc4a |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.45-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-08-02. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Assigned July 20 -> Merged July 24th (2 business days) Payment summary: Reporter: Applause (no payment) |
Payment made to @s-alves10. @sobitneupane will be paid via NewDot. Payments are outlined above. |
@sobitneupane you're up on the checklist! |
bump @sobitneupane |
It was a known issue in the PR. #19377 (comment)
It was a known issue. Discussion : #19377 (comment)
yes
|
Regression Test Proposal
Do we agree 👍 or 👎 |
Requested payment on newDot. |
Test looks good to me |
Reviewed the details for @sobitneupane. $1,500 approved for payment in NewDot. |
Filed regression test issue, closing |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue found when executing PR #20775
Action Performed:
Expected Result:
Cursor should be well visible on the second line
Actual Result:
Cursor partially visible until any other character is type after Enter
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.30.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6101939_video_03__8_.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: