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 2024-05-09] [$250] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name #39478

Closed
grgia opened this issue Apr 3, 2024 · 49 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@grgia
Copy link
Contributor

grgia commented Apr 3, 2024

See https://expensify.slack.com/archives/C03TME82F/p1712094385071259

image

Right now the workspace icon changes based on the name, but that means that the icon and colors will change every time you modify the name of your workspace, even slightly. For example Expensify UK versus Expensify - UK

Let's hash the policyID instead so the workspace avatar will always remain the same color and the SVG will only change if the first character is modified. For example Expensify UK (E) versus New Expensify - UK (N)

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d4085169c8260375
  • Upwork Job ID: 1775449679811973120
  • Last Price Increase: 2024-04-03
Issue OwnerCurrent Issue Owner: @isabelastisser
@grgia grgia added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 3, 2024
@grgia grgia self-assigned this Apr 3, 2024
Copy link

melvin-bot bot commented Apr 3, 2024

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

@grgia grgia added the External Added to denote the issue can be worked on by a contributor label Apr 3, 2024
@melvin-bot melvin-bot bot changed the title Generate Workspace Avatar Color based on PolicyID instead of Workspace Name [$500] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name Apr 3, 2024
Copy link

melvin-bot bot commented Apr 3, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 3, 2024
Copy link

melvin-bot bot commented Apr 3, 2024

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

@grgia grgia changed the title [$500] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name [$250] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name Apr 3, 2024
Copy link

melvin-bot bot commented Apr 3, 2024

Upwork job price has been updated to $250

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 3, 2024

Proposal

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

We want the workspace avatar color to be consistent based on first character of workspace name

What is the root cause of that problem?

In here, we're using the full workspace name, not using workspaceID, so whenever workspace name changes, the hash will change and there'll be a new workspace color.

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

We can use PolicyID for the hash. To do this, we need to:

  • Modify getDefaultWorkspaceAvatarColor here to accept workspaceID instead of workspaceName, and use workspaceID for the hash
  • In places that uses getDefaultWorkspaceAvatarColor, pass in workspaceID instead, there'll be some refactoring needed to be able to pass workspaceID to getDefaultWorkspaceAvatarColor (since we're using file name/avatar name, we either need to pass workspaceID as the file name/avatar name or pass a new field for the workspaceID, and use it)

What alternative solutions did you explore? (Optional)

NA

@grgia grgia added NewFeature Something to build that is a new item. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Apr 3, 2024

This comment was marked as outdated.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Apr 3, 2024

This comment was marked as off-topic.

@grgia grgia removed the NewFeature Something to build that is a new item. label Apr 3, 2024
@grgia
Copy link
Contributor Author

grgia commented Apr 3, 2024

We want the workspace avatar color to be consistent based on first character of workspace name
@nkdengineer

The only change is that the workspace color will be based off the policyID. The Workspace SVG will still be based on the name

@grgia grgia added Daily KSv2 Weekly KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed Weekly KSv2 Daily KSv2 labels Apr 3, 2024

This comment was marked as off-topic.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 3, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

This issue has not been updated in over 15 days. @rushatgabhane, @isabelastisser, @grgia, @nkdengineer eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

Copy link

melvin-bot bot commented May 1, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels May 2, 2024
@melvin-bot melvin-bot bot changed the title [$250] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name [HOLD for payment 2024-05-09] [$250] Generate Workspace Avatar Color based on PolicyID instead of Workspace Name May 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

Copy link

melvin-bot bot commented May 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.69-2 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 2024-05-09. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented May 2, 2024

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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Daily KSv2 and removed Weekly KSv2 labels May 8, 2024
@isabelastisser
Copy link
Contributor

@rushatgabhane, please complete the BZ list, and I will process the payments tomorrow. Thanks!

Copy link

melvin-bot bot commented May 9, 2024

Payment Summary

Upwork Job

BugZero Checklist (@isabelastisser)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1775449679811973120/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@isabelastisser
Copy link
Contributor

Bump @rushatgabhane for an update, thanks!

@rushatgabhane
Copy link
Member

rushatgabhane commented May 13, 2024

This is a new feature, so we should add regression steps.

  1. Open Workspace setting
  2. Change workspace name
  3. Verify that: Workspace icon don't change color

@isabelastisser
Copy link
Contributor

Payment Summary

Upwork Job

Reviewer: @rushatgabhane owed $250 via NewDot
ROLE: @nkdengineer paid $250 via Upwork (https://www.upwork.com/nx/wm/offer/102291242)

@shawnborton
Copy link
Contributor

I thought this PR introduced a bunch of regressions? Should we be paying out the bounty, or wait until all of the regressions are fixed?

@grgia can you confirm please?

@shawnborton
Copy link
Contributor

Here's the link to the PR that should fix some of the regressions: #41485

@isabelastisser
Copy link
Contributor

Bump @grgia

@grgia
Copy link
Contributor Author

grgia commented May 17, 2024

@rushatgabhane @isabelastisser yes, it did introduce a handful of regressions. Would you please calculate payment with the regression penalty

@isabelastisser
Copy link
Contributor

Thanks, @grgia! Discussion here.

@isabelastisser
Copy link
Contributor

isabelastisser commented May 20, 2024

We've discussed this internally and decided to reduce the payment amounts due to the PR regressions.

Payment Summary

Upwork Job

Reviewer: @rushatgabhane owed $100 via NewDot (PENDING)
ROLE: @nkdengineer paid $100 via Upwork (https://www.upwork.com/nx/wm/offer/102291242)

@JmillsExpensify
Copy link

$100 approved for @rushatgabhane

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jun 11, 2024
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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants