Skip to content

[HOLD App#63642] [Due for payment 2025-06-16] [Due for payment 2025-06-13] [$250] Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled #61084

Closed

Description

@lanitochka17

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.1.33-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): djosdsjodsjsod@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new Gmail account
  3. Complete the onboarding with any user intent
  4. Open FAB
  5. Note that Scan tooltip is pointing to the middle of Scan button
  6. Create a new workspace
  7. Go to workspace settings > More features
  8. Enable Per diems
  9. Go to Per diems
  10. Click Import spreadsheet
  11. Upload a file, map the columns and click Import
  12. Open FAB

Expected Result:

Scan tooltip will be pointing to the middle of Scan button

Actual Result:

Scan tooltip is pointing to the edge of Scan button when Per diem is enabled

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6816506_1745938191008.20250429_224135.mp4
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021917610623544539888
  • Upwork Job ID: 1917610623544539888
  • Last Price Increase: 2025-04-30
  • Automatic offers:
    • ishakakkad | Contributor | 107200913
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 29, 2025
  2. melvin-bot commented on Apr 29, 2025

    @melvin-bot

    Triggered auto assignment to @NicMendonca (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.

  3. ishakakkad commented on Apr 29, 2025

    @ishakakkad
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-04-29 15:34:15 UTC.

    Proposal

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

    Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled

    What is the root cause of that problem?

    We always show the tooltip on the center of the page, but when per-diem feature is enabled scan button shift to left a bit. Because of that tooltip show at the edge of button.

    <EducationalTooltip
    shouldRender={shouldShowProductTrainingTooltip}
    renderTooltipContent={renderProductTrainingTooltip}
    shouldHideOnNavigate
    anchorAlignment={{
    horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.CENTER,
    vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,
    }}
    wrapperStyle={styles.productTrainingTooltipWrapper}
    shiftVertical={-elementTop}
    >
    <View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
    {!(isDraggingOver ?? isDraggingOverWrapper) && (isMobile() ? mobileCameraView() : desktopUploadView())}
    </View>
    </EducationalTooltip>

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

    We can check if the per-diem is enabled like here then add shiftHorizontal property like below. We can move shouldShowPerDiemOption logic into common utility function.

    Or we can pass shouldShowPerDiemOption from here as props

    <EducationalTooltip
                                shouldRender={shouldShowProductTrainingTooltip}
                                renderTooltipContent={renderProductTrainingTooltip}
                                shouldHideOnNavigate
                                anchorAlignment={{
                                    horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.CENTER,
                                    vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,
                                }}
                                wrapperStyle={styles.productTrainingTooltipWrapper}
                                shiftVertical={-elementTop}
                                shiftHorizontal={shouldShowPerDiemOption ? -40 : 0} // value can be changed during developement and we can move this value to some const file
                            >
                                <View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
                                   {!(isDraggingOver ?? isDraggingOverWrapper) && (isMobile() ? mobileCameraView() : desktopUploadView())}
                                </View>
                            </EducationalTooltip>

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA UI bug

    What alternative solutions did you explore? (Optional)

    Another solution is to move EducationTooltip here

    Add following logic here

    const Wrapper = ({children}) => {
            // Below condition will be changed during development
            return shouldShowProductTrainingTooltip && isActive && isScanPage
                ? <EducationalTooltip ...>{children}</EducationalTooltip>
                : <Tooltip
                    shouldRender={!shouldShowLabelWhenInactive && !isActive}
                    text={title}>{children}</Tooltip>;
        }
     <Wrapper>
                <AnimatedPressableWithFeedback
                    accessibilityLabel={title}
                    style={[styles.tabSelectorButton, styles.tabBackground(isHovered, isActive, backgroundColor), styles.userSelectNone]}
                    wrapperStyle={[styles.flexGrow1]}
                    onPress={onPress}
                    onHoverIn={() => setIsHovered(true)}
                    onHoverOut={() => setIsHovered(false)}
                    role={CONST.ROLE.BUTTON}
                    dataSet={{ [CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true }}
                    testID={testID}
                >
                    <TabIcon
                        icon={icon}
                        activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity}
                        inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity}
                    />
                    {(shouldShowLabelWhenInactive || isActive) && (
                        <TabLabel
                            title={title}
                            activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity}
                            inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity}
                        />
                    )}
                </AnimatedPressableWithFeedback>
            </Wrapper>
    

    Of course we need to pass required property from here like isScanPage and others if needed

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. nabi-ebrahimi commented on Apr 29, 2025

    @nabi-ebrahimi

    🚨 Edited by proposal-police: This proposal was edited at 2025-05-06 03:23:01 UTC.

    Proposal

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

    When the Per Diem option is enabled, the Scan tooltip pointer is not centered on the Scan button but rather points to the edge of the button. This misalignment can be confusing for users, as the tooltip pointer should always be centered over the Scan button.


    What is the root cause of that problem?

    The tooltip is currently anchored to the entire container that appears after selecting a tab, rather than to the Scan tab item itself. As a result, changes to the Scan button's position do not affect the tooltip pointer, leading to misalignment.


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

    The tooltip anchor should be moved from the IOURequestStepScan container to the TabSelectorItem for the Scan tab, ensuring it stays aligned with the button despite layout changes.

    We can do this by moving the tooltip logic from:

    IOURequestStepScan

    To:

    TabSelectorItem

    Image
    Image

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 30, 2025
  6. changed the title [-]Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled[/-] [+][$250] Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled[/+] on Apr 30, 2025
  7. melvin-bot commented on Apr 30, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 30, 2025
  9. melvin-bot commented on Apr 30, 2025

    @melvin-bot

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

  10. ZhenjaHorbach commented on Apr 30, 2025

    @ZhenjaHorbach
    Contributor

    Thanks for your proposals
    I will check tomorrow morning !

  11. self-assigned this
    on May 1, 2025
  12. dangrous commented on May 1, 2025

    @dangrous
    Contributor

    can grab internal review on this when it's ready

  13. 58 remaining items

  14. melvin-bot commented on Jun 24, 2025

    @melvin-bot

    @NicMendonca Huh... This is 4 days overdue. Who can take care of this?

  15. melvin-bot commented on Jun 26, 2025

    @melvin-bot

    @NicMendonca Still overdue 6 days?! Let's take care of this!

  16. melvin-bot commented on Jun 30, 2025

    @melvin-bot

    @NicMendonca 10 days overdue. Is anyone even seeing these? Hello?

  17. melvin-bot commented on Jun 30, 2025

    @melvin-bot

    @NicMendonca 10 days overdue. I'm getting more depressed than Marvin.

  18. dangrous commented on Jun 30, 2025

    @dangrous
    Contributor

    Is this still on Hold or should I remove that from the title?

  19. ZhenjaHorbach commented on Jul 2, 2025

    @ZhenjaHorbach
    Contributor

    Is this still on Hold or should I remove that from the title?

    The PR for this issue is in prod already
    So I think we can close this soon and then remove Hold here !

  20. melvin-bot commented on Jul 2, 2025

    @melvin-bot

    @NicMendonca 12 days overdue now... This issue's end is nigh!

  21. changed the title [-][Hold] [Due for payment 2025-06-16] [Due for payment 2025-06-13] [$250] Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled[/-] [+][HOLD App#63642] [Due for payment 2025-06-16] [Due for payment 2025-06-13] [$250] Tooltip - Scan tooltip is pointing to the edge of Scan button when Per diem is enabled[/+] on Jul 3, 2025
  22. ZhenjaHorbach commented on Jul 4, 2025

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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.

      It's more of a new feature

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    I'm not sure if tests are needed here
    Since these are UI changes

  23. NicMendonca commented on Jul 4, 2025

    @NicMendonca
    Contributor

    Payment summary

    Contributor+: @ZhenjaHorbach - $250 via NewDot
    Contributor: @ishakakkad - $250 via Upwork (done ✅ )

  24. ZhenjaHorbach commented on Jul 4, 2025

    @ZhenjaHorbach
    Contributor

    Requested in ND !

  25. garrettmknight commented on Jul 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @ZhenjaHorbach

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions