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 2022-03-31] Update avatars for #announce and #admins default rooms #8147

Closed
kevinksullivan opened this issue Mar 14, 2022 · 28 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kevinksullivan
Copy link
Contributor

kevinksullivan commented Mar 14, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Add account to defaultRooms beta
  2. Search for a default room - either #announce or #admins
  3. See avatar

Expected Result:

Avatars should be more related to the purpose of the room itself:

  • #announce - Mega phone
    image
  • #admins - shield
    image

Actual Result:

Both rooms use a couch icon

Notes/Photos/Videos:

image

Slack conversation: https://expensify.slack.com/archives/C02MW39LT9N/p1646421753395089?thread_ts=1646419035.253859&cid=C02MW39LT9N

View all open jobs on GitHub

@kevinksullivan kevinksullivan added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Mar 14, 2022
@MelvinBot
Copy link

Triggered auto assignment to @trjExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Mar 14, 2022
@kevinksullivan
Copy link
Contributor Author

Well would ya look at that @trjExpensify 😀 !

@MelvinBot
Copy link

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

@trjExpensify
Copy link
Contributor

My, my.. issue looks good! I'll keep myself assigned for the CM piece anyhow, once Bondy has given it the all clear and adds the External label.

@bondydaa bondydaa removed their assignment Mar 15, 2022
@bondydaa bondydaa added the External Added to denote the issue can be worked on by a contributor label Mar 15, 2022
@MelvinBot
Copy link

Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.

@bondydaa
Copy link
Contributor

👍 seems straight forward, throwing external on this one

@thesahindia
Copy link
Member

thesahindia commented Mar 15, 2022

Proposal

We need to add two more functions in reportUtils.js

/**
 * Whether the provided report is a Announce room
 * @param {Object} report
 * @param {String} report.chatType
 * @returns {Boolean}
 */
function isAnnounceRoom(report) {
    return lodashGet(report, ['chatType'], '') === CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE;
}

/**
 * Whether the provided report is a Admins room
 * @param {Object} report
 * @param {String} report.chatType
 * @returns {Boolean}
 */
function isAdminsRoom(report) {
    return lodashGet(report, ['chatType'], '') === CONST.REPORT.CHAT_TYPE.POLICY_ADMINS;
}

and we can add these in getAvatarSources function to return different avatar

        if (ReportUtils.isAdminsRoom(report)) {
            return Expensicons.AdminsRoomAvatar;
        }
        if (ReportUtils.isAnnounceRoom(report)) {
            return Expensicons.AnnounceRoomAvatar;
        } 

function getAvatarSources(report) {
return _.map(lodashGet(report, 'icons', ['']), (source) => {
if (source) {
return source;
}
if (ReportUtils.isArchivedRoom(report)) {
return Expensicons.DeletedRoomAvatar;
}
if (ReportUtils.isChatRoom(report)) {
return Expensicons.ActiveRoomAvatar;
}
if (ReportUtils.isPolicyExpenseChat(report)) {
return Expensicons.Workspace;
}
return Expensicons.Profile;
});

and need to add new icons in Expensicons.js

Also if we don't wanna add these functions we can just directly check if it's an announce/admins room like below -

        if (reports.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE) {
            return Expensicons.AdminsRoomAvatar;
        }
        if (reports.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ADMINS {
            return Expensicons.AnnounceRoomAvatar;
        }

but using functions will be better.

@trjExpensify
Copy link
Contributor

Issue on Upwork here: https://www.upwork.com/jobs/~01a413a7606e22ee6b

@MelvinBot
Copy link

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

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 15, 2022
@MelvinBot
Copy link

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

@rushatgabhane
Copy link
Member

Hmm, I spent too much time thinking if we can do this in a cleaner way.

@rushatgabhane
Copy link
Member

🎀 👀 🎀 C+ reviewed

@stitesExpensify I like @thesahindia's proposal.

@stitesExpensify
Copy link
Contributor

I also like the proposal! @thesahindia I also agree that functions is the way to go here.

Feel free to apply on upwork Sahil!

@thesahindia
Copy link
Member

Feel free to apply on upwork Sahil!

Done ✅

Looks like we don't have these icons right now. @kevinksullivan, can you please share the SVGs here?

@stitesExpensify
Copy link
Contributor

cc @Expensify/design do these icons exist yet?

@shawnborton shawnborton self-assigned this Mar 16, 2022
@shawnborton
Copy link
Contributor

I can grab this one. I think the room icons are provided as full square svgs? @stitesExpensify can you share here what the existing room icon looks like, then I will provide new ones? I think we had previously chatted about making them all use a dark background so perhaps we can make that change here too.

@shawnborton
Copy link
Contributor

These are the icons we need right?

image

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 16, 2022
@stitesExpensify
Copy link
Contributor

@thesahindia you can take it from here with shawn :)

@trjExpensify
Copy link
Contributor

#8147 (comment) - Hired on Upwork, assigning you the issue @thesahindia. 👍

@rushatgabhane
Copy link
Member

rushatgabhane commented Mar 16, 2022

@shawnborton the existing icons are circle svgs, and grey in color.

Screen Shot 2022-03-16 at 8 44 27 PM

@shawnborton
Copy link
Contributor

Great, here are the updated icons: Expensify-RoomIcons.zip

@MelvinBot
Copy link

📣 @thesahindia You have been assigned to this job by @trjExpensify!
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 📖

@thesahindia thesahindia mentioned this issue Mar 16, 2022
85 tasks
@stitesExpensify stitesExpensify added the Reviewing Has a PR in review label Mar 17, 2022
@trjExpensify
Copy link
Contributor

Waiting on a prod deploy, Melv!

@mountiny mountiny added Daily KSv2 Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 Daily KSv2 labels Mar 30, 2022
@mountiny mountiny changed the title Update avatars for #announce and #admins default rooms [HOLD for payment 2022-03-31] Update avatars for #announce and #admins default rooms Mar 30, 2022
@mountiny
Copy link
Contributor

mountiny commented Mar 30, 2022

This should be good to be paid out on Thursday. There was a bug with the deploy comments all was deployed to production one week ago!

@shawnborton
Copy link
Contributor

shawnborton commented Apr 1, 2022

Looks like we're all good here?

image

@trjExpensify
Copy link
Contributor

Yeah, I think they look great! If anything, do you reckon Chronos and Concierge icons need a spruce now to be bolder?

image

@shawnborton
Copy link
Contributor

I think they are okay for now.

@trjExpensify
Copy link
Contributor

Cool, cool. Settled up!

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 Engineering 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

10 participants