Skip to content

Clickable emoji for expense task #56602

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

Merged

Conversation

Amoralchik
Copy link
Contributor

@Amoralchik Amoralchik commented Feb 10, 2025

Explanation of Change

Fixed Issues

$ #54643
PROPOSAL: #54643 (comment)

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  1. Create new account
  2. Choose "Get paid back by my employer" option in onboarding
  3. Click the "Submit expense" task from Concierge
  4. Make sure you can see a green emoji-like button inline with the text
  5. Make sure you can click green button and finish Task (Create expense)

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
2025-02-25.20.44.49.mov
Android: mWeb Chrome
2025-02-25.20.49.49.mov
iOS: Native
2025-02-24.22.17.06.mov
iOS: mWeb Safari
2025-02-25.20.52.29.mov
MacOS: Chrome / Safari
2025-02-25.20.41.03.mov
MacOS: Desktop
2025-02-25.20.38.48.mov

@Amoralchik
Copy link
Contributor Author

Знімок екрана 2025-02-13 о 12 23 21 Знімок екрана 2025-02-13 о 12 23 32 Знімок екрана 2025-02-13 о 12 24 35

@roryabraham I can't say for sure if it is similar to issues you mentioned.

In my opinion it is better to have a conversation here.

@Amoralchik Amoralchik marked this pull request as ready for review February 24, 2025 16:40
@Amoralchik Amoralchik requested review from a team as code owners February 24, 2025 16:40
@melvin-bot melvin-bot bot requested review from c3024 and removed request for a team February 24, 2025 16:40
Copy link

melvin-bot bot commented Feb 24, 2025

@c3024 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Amoralchik
Copy link
Contributor Author

Open for review
cc @c3024 @roryabraham

@shawnborton
Copy link
Contributor

Do we have updated screenshots to review?

@dubielzyk-expensify
Copy link
Contributor

Tried this locally but couldn't get Concierge to send the onboarding message. It usually triggers, but unsure if it's related to this PR or if dev is just being weird.

On iOS native the positioning looks great:
CleanShot 2025-02-25 at 11 09 49@2x

But on macOS and Android it seems to sit quite a bit higher:
CleanShot 2025-02-25 at 11 10 13@2x

Any reason for this?

Copy link
Contributor

🚧 @roryabraham has triggered a test build. You can view the workflow run here.

This comment has been minimized.

@Amoralchik
Copy link
Contributor Author

Updated
change position for web & android

@dubielzyk-expensify
Copy link
Contributor

Still seeing it pretty high on web
CleanShot 2025-02-26 at 12 33 52@2x

@Amoralchik
Copy link
Contributor Author

@dubielzyk-expensify Hi,
Could you provide more information? Also, please check if you have updated the git branch to the latest commit. The updated version is shown in the video description. Thanks!

if (platform !== CONST.PLATFORM.WEB) {
return;
}
document.removeEventListener('dragover', hidePopoverOnDragOver);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still necessary? We are not adding this event listener for removing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is initially from BottomTabBarFloatingActionButton

import React, {createContext, useCallback, useMemo, useRef, useState} from 'react';
import type {View} from 'react-native';
import getPlatform from '@libs/getPlatform';
import type FloatingActionButtonPopoverMenuRef from '@pages/home/sidebar/BottomTabBarFloatingActionButton/types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this type to this file and remove index.native.ts and types of BottomTabBarFloatingActionButton because we are not using BottomTabBarFloatingActionButton anymore!

<PressableWithoutFeedback
onPress={() => setIsCreateMenuActive(!isFabActionActive)}
onLongPress={() => {}}
style={{verticalAlign: 'bottom', userSelect: 'none'}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
style={{verticalAlign: 'bottom', userSelect: 'none'}}
style={[styles.verticalAlignBotton, styles.userSelectNone]}

@@ -223,7 +224,9 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady, sh
enabled: false,
}}
>
<AppNavigator authenticated={authenticated} />
<FABPopoverProvider>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for separately wrapping the Provider here unlike adding in Expensify.tsx like we do with other Providers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need NavigationContainer for FloatingActionButtonPopover (aka FABPopoverContext) if we place it in Expensify.tsx we fail with this error:
Couldn't find a navigation object. Is your component inside NavigationContainer?

onPress={toggleCreateMenu}
/>
</View>
</>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that FAB is moved to another component we can rename this component to FloatingActionButtonPopover.

@Amoralchik
Copy link
Contributor Author

Resolve merge conflict
No changes
Merge origin into branch

@dubielzyk-expensify
Copy link
Contributor

The new screenshots look good from my end 👍

@shawnborton
Copy link
Contributor

Same! Going to fire up a quick test build though because I'm curious if browser zooming has any impact on this one, but otherwise I think we're good to go.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

🚧 @shawnborton has triggered a test hybrid app build. You can view the workflow run here.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

@shawnborton
Copy link
Contributor

Cool, looks good to me after a quick test. Time for final review @c3024 !

@c3024
Copy link
Contributor

c3024 commented Mar 4, 2025

Screenshots/Videos

Android: Native
Screenrecorder-2025-03-04-20-32-51-747.mp4
Android: mWeb Chrome
Screenrecorder-2025-03-04-20-35-40-117.mp4
iOS: Native
emojiiOS-compressed.mp4
iOS: mWeb Safari
ScreenRecording_03-04-2025.20-47-44_1.MP4
MacOS: Chrome / Safari
emojiChrome.mov
MacOS: Desktop

@c3024
Copy link
Contributor

c3024 commented Mar 4, 2025

Everything tests well. On Android, the emoji layout does not follow text the same way it does on iOS. Different devices have different scales, making it impossible to place emojis accurately at extreme zoom-ins and zoom-outs. On my Redmi Note 11 Pro+, there’s some misalignment at extreme zooms, but it’s the same for regular emojis as well.

It looks fine on the emulator for all scales.

Since Android alignment cannot be fixed across all zoom levels, I think we can ship this!

@roryabraham roryabraham merged commit a1fae23 into Expensify:main Mar 4, 2025
17 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Mar 4, 2025

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.1.9-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 failure ❌
🍎🔄 iOS HybridApp 🍎🔄 success ✅

Copy link
Contributor

github-actions bot commented Mar 4, 2025

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.1.9-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 success ✅
🍎🔄 iOS HybridApp 🍎🔄 success ✅

@tgolen tgolen changed the title Clickable emoji for exoense task Clickable emoji for expense task Mar 5, 2025
tgolen added a commit that referenced this pull request Mar 5, 2025
…-exoense-task"

This reverts commit a1fae23, reversing
changes made to d47c197.
puneetlath added a commit that referenced this pull request Mar 5, 2025
[CP Staging] Revert "Merge pull request #56602 from Amoralchik/clickable-emoji-for…
OSBotify pushed a commit that referenced this pull request Mar 5, 2025
[CP Staging] Revert "Merge pull request #56602 from Amoralchik/clickable-emoji-for…

(cherry picked from commit 8d588e8)

(CP triggered by puneetlath)
Julesssss added a commit that referenced this pull request Mar 6, 2025
* main: (192 commits)
  Update Mobile-Expensify submodule version to 9.1.9-6
  Update version to 9.1.9-6
  reset the submodule commit to fix crash
  Revert "fix: Message Previews Always Include Sender Name"
  Update Mobile-Expensify submodule version to 9.1.9-5
  Update version to 9.1.9-5
  Update Mobile-Expensify submodule version to 9.1.9-4
  Update version to 9.1.9-4
  Revert "Merge pull request #56602 from Amoralchik/clickable-emoji-for-exoense-task"
  Update Require-tags-and-categories-for-expenses.md
  Update Require-tags-and-categories-for-expenses.md
  bump Mobile-Expensify submodule
  remove unused code
  Update Require-tags-and-categories-for-expenses.md
  Add domain function back to help doc
  Update Mobile-Expensify submodule version to 9.1.9-3
  Update version to 9.1.9-3
  avoid deleted employee in exporter list
  update comment
  Update redirects.csv
  ...
Amoralchik added a commit to Amoralchik/App that referenced this pull request Mar 6, 2025
…ickable-emoji-for-exoense-task""

This reverts commit 65d675b.
Copy link
Contributor

github-actions bot commented Mar 6, 2025

🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.9-8 🚀

platform result
🤖 android 🤖 true ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 failure ❌
🍎🔄 iOS HybridApp 🍎🔄 failure ❌

Copy link
Contributor

github-actions bot commented Mar 6, 2025

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.1.10-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 success ✅
🍎🔄 iOS HybridApp 🍎🔄 success ✅

Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.1.10-6 🚀

platform result
🤖 android 🤖 true ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 failure ❌
🍎🔄 iOS HybridApp 🍎🔄 failure ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants