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

Subscription size - Offline indicator show ups on RHP on web layout #43795

Closed
6 tasks done
lanitochka17 opened this issue Jun 15, 2024 · 13 comments
Closed
6 tasks done

Subscription size - Offline indicator show ups on RHP on web layout #43795

lanitochka17 opened this issue Jun 15, 2024 · 13 comments
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 15, 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: 1.4.84-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

Issue found when executing PR #43328

Action Performed:

  1. Go to staging.new.expensify.com/settings/subscription/subscription-size
  2. Go offline

Expected Result:

Offline indicator will not show up on RHP on web layout

Actual Result:

Offline indicator shows up on RHP on web layout

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

Bug6514086_1718444044907.bandicam_2024-06-15_17-32-50-686.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jun 15, 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.

Copy link

melvin-bot bot commented Jun 15, 2024

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

@lanitochka17
Copy link
Author

@arosiclair FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@neonbhai
Copy link
Contributor

neonbhai commented Jun 15, 2024

Proposal

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

Subscription size - Offline indicator show ups on RHP on web layout

What is the root cause of that problem?

We have not disabled the offine indicator in wide screens for the ScreenWrapper here:

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

We should pass the prop shouldShowOfflineIndicatorInWideScreen as false here

<ScreenWrapper
    ...
    shouldShowOfflineIndicatorInWideScreen={false}
>

Now, on wide screens subscrioption settings page is visible in , but it doesn't show the offline indicator yet:

Image Screenshot 2024-06-15 at 11 20 40 PM

To fix this, we will add shouldShowOfflineIndicatorInWideScreen here:

<ScreenWrapper testID={SubscriptionSettingsPage.displayName}>

<ScreenWrapper 
    testID={SubscriptionSettingsPage.displayName} 
    shouldShowOfflineIndicatorInWideScreen
>

Result

Image Screenshot 2024-06-15 at 11 20 12 PM

@cretadn22
Copy link
Contributor

cretadn22 commented Jun 15, 2024

Proposal

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

What is the root cause of that problem?

In the SubscriptionSettingsPage, we do not include the shouldShowOfflineIndicatorInWideScreen parameter, the offline indicator will not be shown on this page (which is the background page)

<ScreenWrapper testID={SubscriptionSettingsPage.displayName}>

In SubscriptionSize, we pass shouldShowOfflineIndicatorInWideScreen parameter

shouldShowOfflineIndicatorInWideScreen

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

It's necessary to include shouldShowOfflineIndicatorInWideScreen parameter in SubscriptionSettingsPage

<ScreenWrapper testID={SubscriptionSettingsPage.displayName}>

Pseudo Code:

<ScreenWrapper
       includeSafeAreaPaddingBottom={false}
       shouldShowOfflineIndicatorInWideScreen
       testID={PreferencesPage.displayName}
       offlineIndicatorStyle={styles.mtAuto} // Need to add this param to ensure that the offline indicator always display at the bottom when the content is short
>

When we show the offline status indicator on this page, we should also include includeSafeAreaPaddingBottom={false} to improve the user experience as we did in other pages like PreferencesPage, ProfilePage,...

// We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked.
if (includeSafeAreaPaddingBottom || (isOffline && shouldShowOfflineIndicator)) {

Also consider to add shouldEnablePickerAvoiding={false}

/** Whether picker modal avoiding should be enabled. Should be enabled when there's a picker at the bottom of a
* scrollable form, gives a subtly better UX if disabled on non-scrollable screens with a submit button */
shouldEnablePickerAvoiding?: boolean;

And also need to remove shouldShowOfflineIndicatorInWideScreen parameter in SubscriptionSize

shouldShowOfflineIndicatorInWideScreen

We need to apply the same adjustment to the other sub-pages as well.

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@neonbhai
Copy link
Contributor

@cretadn22 proposal was updated before your comment 😄

Timestamp 1 Screenshot 2024-06-15 at 11 39 41 PM y>
Timestamp 2 Screenshot 2024-06-15 at 11 40 05 PM

Please submit complete proposals! you have missed the first field. You may also leave out the reminders at the end of the proposal template, that's just for you to remember.

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Jun 16, 2024
@mountiny
Copy link
Contributor

@bernhardoj @tylerkaraszewski @thesahindia this is coming from #43328

demoting as this feature is not available to normal users yet

@mountiny
Copy link
Contributor

cc @MitchExpensify @fabioh8010

@bernhardoj
Copy link
Contributor

@mountiny #43328 doesn't cause this issue.

@arosiclair
Copy link
Contributor

I think this should be fixed by this PR?

@mountiny
Copy link
Contributor

Thanks for noting! I assumed from the issue description that it was that pr

@bernhardoj can you confirm if your pr that Andrew linked resolves this issue?

@bernhardoj
Copy link
Contributor

Yes, it does resolve the issue because shouldShowOfflineIndicatorInWideScreen now won't have an effect in RHP, but I think we can still accept the proposal here to remove the shouldShowOfflineIndicatorInWideScreen from the subscription size RHP page (because it's not needed there) and to shows the offline indicator that is missing for the subscription settings central pane screen (SubscriptionSettingsPage.tsx).

@tylerkaraszewski
Copy link
Contributor

I think we can close this if a different PR has fixed it.

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

No branches or pull requests

9 participants