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 for payment 2023-11-07] [HOLD for payment 2023-11-06] Room - When entering a "Space" while writing Room name "-" is not added #30500

Closed
6 tasks done
kbecciv opened this issue Oct 27, 2023 · 16 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Oct 27, 2023

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


Version Number: 1.3.92.0
Reproducible in staging?: y
Reproducible in production?: n
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. Log in to NewDot with a High traffic account that owns a existing Workspace
  2. Click on the green + button
  3. Click on the "Send Message" option
  4. Click the tab 'Room'
  5. Type some text and hit "Space"

Expected Result:

When entering the room name, entering a "Space" adds a "-" to the name

Actual Result:

When entering a "Space" while writing Room name "-" is not added

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6253189_1698405030184.Recording__1307.mp4
MacOS: Desktop

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Oct 27, 2023
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Triggered auto assignment to @puneetlath (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@BhuvaneshPatil
Copy link
Contributor

This is because of refactor - #29771

@puneetlath
Copy link
Contributor

@kowczarz would you be able to take a look at this?

@blazejkustra
Copy link
Contributor

Kamil is OOO, I'm on it @puneetlath 😄

@BhuvaneshPatil
Copy link
Contributor

I have made the changes for this. I can work on this if it's fine.

Screen.Recording.2023-10-27.at.6.16.48.PM.mov

@puneetlath
Copy link
Contributor

@BhuvaneshPatil we can make this a $250 job. If you're good with that, please share your proposal.

@aimane-chnaif
Copy link
Contributor

If possible, let's fix these regressions in one PR.
Personally, I suggest to revert it.

@puneetlath
Copy link
Contributor

Ah interesting. If it created that many regressions then I agree it's better to revert.

@blazejkustra
Copy link
Contributor

@puneetlath I agree, let's revert and Kamil will be able to fix these once he is back.

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Oct 27, 2023

Proposal

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

What is the root cause of that problem?

  • For first problem(not showing spaces), we are directly assigning value to
    const newState = _.isFunction(propsToParse.valueParser)
    ? {
    ...prevState,
    [inputKey]: propsToParse.valueParser(inputValue),
    [`${inputKey}ToDisplay`]: inputValue,
    }
    without modifying it. That's why we are seeing the name as we typed (without replacing spaces with "-" )
  • For second error, we are not passing default value here in RoomNameInput
    <InputWrapper
    InputComponent={TextInput}
    inputID={inputID}
    ref={forwardedRef}
    disabled={disabled}
    label={translate('newRoomPage.roomName')}
    accessibilityLabel={translate('newRoomPage.roomName')}
    accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
    prefixCharacter={CONST.POLICY.ROOM_PREFIX}
    placeholder={translate('newRoomPage.social')}
    errorText={errorText}
    valueParser={valueParser}
    autoCapitalize="none"
    onBlur={() => isFocused && onBlur()}
    shouldDelayFocus={shouldDelayFocus}
    autoFocus={isFocused && autoFocus}
    maxLength={CONST.REPORT.MAX_ROOM_NAME_LENGTH}
    spellCheck={false}
    shouldInterceptSwipe
    keyboardType={keyboardType} // this is a bit hacky solution to a RN issue https://github.com/facebook/react-native/issues/27449
    />

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

  • For first, like we have added the valueParser we shall add displayParser so that if we add any new input in future we can still be able to adapt to it. That displayParser will be passed from RoomNameInput component. and depending upon if it's not undefined we will use the returned value. The implementation for it is -

    const displayParser = (roomName) => {
        console.debug(roomName);
        if (_.isEmpty(roomName)) {
            return roomName;
        }
        console.debug(RoomNameInputUtils.modifyRoomName(roomName).slice(1));
        return RoomNameInputUtils.modifyRoomName(roomName).slice(1);
    };
    // ignore console statements, we will remove pound sign, because we don't want to display that

    And we will make following changes in FormProvider so that we can use that function

     const newState = _.isFunction(propsToParse.valueParser)
                            ? {
                                  ...prevState,
                                  [inputKey]: propsToParse.valueParser(inputValue),
                                  [`${inputKey}ToDisplay`]: _.isFunction(propsToParse.displayParser) ? 
                                 propsToParse.displayParser(inputValue) : inputValue,
                              }
  • For second bug we shall pass defaultValue in RoomNamePage. and accept that in RoomNameInput

    defaultValue={_.isEmpty(report.reportName) ? '' : report.reportName.slice(1)}

What alternative solutions did you explore? (Optional)

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Oct 27, 2023

@puneetlath
I was not able to repro the unfocused bug so didn't investigate on that. But other two bugs are simple fixes.

@luacmartins
Copy link
Contributor

We're reverting the offending PR

@luacmartins
Copy link
Contributor

luacmartins commented Oct 27, 2023

We can close this issue since we're CPing the revert

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Oct 27, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Oct 30, 2023
@melvin-bot melvin-bot bot changed the title Room - When entering a "Space" while writing Room name "-" is not added [HOLD for payment 2023-11-06] Room - When entering a "Space" while writing Room name "-" is not added Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.92-4 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-11-06. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 31, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-11-06] Room - When entering a "Space" while writing Room name "-" is not added [HOLD for payment 2023-11-07] [HOLD for payment 2023-11-06] Room - When entering a "Space" while writing Room name "-" is not added Oct 31, 2023
Copy link

melvin-bot bot commented Oct 31, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.93-1 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-11-07. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants