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

[HOLD] Web - Cursor gets half hidden on Welcome message page #21905

Closed
1 of 6 tasks
kbecciv opened this issue Jun 29, 2023 · 14 comments
Closed
1 of 6 tasks

[HOLD] Web - Cursor gets half hidden on Welcome message page #21905

kbecciv opened this issue Jun 29, 2023 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Jun 29, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Create a workspace > go to announce > click on header
  2. Click on Settings > welcome message
  3. Type something and hit enter key

Expected Result:

Cursor should be fully visible

Actual Result:

Cursor gets half hidden when a new line is created

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.34-1
Reproducible in staging?: y
Reproducible in production?: y
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

2023-06-28.23.03.45.1.mp4
Recording.2277.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687982750576449

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e84d49c89d9b9d8e
  • Upwork Job ID: 1674610343722532864
  • Last Price Increase: 2023-06-30
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@s-alves10
Copy link
Contributor

s-alves10 commented Jun 29, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Cursor gets half hidden on enter in Welcome message page

What is the root cause of that problem?

We get the required height of the TextInput here

<Text
style={[
...this.props.inputStyle,
this.props.autoGrowHeight && styles.autoGrowHeightHiddenInput(this.state.width, maxHeight),
styles.hiddenElementOutsideOfWindow,
styles.visibilityHidden,
]}
onLayout={(e) => this.setState({textInputWidth: e.nativeEvent.layout.width + 2, textInputHeight: e.nativeEvent.layout.height})}
>
{this.state.value || this.props.placeholder}
</Text>

We use Text component and its height doesn't increase when the text is ended with line break.

This is the root cause

What changes do you think we should make in order to solve the problem?

We can add space character to the end of the text if text is ended with line-break.

    {props.value ? props.value + (props.value.endsWith('\n') ? ' ' : '') : props.placeholder}

This works as expected.

Result
20905.mp4

What alternative solutions did you explore? (Optional)

In stead of above code, we can use add '\n' character to the text.

    {props.value ? props.value + '\n' : props.placeholder}

@sophiepintoraetz
Copy link
Contributor

@sophiepintoraetz sophiepintoraetz added the External Added to denote the issue can be worked on by a contributor label Jun 30, 2023
@melvin-bot melvin-bot bot changed the title Web - Cursor gets half hidden on Welcome message page [$1000] Web - Cursor gets half hidden on Welcome message page Jun 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01e84d49c89d9b9d8e

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

@aimane-chnaif
Copy link
Contributor

Dupe of #21271

@Nathan-Mulugeta
Copy link

Isn't that issue on task description but this one is on welcome message page @aimane-chnaif

@s-alves10
Copy link
Contributor

My proposal is a general solution for auto-grow TextInput component

@sophiepintoraetz
Copy link
Contributor

I which case, I'll put this issue on hold for #21271 and @Nathan-Mulugeta you can still get the reporting bonus.

@sophiepintoraetz sophiepintoraetz changed the title [$1000] Web - Cursor gets half hidden on Welcome message page [HOLD] Web - Cursor gets half hidden on Welcome message page Jul 3, 2023
@Nathan-Mulugeta
Copy link

Thanks @sophiepintoraetz that'll be great. Have you noticed that #21271 is closed?

@fabOnReact
Copy link
Contributor

I was working on this issue during the weekend. I posted my proposal at #21271 (comment). Thanks

@sophiepintoraetz
Copy link
Contributor

Ah, apologies, I've been turned around by the closed issue. Seeing as #21205 did not fix this issue, and the timeline says Applause (22 June) reported this bug before Nathan (29 June), @Nathan-Mulugeta, you are not eligible for the reporting bonus, I'm afraid.

@fabriziobertoglio1987 and @s-alves10 - I see you have dropped proposals in #21271 so let's continue the conversation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants