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

[$250] Web - Chat - Composer is expanded briefly when returning to chat after creating new workspace #39252

Closed
1 of 6 tasks
lanitochka17 opened this issue Mar 29, 2024 · 24 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Needs Reproduction Reproducible steps needed

Comments

@lanitochka17
Copy link

lanitochka17 commented Mar 29, 2024

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.58-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: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Profile > Workspaces
  3. Create a new workspace
  4. Click back button on the top left
  5. Click Chat icon on the bottom left

Expected Result:

The composer will not appear expanded when returning to chat

Actual Result:

The composer appears expanded briefly when returning to chat after creating a new workspace

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

Add any screenshot/video evidence

Bug6431596_1711719926703.composer_expand.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0187883d3354706f5f
  • Upwork Job ID: 1776300112459137024
  • Last Price Increase: 2024-04-12
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

Triggered auto assignment to @thienlnam (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

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.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Mar 29, 2024

Proposal

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

Web - Chat - Composer is expanded briefly when returning to chat after creating new workspace

What is the root cause of that problem?

Problem related with the fact that when we get isComposerFullSize from onyx it equals {}

isComposerFullSize: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${getReportID(route)}`,
initialValue: false,
},

And then we get true from {}

isComposerFullSize={!!isComposerFullSize}

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

So maybe the problem is related to onyx
But as an alternative we can add a check for object using selector and return false in this case

isComposerFullSize: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${getReportID(route)}`,
initialValue: false,
},

What alternative solutions did you explore? (Optional)

NA

@thienlnam thienlnam added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 29, 2024
@thienlnam
Copy link
Contributor

Not a blocker - added to the main tracking issue

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@thienlnam thienlnam added the External Added to denote the issue can be worked on by a contributor label Apr 5, 2024
@melvin-bot melvin-bot bot changed the title Web - Chat - Composer is expanded briefly when returning to chat after creating new workspace [$250] Web - Chat - Composer is expanded briefly when returning to chat after creating new workspace Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0187883d3354706f5f

@thienlnam
Copy link
Contributor

Opening this to external contributors!

@melvin-bot melvin-bot bot added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Overdue labels Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

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

@mananjadhav
Copy link
Collaborator

So maybe the problem is related to onyx

@ZhenjaHorbach Sorry I didn't understand what you mean by this ^.

@lanitochka17 Can you confirm if this is only for Web or all platforms?

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Apr 6, 2024

So maybe the problem is related to onyx

@ZhenjaHorbach Sorry I didn't understand what you mean by this ^.

@lanitochka17 Can you confirm if this is only for Web or all platforms?

I wanted to say that this is unexpected behavior that onyx returns us an empty object instead of a boolean value when opening a report first time

But after testing it seems to me that this is no longer reproducible

@lingniker
Copy link

it's return enpty string .

/** Get the currently viewed report ID as number */
function getReportID(route: ReportScreenNavigationProps['route']): string {
// The report ID is used in an onyx key. If it's an empty string, onyx will return
// a collection instead of an individual report.
return String(route.params?.reportID || '');
}

we get isComposerFullSize from onyx it equals {} , instead of an individual report.

isComposerFullSize: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${getReportID(route)}`,
initialValue: false,
},

so !!isComperFullSize = true . This is wrong. Resulting in a problem with sub-component rendering.

isComposerFullSize={!!isComposerFullSize}

The latest code has fixed this problem.
return String(route.params?.reportID || 0);

/** Get the currently viewed report ID as number */
function getReportID(route: ReportScreenNavigationProps['route']): string {
// The report ID is used in an onyx key. If it's an empty string, onyx will return
// a collection instead of an individual report.
return String(route.params?.reportID || 0);
}

Copy link

melvin-bot bot commented Apr 7, 2024

📣 @lingniker! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@ZhenjaHorbach
Copy link
Contributor

it's return enpty string .

/** Get the currently viewed report ID as number */
function getReportID(route: ReportScreenNavigationProps['route']): string {
// The report ID is used in an onyx key. If it's an empty string, onyx will return
// a collection instead of an individual report.
return String(route.params?.reportID || '');
}

we get isComposerFullSize from onyx it equals {} , instead of an individual report.

isComposerFullSize: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${getReportID(route)}`,
initialValue: false,
},

so !!isComperFullSize = true . This is wrong. Resulting in a problem with sub-component rendering.

isComposerFullSize={!!isComposerFullSize}

The latest code has fixed this problem. return String(route.params?.reportID || 0);

/** Get the currently viewed report ID as number */
function getReportID(route: ReportScreenNavigationProps['route']): string {
// The report ID is used in an onyx key. If it's an empty string, onyx will return
// a collection instead of an individual report.
return String(route.params?.reportID || 0);
}

Good point )
But in any case, this bug is not relevant
Because we reverted the PR that caused this regression
#39377

@melvin-bot melvin-bot bot added the Overdue label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

@mananjadhav, @thienlnam Whoops! This issue is 2 days overdue. Let's get this updated quick!

@lingniker
Copy link

Contributor details
Your Expensify account email: nikertest1@proton.com
Upwork Profile Link: https://www.upwork.com/freelancers/~018c7eaf42c45f292f

Copy link

melvin-bot bot commented Apr 10, 2024

⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

@lingniker
Copy link

Contributor details
Your Expensify account email: lingyuanping@outlook.com
Upwork Profile Link: https://www.upwork.com/freelancers/~018c7eaf42c45f292f

Copy link

melvin-bot bot commented Apr 10, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Copy link

melvin-bot bot commented Apr 11, 2024

@mananjadhav, @thienlnam Huh... This is 4 days overdue. Who can take care of this?

@thienlnam thienlnam added the Bug Something is broken. Auto assigns a BugZero manager. label Apr 11, 2024
Copy link

melvin-bot bot commented Apr 11, 2024

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot removed the Overdue label Apr 11, 2024
@thienlnam
Copy link
Contributor

So to double check, this is no longer reproducible?

Copy link

melvin-bot bot commented Apr 12, 2024

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

Copy link

melvin-bot bot commented Apr 12, 2024

@mananjadhav @anmurali @thienlnam this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@anmurali
Copy link

Yea, I cannot reproduce on staging or prod. Closing.

@melvin-bot melvin-bot bot removed the Overdue label Apr 17, 2024
@anmurali anmurali added Needs Reproduction Reproducible steps needed Overdue and removed 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 Overdue labels Apr 17, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

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 Engineering Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

7 participants