Skip to content

[$1000] Web - The invite message disappears if resized the window screen for copy pasted message #20929

Closed

Description

@kbecciv

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


Action Performed:

  1. Go to staging dot on web chrome and go to any workspace
  2. Go to invite members and on the invite message field, copy paste a long message multiple times
  3. Now resize the screen to the small screen and notice that the message you copy pasted earlier disappears and the default message is shown
  4. Now on the small screen only, copy paste a long message again and maximize the windows size to full screen
  5. This time also, notice that the copy pasted texts disappeared when you switched to a larger screen

Expected Result:

The invite message should not disappear if resized the window screen for copy pasted message

Actual Result:

The invite message disappears if resized the window screen for copy pasted message
Platforms: web chrome

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.28.3

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

error-2023-06-10_11.01.32.1.mp4
Recording.731.mp4

Expensify/Expensify Issue URL:

Issue reported by: @priya-zha

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686374637223249

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0130acef183c3013c6
  • Upwork Job ID: 1671582870354886656
  • Last Price Increase: 2024-01-03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 16, 2023
  2. melvin-bot commented on Jun 16, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 16, 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
  4. dummy-1111 commented on Jun 16, 2023

    @dummy-1111
    Contributor

    Proposal

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

    Invite message disappears when window resizes

    What is the root cause of that problem?

    The root cause is as in here. Remounting is the reason.
    #20522 (comment)

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

    We can use the inbuilt function of the form.

    1. Add shouldSaveDraft props to the TextInput here

      <TextInput
      ref={(el) => (this.welcomeMessageInputRef = el)}
      inputID="welcomeMessage"
      label={this.props.translate('workspace.inviteMessage.personalMessagePrompt')}
      autoCompleteType="off"
      autoCorrect={false}
      autoGrowHeight
      textAlignVertical="top"
      containerStyles={[styles.autoGrowHeightMultilineInput]}
      defaultValue={this.state.welcomeNote}
      value={this.state.welcomeNote}
      onChangeText={(text) => this.setState({welcomeNote: text})}
      />

    2. To initialize the state with draft value, get draftValues from onyx store with the following code above this line

            draftValues: {
                key: () => `${ONYXKEYS.FORMS.WORKSPACE_INVITE_MESSAGE_FORM}Draft`
            },
    

    Initialize the state with draft here

                welcomeNote: _.get(props, ['draftValues', 'welcomeMessage'], this.getDefaultWelcomeNote()),
    
    1. Clear the draft values on submit here
            FormActions.clearDraftValues(ONYXKEYS.FORMS.WORKSPACE_INVITE_MESSAGE_FORM);
    

    clearDraftValue function is as follows in FormActions.js

    function clearDraftValues(formID) {
        Onyx.set(`${formID}Draft`, null);
    }
    

    This works as expected

    Result
    20929_mac_chrome.mp4

    What alternative solutions did you explore? (Optional)

  5. melvin-bot commented on Jun 19, 2023

    @melvin-bot

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

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 21, 2023
  7. changed the title [-]Web - The invite message disappears if resized the window screen for copy pasted message[/-] [+][$1000] Web - The invite message disappears if resized the window screen for copy pasted message[/+] on Jun 21, 2023
  8. melvin-bot commented on Jun 21, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 21, 2023
  10. melvin-bot commented on Jun 21, 2023

    @melvin-bot

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

  11. melvin-bot commented on Jun 21, 2023

    @melvin-bot

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

  12. 46 remaining items

  13. adelekennedy commented on Nov 14, 2023

    @adelekennedy
    Contributor

    #20404 is now closed - @abdulrahuman5196 can we move this one forward or are their linked issues I should be clocking as well?

  14. abdulrahuman5196 commented on Nov 16, 2023

    @abdulrahuman5196
    Contributor

    Seems long time since this issue was held on hold. Will check and update

  15. abdulrahuman5196 commented on Nov 16, 2023

    @abdulrahuman5196
    Contributor

    Can we remove hold, so that we can re-test the issue?

  16. adelekennedy commented on Dec 19, 2023

    @adelekennedy
    Contributor

    ah sorry @abdulrahuman5196 I never saw this comment! Updating

  17. changed the title [-][HOLD for #20404] [$1000] Web - The invite message disappears if resized the window screen for copy pasted message[/-] [+][$1000] Web - The invite message disappears if resized the window screen for copy pasted message[/+] on Dec 19, 2023
  18. melvin-bot commented on Dec 20, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  19. dummy-1111 commented on Dec 20, 2023

    @dummy-1111
    Contributor

    I wasn't able to reproduce the issue. I think we can close this

  20. melvin-bot commented on Dec 27, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  21. mvtglobally commented on Dec 31, 2023

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  22. melvin-bot commented on Jan 3, 2024

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsMonthlyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions