-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Improvement: Make the "press the green + button" text in the "Submit an Expense" task on mobile a clickable emoji #54643
Comments
Triggered auto assignment to @anmurali ( |
Triggered auto assignment to @shawnborton ( |
We need to actually create this FE element I think? It doesn't exist right now... |
Turns out we need to actually figure out how to support custom emojis or inline images to accomplish this. As a trivial to implement improvement, let's just make |
Job added to Upwork: https://www.upwork.com/jobs/~021874860195609179779 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
Edited by proposal-police: This proposal was edited at 2025-01-13 06:02:19 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Make the "press the green + button" text in the "Submit an Expense" task clickable. What is the root cause of that problem?"Click the green + button" text is currently plain text and not interactive. What changes do you think we should make in order to solve the problem?So to make it a custom emoji-like button, we need to create a custom tag 'custom-emoji': HTMLElementModel.fromCustomModel({tagName: 'custom-emoji', contentModel: HTMLContentModel.textual}), Define the Custom Renderer for our tag: 'custom-emoji': CustomEmojiRenderer, Create CustomEmojiRenderer function CustomEmojiRenderer({tnode}: CustomRendererProps<TText | TPhrasing>) {
if (tnode.attributes.emoji === 'action-menu-icon') {
return <FloatingActionEmoji />;
}
// ...
} Now we need to add a tag to the description by simply changing the line to: '1. Press the <custom-emoji emoji="action-menu-icon" /> button.\n' // or Click the Add some styles to FloatingActionButton and prop to get it in emoji-like size But, in getParsedComment we use Parser.replace and lodashEscape what for safety rules change our description and things like "<" ">" to "<" ">" and other So I use this changes: let result =
text.length <= CONST.MAX_MARKUP_LENGTH
? Parser.replace(textWithMention, {shouldEscapeText: parsingDetails?.shouldEscapeText, disabledRules: isGroupPolicyReport ? [] : ['reportMentions']})
: lodashEscape(text);
if (isAllowCustomEmoji) {
result = result.replace(/<custom-emoji emoji="/g, '<custom-emoji emoji="').replace(/" \/>/g, '" />');
}
return result; And we also can, the user cant pass ">" to the description anyway But in the future or if needed, we can to cooperate with "Expensify-common" and ExpensiMark team as well {
name: 'reportMentions',
regex: /(?<=^[*~_]?|[ \n][*~_]?)(#[\p{Ll}0-9-]{1,99})(?![^<]*(?:<\/pre>|<\/code>|<\/a>))/gimu,
replacement: '<mention-report>$1</mention-report>',
}, so then we can past text like: "$action-menu-icon" and Parser.replace return our tag: "<custom-emoji emoji="action-menu-icon" />" 2025-01-13_08-00-29.mp4What alternative solutions did you explore? (Optional)According to #54643 (comment) We can still make "green + button" link to create an expense For it, we need to add a new key to the following code: App/src/libs/actions/Report.ts Lines 3620 to 3630 in c6d8045
createExpenseLink: `${environmentURL}/${ROUTES.MONEY_REQUEST_CREATE_TAB_MANUAL.getRoute(
CONST.IOU.ACTION.CREATE,
CONST.IOU.ACTION.CREATE,
CONST.IOU.OPTIMISTIC_TRANSACTION_ID,
onboardingPolicyID ?? '-1',
)}`, And then we can pass it into Description: description: ({createExpenseLink}) => {
return (
`*Submit an expense* by entering an amount or scanning a receipt.\n` +
`\n` +
`Here’s how to submit an expense:\n` +
`\n` +
`1. Click the [green *+* button](${createExpenseLink}) \n` +
`2. Choose *Create expense*.\n` +
`3. Enter an amount or scan a receipt.\n` +
`4. Add your reimburser to the request.\n` +
`5. Click *Submit*.\n` +
`\n` +
`And you’re done! Now wait for that sweet “Cha-ching!” when it’s complete.`
);
}, We can also set a link on Create Expense instead if needed. |
@shawnborton, @anmurali, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
The Slack discussion and this comment here need opening the menu containing the "Create expense" on clicking the step "Click the green + button" so that the second step of clicking on the "Create expense" can be done there itself without leaving the task report page on narrow devices. But, the proposals are linking the task step to open the RHP of create expense flow. Can you please update the proposals to match the requirement? Thanks! |
I think we might actually take this back and research a clickable custom emoji after all. |
Yes, I will work on it. Thanks!! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@shawnborton @anmurali @c3024 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@shawnborton, @anmurali, @c3024 Huh... This is 4 days overdue. Who can take care of this? |
Thanks for the update, @Amoralchik. Based on this discussion, I too think that using @Amoralchik’s proposal works well and looks good to me. Further refinements can be made during the PR process. 🎀 👀 🎀 C+ reviewed! |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @Amoralchik You have been assigned to this job! |
PR will be ready Tomorrow, Thanks. |
Here is a PR, I found some issues on native IOS and Android, so for now PR on draft |
PR is finally ready for review |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.79-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation (hyperlinked to channel name): expensify_bugs
Action Performed:
Expected Result:
Green + button visible or hyperlinked in the task
Create a :global_create: emoji in NewDot that copies :global-create:
Add a hyperlink like expensify://global-create that just opens Global Create
Update the text to be 1. Press the :global-create: button
This way:
The :global-create: will be visible right there
They can click it without leaving the task
Actual Result:
Green + button is not visible and not hyperlinked in the task
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
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
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @c3024The text was updated successfully, but these errors were encountered: