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

[Payment due Sept 6] [$250] Search - Expense page composer loses bottom margin when going offline #46404

Closed
1 of 6 tasks
izarutskaya opened this issue Jul 29, 2024 · 53 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Jul 29, 2024

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: 9.0.13-3
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
*

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create an expense
  3. Go to search
  4. Click on an expense from the expense list
  5. Go offline

Expected Result:

There will be an offline indicator under the composer and the composer will have a bottom margin

Actual Result:

The composer does not have a bottom margin and there is no offline indicator

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

Bug6554985_1722117881417.4_5848162808948069413.mp4

Bug6554985_1722117881426!Screenshot_1

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a491780ac50be9ec
  • Upwork Job ID: 1817922651827967932
  • Last Price Increase: 2024-07-29
Issue OwnerCurrent Issue Owner: @mananjadhav
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

Triggered auto assignment to @isabelastisser (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.

Copy link

melvin-bot bot commented Jul 29, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 29, 2024
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.

@izarutskaya
Copy link
Author

Production

Recording.2656.mp4

@nyomanjyotisa
Copy link
Contributor

Proposal

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

Expense page composer loses bottom margin when going offline

What is the root cause of that problem?

if isOffline we set the minHeight to 0 here

const chatFooterStyles = {...styles.chatFooter, minHeight: !isOffline ? CONST.CHAT_FOOTER_MIN_HEIGHT : 0};

And we no longer show the OfflineIndicator here since we change the condition from !isSmallScreenWidth to !shouldUseNarrowLayout on this PR

{!shouldUseNarrowLayout && (
<View style={styles.offlineIndicatorRow}>{shouldHideComposer && <OfflineIndicator containerStyles={[styles.chatItemComposeSecondaryRow]} />}</View>
)}

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

set the minHeight to 0 only if isOffline && !shouldUseNarrowLayout

const chatFooterStyles = {...styles.chatFooter, minHeight: isOffline && !shouldUseNarrowLayout ? 0 : CONST.CHAT_FOOTER_MIN_HEIGHT};

RESULT
image

What alternative solutions did you explore? (Optional)

@bernhardoj
Copy link
Contributor

Proposal

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

Composer bottom spacing is gone when turn offline in report RHP page.

What is the root cause of that problem?

This happens after we replace isSmallScreenWidth usage with shouldUseNarrowLayout.

<View
style={[
styles.flexRow,
styles.justifyContentBetween,
styles.alignItemsCenter,
(!shouldUseNarrowLayout || (shouldUseNarrowLayout && !isOffline)) && styles.chatItemComposeSecondaryRow,
]}
>
{!shouldUseNarrowLayout && <OfflineIndicator containerStyles={[styles.chatItemComposeSecondaryRow]} />}

The chatItemComposeSecondaryRow style contains the spacing. shouldUseNarrowLayout is true in RHP and when we go offline, both of the conditions become false, so the spacing is gone.

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

Use the previous condition by relying on isSmallScreenWidth.

(!isSmallScreenWidth || (isSmallScreenWidth && !isOffline)) && styles.chatItemComposeSecondaryRow,

The reason we have this style in composer is that in ScreenWrapper, we have an offline indicator that is shown only on a small screen. However, we still want to show the offline indicator for the report screen, whether large or small screen, because it's the central screen.

!isSmallScreenWidth makes sure the spacing is always available on the large screen. (isSmallScreenWidth && !isOffline) allows the spacing to show on the small screen, but only when online (if we show it while offline too, then there will be extra space from the ScreenWrapper offline indicator).

@carlosmiceli carlosmiceli added the External Added to denote the issue can be worked on by a contributor label Jul 29, 2024
@melvin-bot melvin-bot bot changed the title Search - Expense page composer loses bottom margin when going offline [$250] Search - Expense page composer loses bottom margin when going offline Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 29, 2024
@carlosmiceli carlosmiceli removed DeployBlockerCash This issue or pull request should block deployment Help Wanted Apply this label when an issue is open to proposals by contributors DeployBlocker Indicates it should block deploying the API labels Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

@carlosmiceli carlosmiceli added Daily KSv2 and removed Hourly KSv2 labels Jul 29, 2024
@D-01576
Copy link

D-01576 commented Jul 29, 2024

Proposal

Problem Description

There is an issue in the project where the container intended to display the online/offline status is not showing correctly. Specifically, instead of indicating the offline status, the container is being displayed as none.

Issue

There is no margin defined.
Instead of showing the status as offline, the container is being displayed as none.

Solution

The issue can be resolved by ensuring the container correctly shows the online/offline status.

Current Implementation

The relevant div element in the ReportActionCompose.tsx file is structured as follows:

<div data-element="View" data-source-file="ReportActionCompose.tsx" class="css-175oi2r" style="flex-direction: row; justify-content: space-between; align-items: center; height: 15px; margin-bottom: 5px; margin-top: 5px;"></div>

Copy link

melvin-bot bot commented Jul 29, 2024

📣 @Siraj01576! 📣
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>

@D-01576
Copy link

D-01576 commented Jul 29, 2024

Proposal

Problem Description

There is an issue in the project where the container intended to display the online/offline status is not showing correctly. Specifically, instead of indicating the offline status, the container is being displayed as none.

Issue

There is no margin defined.
Instead of showing the status as offline, the container is being displayed as none.

Solution

The issue can be resolved by ensuring the container correctly shows the online/offline status.

Current Implementation

The relevant div element in the ReportActionCompose.tsx file is structured as follows:

<div data-element="View" data-source-file="ReportActionCompose.tsx" class="css-175oi2r" style="flex-direction: row; justify-content: space-between; align-items: center; height: 15px; margin-bottom: 5px; margin-top: 5px;"></div>

@mananjadhav
Copy link
Collaborator

Based on the comment here and the review of the proposals I still feel we should use isSmallScreenWidth. Hence @bernhardoj's proposal looks good to me.

But @bernhardoj as mentioned please import it from useResponsiveLayout and not useWindowDimensions.

@melvin-bot melvin-bot bot removed the Overdue label Aug 20, 2024
@carlosmiceli
Copy link
Contributor

Let's wait for @bernhardoj to confirm and I'll assign, thanks @mananjadhav :)

@bernhardoj
Copy link
Contributor

please import it from useResponsiveLayout and not useWindowDimensions.

useResponsiveLayout is already imported into the file, so we will use it.

Copy link

melvin-bot bot commented Aug 23, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2024
@carlosmiceli
Copy link
Contributor

Should I assign you @bernhardoj ?

@bernhardoj
Copy link
Contributor

Yes, please

@bernhardoj
Copy link
Contributor

PR is ready

cc: @mananjadhav

@isabelastisser
Copy link
Contributor

isabelastisser commented Aug 27, 2024

It looks like PR was not merged yet. Waiting!

@mananjadhav
Copy link
Collaborator

This was deployed to production 5 days ago. This should be ready for payout by 09/06.

@isabelastisser
Copy link
Contributor

Thanks for the update!

@isabelastisser isabelastisser changed the title [$250] Search - Expense page composer loses bottom margin when going offline [Payment due Sept 6] [$250] Search - Expense page composer loses bottom margin when going offline Sep 4, 2024
@isabelastisser isabelastisser added Daily KSv2 and removed Weekly KSv2 labels Sep 4, 2024
@mananjadhav
Copy link
Collaborator

We linked the offending PR here but this is more of an edge case. We still use the isSmallScreenWidth.

Also I think we don't need a regression test for this one. @carlosmiceli wdyt?

@isabelastisser This is ready for payout. Can you please post a payout summary for this one?

@carlosmiceli
Copy link
Contributor

@mananjadhav Yeah, no need for regression test here!

@isabelastisser
Copy link
Contributor

isabelastisser commented Sep 9, 2024

Payment summary:

@mananjadhav, $250 for C+ review. Payment via NewDot
@bernhardoj, $250 for Contributor proposal - Payment via NewDot.

@isabelastisser
Copy link
Contributor

All set!

@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@garrettmknight
Copy link
Contributor

$250 approved for @mananjadhav

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 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
Status: Done
Development

No branches or pull requests