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-04-03] [$1000] [Android] Workspaces - The icon of a deleted offline workspace shows a circle instead of the standard shape #15697

Closed
1 of 6 tasks
kbecciv opened this issue Mar 7, 2023 · 31 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Mar 7, 2023

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. Open the App
  2. Log in with any account
  3. Go to Settings -> Workspaces -> Open any workspace
  4. Kill off the internet connection
  5. Delete the workspace

Expected Result:

The icon of the deleted offline workspace should be square's form

Actual Result:

The icon of the deleted offline workspace is broken

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

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

Bug5966627_video_2023-03-07_01-52-39.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f8699d8d61ac8a4c
  • Upwork Job ID: 1637312195651375104
  • Last Price Increase: 2023-03-19
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Mar 7, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Mar 7, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Mar 7, 2023

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

@MelvinBot
Copy link

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

@marcaaron
Copy link
Contributor

This feels pretty edge case to me and imo not a deploy blocker. Considering it's reproducible on production I'm going to remove the blocker and we can just fix this when we fix it.

@marcaaron marcaaron added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 7, 2023
@marcaaron marcaaron removed their assignment Mar 7, 2023
@marcaaron marcaaron added the Bug Something is broken. Auto assigns a BugZero manager. label Mar 7, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@jliexpensify
Copy link
Contributor

Very odd - I tried on Staging .79 and couldn't reproduce on my Pixel 3a:

Screenshot_20230307-132552

I also specifically tried deleting the blue icon, and couldn't reproduce:

Screenshot_20230307-133017

What phone are you using @kbecciv ?

@jliexpensify
Copy link
Contributor

jliexpensify commented Mar 9, 2023

Closing, unable to reproduce on staging v .80-1

@jliexpensify
Copy link
Contributor

Ah sorry @marcaaron - didn't realise you commented. I can't reproduce this on staging or production!

@kbecciv
Copy link
Author

kbecciv commented Mar 9, 2023

@jliexpensify Phone used: Realme6/Android11

@kavimuru
Copy link

kavimuru commented Mar 17, 2023

@jliexpensify Issue is still reproduced. Reopening this issue.

az_recorder_20230317_145346.mp4

@kavimuru kavimuru reopened this Mar 17, 2023
@melvin-bot melvin-bot bot added the Overdue label Mar 17, 2023
@jliexpensify
Copy link
Contributor

I'm on v1.2.87-0 and it looks like it's happening now:

Screenshot_20230319-153413

@melvin-bot melvin-bot bot removed the Overdue label Mar 19, 2023
@jliexpensify jliexpensify changed the title Android - Workspaces - The icon of the deleted offline workspace is broken [Android] Workspaces - The icon of a deleted offline workspace shows a circle instead of the standard shape Mar 19, 2023
@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Mar 19, 2023
@melvin-bot melvin-bot bot unlocked this conversation Mar 19, 2023
@MelvinBot
Copy link

Triggered auto assignment to @dangrous (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@jliexpensify
Copy link
Contributor

Uhh wtf, I'm in Bug Zero. Unassigning Sophie.

@bernhardoj
Copy link
Contributor

bernhardoj commented Mar 19, 2023

Proposal

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

The workspace icon when deleted while offline show another circle behind it.

What is the root cause of that problem?

The issue is similar to this issue #15283 where on Android, the opacity from parent is "inherited" to the child. More explanation here #15283 (comment)

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

We can simply apply the same solution from the proposal, but I think we can avoid it because there is another problem I see.

So, the circle behind it is a default background color (green) for the old workspace icon. Our new workspace icon already have it's own bg color, so we don't need the default circle bg color anymore.

iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],

We can simply remove the iconStyles

@getusha
Copy link
Contributor

getusha commented Mar 19, 2023

Proposal

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

When the workspace icon is deleted while offline, a second circle avatar appears behind it.

What is the root cause of that problem?

When we have policy workspace we display the policy icon and name in the policy workspace, and apply an emphasized iconStyle to them.

App/src/styles/styles.js

Lines 1174 to 1177 in c803b5e

popoverMenuIconEmphasized: {
backgroundColor: themeColors.iconSuccessFill,
borderRadius: variables.componentSizeLarge / 2,
},

he styling is applied only if policy.avatar is not present, rather than being applied when it is present.

iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],

On Android, the opacity of the parent element will be inherited, which means that the policy icon style will be applied and shown behind it.

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

 iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],

We should instead modify the check and apply the styling as follows

iconStyles: policy.avatar ? [styles.popoverMenuIconEmphasized] : [] 

since we need a policy workspace icon styling like below

Screenshot 2023-03-18 at 10 21 23 PM

App/src/styles/styles.js

Lines 1176 to 1177 in c803b5e

borderRadius: variables.componentSizeLarge / 2,
},

Additionally we should also correct the borderRadius from circle to make the design consistent around the app in order to do that we can change the borderRadius value to

borderRadius: variables.componentBorderRadiusCard,

Result

Screenshot 2023-03-18 at 10 25 29 PM

@s77rt
Copy link
Contributor

s77rt commented Mar 19, 2023

@bernhardoj Thanks for the proposal. Your RCA is correct, we are applying a redundant style where its effects are only visible on Android due to how opacity styles are applied differently on Android compared to other platforms. The fix of removing that redundant style makes sense to me 👍.

🎀 👀 🎀 C+ reviewed

cc @dangrous

@s77rt
Copy link
Contributor

s77rt commented Mar 19, 2023

@getusha Thanks for the proposal. Your RCA is partly correct but I don't think we want to apply styles.popoverMenuIconEmphasized style for any case. Your first attached screenshot seems referencing to the old workspaces UI and I don't think we want to revert to that either.

@dangrous
Copy link
Contributor

ah cool! I think that makes sense to me! I'll assign you here @bernhardoj

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 20, 2023
@MelvinBot
Copy link

📣 @bernhardoj You have been assigned to this job by @dangrous!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@jliexpensify
Copy link
Contributor

Hired @s77rt and @bernhardoj

@bernhardoj
Copy link
Contributor

PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 27, 2023
@melvin-bot melvin-bot bot changed the title [$1000] [Android] Workspaces - The icon of a deleted offline workspace shows a circle instead of the standard shape [HOLD for payment 2023-04-03] [$1000] [Android] Workspaces - The icon of a deleted offline workspace shows a circle instead of the standard shape Mar 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 27, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.89-0 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-04-03. 🎊

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Mar 27, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@s77rt / @dangrous] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt / @dangrous] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@s77rt / @dangrous] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@jliexpensify] Determine if we should create a regression test for this bug.
  • [@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/271525

@s77rt
Copy link
Contributor

s77rt commented Mar 27, 2023


Regression Test Proposal

  1. Login to App
  2. Go to Settings > Workspaces
  3. Create a new workspace if you don't have one
  4. Open any workspace
  5. Turn off the internet
  6. Delete the workspace
  7. Verify the deleted workspace avatar does not have a circle behind it

@dangrous
Copy link
Contributor

Test looks good to me @s77rt . Responded in the chat thread, as well. Thanks for handling that!

@jliexpensify
Copy link
Contributor

Looks good, paying now

@jliexpensify
Copy link
Contributor

Paid (+ bonuses), and closing now

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 Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests