Closed shawnborton closed 4 months ago
Triggered auto assignment to @puneetlath (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.
Job added to Upwork: https://www.upwork.com/jobs/~0162b090372a61cda0
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Update icons in global create and money request flows
Feature Request
Adding new icons for :
Track expense
, we want to use the coins
iconRequest money
, we want to use the receipt
iconSend Money
, we want to use the money/cash
iconScan
in the money request flows, we want to use the scan receipt
icon
The updates made in the global create menu and segmented control should also be reflected in the Quick action row found in global create as mentioned in the comment
We can find these icons in the assets
add it to their respective components or places that we need to add for example -
For Track expense
, we want to use the coins
icon in the global create flow and money request flow.
N/A
Update icons in global create and money request flows
New features
To fix this issue we need update icons in global create and money request flows following instructions
NA
Update icons in global create and money request flows
Feature Request
We need to update icons from the global floating menu below:
The icons can be found in the expensicons component: https://github.com/Expensify/App/blob/b5fdc877accaa7aea216291c249051acb481ad08/src/components/Icon/Expensicons.ts#L1
We need to use new icons in global create and money request flows.
New update.
Update the icons in menu items:
Update the icons in quick actions as well:
Update the tab selector icon for scan:
Update the icons below as well:
All new icons are in Expensicons.ts.
@kevinksullivan @mountiny Just confirming here, shouldn't this request come under https://github.com/Expensify/App/issues/36748?
We want to replace the icons in Global Create and Money Request flow
This is new feature.
Since this is a simple change, I'd like to additionally suggest a refactor that will make our life easier in the future. As we can see here, we want to use icons consistently in the app for each feature. For example, "Request money" might appear in various places, and we're using Expensicons.[IconName]
for each of them. This leads to a problem, when we need to make a change across the app like this, we have to find every since instance of the feature being mentioned, and replace the Icon by another hardcoded Expensicons.[IconName]
. And each place we miss would be a regression.
So what I'd like to propose here is that we add a new method getIconForAction(actionName)
where we'd centralize the icon retrieval for each core flow in the app. So when we need to find the icon for track expense, for example, we can just do getIconForAction(CONST.IOU.TYPE.TRACK_EXPENSE)
. Then later if we want to change icons for a core flow, we can just change inside getIconForAction
and it will be reflected through-out the app.
So the steps to fix this issue are:
getIconForAction
and make sure we handle the IOU actions where we'd like to change icons here, the Icons are already all defined, we just need to return the correct icons for each action, as defined in the OP.If we're ok with hardcoding the icon for each flow now, we can just replace the icon in each place mentioned above (but still needs to include the 4th step which every other proposals were missing)
@shubham1206agra that is a separate issue with a separate problem/solution. This issue does not touch the Split bill icon at all.
Just to confirm after reading the OP, we aren't changing the names of the global create option rows with this issue, right? We're going to wait for the doc Kevin is working on for that, so we do it in tandem with all the other places we reference "request money" / "request" for example?
Update icons as per clear instructions and wireframes in the description
New feature
As all these are existing icons, no new assets are required. Update references to existing icons from the menu.
Update the icon name in quick actions in FloatingActionButtonAndPopoverOnyxProps.tsx
const getQuickActionIcon = (action: QuickActionName): React.FC<SvgProps> => {
switch (action) {
case CONST.QUICK_ACTIONS.REQUEST_MANUAL:
return Expensicons.MoneyCircle;
case CONST.QUICK_ACTIONS.REQUEST_SCAN:
return Expensicons.Receipt;
case CONST.QUICK_ACTIONS.REQUEST_DISTANCE:
return Expensicons.Car;
case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
case CONST.QUICK_ACTIONS.SPLIT_SCAN:
case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
return Expensicons.Transfer;
case CONST.QUICK_ACTIONS.SEND_MONEY:
return Expensicons.Send;
case CONST.QUICK_ACTIONS.ASSIGN_TASK:
return Expensicons.Task;
default:
return Expensicons.MoneyCircle;
}
};
Update the icons in the react View that will be rendered.
<View style={styles.flexGrow1}>
<PopoverMenu
onClose={hideCreateMenu}
isVisible={isCreateMenuActive && (!isSmallScreenWidth || isFocused)}
anchorPosition={styles.createMenuPositionSidebar(windowHeight)}
onItemSelected={hideCreateMenu}
fromSidebarMediumScreen={!isSmallScreenWidth}
menuItems={[
{
icon: Expensicons.ChatBubble,
text: translate('sidebarScreen.fabNewChat'),
onSelected: () => interceptAnonymousUser(Report.startNewChat),
},
...(canUseTrackExpense
? [
{
icon: Expensicons.DocumentPlus,
text: translate('iou.trackExpense'),
onSelected: () =>
interceptAnonymousUser(() =>
IOU.startMoneyRequest(
CONST.IOU.TYPE.TRACK_EXPENSE,
// When starting to create a track expense from the global FAB, we need to retrieve selfDM reportID.
// If it doesn't exist, we generate a random optimistic reportID and use it for all of the routes in the creation flow.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
ReportUtils.findSelfDMReportID() || ReportUtils.generateReportID(),
),
),
},
]
: []),
{
icon: Expensicons.MoneyCircle,
text: translate('iou.requestMoney'),
onSelected: () =>
interceptAnonymousUser(() =>
IOU.startMoneyRequest(
CONST.IOU.TYPE.REQUEST,
// When starting to create a money request from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used
// for all of the routes in the creation flow.
ReportUtils.generateReportID(),
),
),
},
{
icon: Expensicons.Send,
text: translate('iou.sendMoney'),
onSelected: () =>
interceptAnonymousUser(() =>
IOU.startMoneyRequest(
CONST.IOU.TYPE.SEND,
// When starting to create a send money request from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used
// for all of the routes in the creation flow.
ReportUtils.generateReportID(),
),
),
},
{
icon: Expensicons.Task,
text: translate('newTaskPage.assignTask'),
onSelected: () => interceptAnonymousUser(() => Task.clearOutTaskInfoAndNavigate()),
},
...(!isLoading && !Policy.hasActiveChatEnabledPolicies(allPolicies)
? [
{
displayInDefaultIconColor: true,
contentFit: 'contain' as ImageContentFit,
icon: Expensicons.NewWorkspace,
iconWidth: 46,
iconHeight: 40,
text: translate('workspace.new.newWorkspace'),
description: translate('workspace.new.getTheExpensifyCardAndMore'),
onSelected: () => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt()),
},
]
: []),
...(quickAction?.action
? [
{
icon: getQuickActionIcon(quickAction?.action),
text: quickActionTitle,
label: translate('quickAction.shortcut'),
isLabelHoverable: false,
floatRightAvatars: quickActionAvatars,
floatRightAvatarSize: CONST.AVATAR_SIZE.SMALL,
description: !isEmptyObject(quickActionReport) ? ReportUtils.getReportName(quickActionReport) : '',
numberOfLinesDescription: 1,
onSelected: () => interceptAnonymousUser(() => navigateToQuickAction()),
shouldShowSubscriptRightAvatar: ReportUtils.isPolicyExpenseChat(quickActionReport),
},
]
: []),
]}
withoutOverlay
anchorRef={fabRef}
/>
<FloatingActionButton
accessibilityLabel={translate('sidebarScreen.fabNewChatExplained')}
role={CONST.ROLE.BUTTON}
isActive={isCreateMenuActive}
ref={fabRef}
onPress={toggleCreateMenu}
/>
</View>
N.A.
Ah, I wasn't thinking we'd change the names but that's a good point about @kevinksullivan's doc. Do we want to wait for that doc to update the icons here too?
If we didn't do any name changes but just changed out some icons, I think we'd get this as the correct image for the original comment here:
I'll go ahead and update the issue for now.
I'll go ahead and update the issue for now.
Thanks Now, the issue looks separated.
Lets do this change after we update the copy. @eVoloshchak could you please triage the proposal for updating the icons only? the copy changes will be done in separate issue
Yeah, I think doing icons right away now is fine. I was just hesitant on the menu item names as that has more implications throughout the flows in a number of places.
Use the new method to get the icon for the actions in the Composer "Plus" context menu here (t was also not mentioned in the OP, but it needs to be updated to be consistent)
This is an important detail, good catch, @tienifr. It isn't mentioned in the OP, but I think we definitely should update it for consistency. @shawnborton, could you please confirm the icons in the Composer "Plus" context menu also need to be updated?
Great shout. I'll let @shawnborton (and @dannymcclain ) chime in, but I think it would make lots of sense to update them as well.
Totally agreeโwe should definitely update them all to be consistent. Good catch.
@eVoloshchak what are the next steps here?
In that case, I think we should proceed with @tienifr's proposal since it's the only proposal that covers all of the cases
๐๐๐ C+ reviewed!
Current assignees @puneetlath and @mountiny are eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
๐ฃ @tienifr ๐ An offer has been automatically sent to your Upwork account for the Contributor role ๐ Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer 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 ๐
@shawnborton
For Track expense, we want to use the coins icon For Scan in the money request flows, we want to use the scan receipt icon
I cannot find these two icons in app. Can you help check again as you said "Note that all of these icons already exist in the App repo"
For the coins, looks like we have it as "tax.svg" - I think renaming it to coins makes more sense personally. File is here.
Here's the icon you need for receipt scan: receipt-scan.svg.zip
@tienifr Please proceed with the PR now. We have merged the changes to unblock this issue.
For the coins, looks like we have it as "tax.svg" - I think renaming it to coins makes more sense personally.
Let's please rename it to coins.svg
if possible. And if we do, we should check and see where it's referenced to make sure we don't bork anything!
@eVoloshchak PR https://github.com/Expensify/App/pull/40553 is ready
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.68-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-05-08. :confetti_ball:
For reference, here are some details about the assignees on this issue:
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:
@tienifr has been paid.
@eVoloshchak bump on the checklist for you.
@puneetlath, not sure if checklist is applicable here, this isn't a bug, we just needed to update the icons There is no PR that has caused this, no discussion needed and no regression test
Ah ok, that makes sense.
Payment summary:
@eVoloshchak please request on NewDot. Thanks everyone!
$250 approved for @eVoloshchak
If you havenโt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue reported by: @shawnborton Slack conversation: Link [Internal]
Feature Request
We want to update some of the icons found in our global create menu as well as the money request flows:
Notes:
Track expense
, we want to use the coins iconRequest money
, we want to use the receipt iconSend money
, we want to use the money/cash iconScan
in the money request flows, we want to use the scan receipt iconQuick action
row found in global createNote that all of these icons already exist in the App repo, we just need to use them in the places mentioned above.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Note four our internal team: given that this is just very small file name changes, we should drop the bounty down to $125.
cc @Expensify/design @kevinksullivan @mountiny @quinthar
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @puneetlath