Skip to content

[$500] Chat -In offline, while edit comment, tapping on emoji picker moves cursor to compose box. #31709

Closed

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.2-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap profile icon----Preferences
  3. Toggle on forced offline
  4. Navigate to LHN
  5. Tap on a report
  6. Send a message
  7. Long press the sent message and select edit comment
  8. Tap emoji picker and note the cursor

Expected Result:

In offline, while edit comment, tapping on emoji picker must not move cursor to compose box

Actual Result:

In offline, while edit comment, tapping on emoji picker moves cursor to compose box.

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6287169_1700659269186.cursor.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f8d143448ba4dda0
  • Upwork Job ID: 1727338662062862336
  • Last Price Increase: 2023-11-29

Activity

  1. added
    External
    Daily
    Bug
    on Nov 22, 2023
  2. changed the title [-]Chat -In offline, while edit comment, tapping on emoji picker moves cursor to compose box.[/-] [+][$500] Chat -In offline, while edit comment, tapping on emoji picker moves cursor to compose box.[/+] on Nov 22, 2023
  3. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  4. melvin-bot commented on Nov 22, 2023

    @melvin-bot
  5. added
    Help Wanted
    on Nov 22, 2023
  6. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    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
  7. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  8. DylanDylann commented on Nov 22, 2023

    @DylanDylann
    Contributor

    Proposal

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

    Chat -In offline, while edit comment, tapping on emoji picker moves cursor to compose box

    What is the root cause of that problem?

    if (_.contains([messageEditInput, emojiButtonID], relatedTargetId)) {

    In here relatedTargetID is null, so we call setShouldShowComposeInputKeyboardAware(true). It makes the main composer appear

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

    if (_.contains([messageEditInput, emojiButtonID], relatedTargetId)) {

    In here we should check both targetID and relatedTargetID like that

    const relatedTargetId = lodashGet(event, 'nativeEvent.relatedTarget.id') || lodashGet(event, 'nativeEvent.target.id');;
    

    What alternative solutions did you explore? (Optional)

  9. dummy-1111 commented on Nov 22, 2023

    @dummy-1111
    Contributor

    Proposal

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

    In edit composer, tapping on emoji picker button shows the main composer and moves cursor to it

    What is the root cause of that problem?

    if (_.contains([messageEditInput, emojiButtonID], relatedTargetId)) {
    return;
    }
    setShouldShowComposeInputKeyboardAware(true);

    As you can see above, we don't show the main composer when the edit composer gets blurred by emoji button or by tapping on other edit composer.

    The problem here is that the id of emoji button was not properly set. When emoji button is tapped, relatedTargetId is empty.
    Please check the following code

    <GenericPressable
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...props}
    ref={ref}
    // change native accessibility props to web accessibility props
    focusable={focusable}
    tabIndex={!accessible || !focusable ? -1 : 0}
    role={props.accessibilityRole as Role}
    id={props.nativeID}
    aria-label={props.accessibilityLabel}

    We removed the nativeID in this PR and used id instead intentionally, but we didn't remove the above code. so id props is redefined as undefined

    This is the root cause

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

    Simply removing the below code would solve the issue

    Note: We might need to remove all nativeID from the project

    Result
    31709.mp4

    What alternative solutions did you explore? (Optional)

  10. abdulrahuman5196 commented on Nov 24, 2023

    @abdulrahuman5196
    Contributor

    I am not able to understand the issue itself. Could someone explain more?

    In offline, while edit comment, tapping on emoji picker moves cursor to compose box.
    what does this mean actually? Should the cursor be in search or something else?

  11. dummy-1111 commented on Nov 24, 2023

    @dummy-1111
    Contributor

    @abdulrahuman5196

    Try the following steps in mobile web platforms

    1. Navigate to any chat
    2. Send a message
    3. Switch the message just sent to edit mode
    4. Tap on the emoji button in the edit composer
    5. Check if the main composer is shown and the emoji picker is opened
  12. 27 remaining items

  13. mallenexpensify commented on Dec 11, 2023

    @mallenexpensify
    Contributor

    Reopening to try to reproduce via Browserstack. Will get to soon.

  14. mallenexpensify commented on Dec 12, 2023

    @mallenexpensify
    Contributor

    @s-alves10

    In offline, while edit comment, tapping on emoji picker moves cursor to compose box.

    So, the issue is that the cursor briefly shows in the compose box before showing the emoji?
    image

    If so, I don't think this is a high-priority bug.

  15. dummy-1111 commented on Dec 12, 2023

    @dummy-1111
    Contributor

    @mallenexpensify

    This issue isn't related to whether offline or online. I think this is a bug worth fixing

  16. mallenexpensify commented on Dec 12, 2023

    @mallenexpensify
    Contributor

    the issue is that the cursor briefly shows in the compose box before showing the emoji?

    @s-alves10 this is the bug though, correct?

  17. dummy-1111 commented on Dec 13, 2023

    @dummy-1111
    Contributor
  18. melvin-bot commented on Dec 13, 2023

    @melvin-bot

    @mallenexpensify @abdulrahuman5196 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

  19. abdulrahuman5196 commented on Dec 14, 2023

    @abdulrahuman5196
    Contributor

    This issue was already C+ approved. @mallenexpensify can we assign @yuwenmemon for internal engineer review?

  20. melvin-bot commented on Dec 18, 2023

    @melvin-bot

    @mallenexpensify, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  21. abdulrahuman5196 commented on Dec 18, 2023

    @abdulrahuman5196
    Contributor
  22. mallenexpensify commented on Dec 18, 2023

    @mallenexpensify
    Contributor

    I'm going to close, I think this is low priority and not worth investing internal engineering resources.
    More info here https://expensify.slack.com/archives/C01GTK53T8Q/p1702496349813859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineeringExternalHelp Wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions