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

[Due for payment 2025-02-19] [$250] Web - Compose box - Expand collapse tooltip not dismissed after clicking #56037

Open
1 of 8 tasks
IuliiaHerets opened this issue Jan 30, 2025 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Overdue

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 30, 2025

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


Version Number: v9.0.92-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Windows 11/ Chrome
App Component: Chat Report View

Action Performed:

  1. Sign in to staging.new.expensify.com
  2. Navigate to a conversation
  3. Insert text in compose box until expand arrow is displayed
  4. Hover and Click on "Expand" arrow
  5. After expanding compose box, hover and click on "Collapse" arrow

Expected Result:

After clicking both expand and collapse arrows, tooltip is dismissed.

Actual Result:

After clicking both expand and collapse arrows, tooltip is not dismissed both times.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6728217_1738217914233.bandicam_2025-01-30_09-08-06-129.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021886888179679387363
  • Upwork Job ID: 1886888179679387363
  • Last Price Increase: 2025-02-04
  • Automatic offers:
    • linhvovan29546 | Contributor | 106072159
Issue OwnerCurrent Issue Owner: @muttmuure
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

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

@linhvovan29546
Copy link
Contributor

Proposal

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

Web - Compose box - Expand collapse tooltip not dismissed after clicking

What is the root cause of that problem?

In AttachmentPickerWithMenuItems, we have two tooltips: collapse and expand.

<Tooltip text={translate('reportActionCompose.collapse')}>

<Tooltip text={translate('reportActionCompose.expand')}>

The issue occurs because the tooltip does not unmount when switching between expand and collapse. As a result, the tooltip remains open and does not dismiss properly. You can track this behavior in the ActiveHoverable file.

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

We should ensure the tooltip components are treated as distinct elements by adding a key to each tooltip

<Tooltip text={translate('reportActionCompose.collapse')}>

to

<Tooltip text={translate('reportActionCompose.collapse')} key="collapse">

<Tooltip text={translate('reportActionCompose.expand')}>

to

   <Tooltip text={translate('reportActionCompose.expand')} key="expand">
Result
Screen.Recording.2025-01-30.at.6.16.00.PM.mov

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

N/A, UI bug

What alternative solutions did you explore? (Optional)

N/A
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.

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
Copy link

melvin-bot bot commented Feb 4, 2025

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

@muttmuure muttmuure moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Feb 4, 2025
@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Feb 4, 2025
@melvin-bot melvin-bot bot changed the title Web - Compose box - Expand collapse tooltip not dismissed after clicking [$250] Web - Compose box - Expand collapse tooltip not dismissed after clicking Feb 4, 2025
Copy link

melvin-bot bot commented Feb 4, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021886888179679387363

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 4, 2025
Copy link

melvin-bot bot commented Feb 4, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 4, 2025
@huult
Copy link
Contributor

huult commented Feb 5, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-05 14:46:32 UTC.

Proposal

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

Expand collapse tooltip not dismissed after clicking

What is the root cause of that problem?

The tooltip remains in the DOM even when switching between ‘Expand’ and ‘Collapse,’ so the onHoverOut event is not executed to hide the tooltip, causing this issue to occur

onHoverOut={hideTooltip}

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

To resolve this issue, we need to update the way we render collapse/expand so that it can unmount properly, like this:

{isComposerFullSize ? (
<Tooltip text={translate('reportActionCompose.collapse')}>
<PressableWithFeedback
onPress={(e) => {
e?.preventDefault();
raiseIsScrollLikelyLayoutTriggered();
setIsComposerFullSize(reportID, false);
}}
// Keep focus on the composer when Collapse button is clicked.
onMouseDown={(e) => e.preventDefault()}
style={styles.composerSizeButton}
disabled={isBlockedFromConcierge || disabled}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('reportActionCompose.collapse')}
>
<Icon
fill={theme.icon}
src={Expensicons.Collapse}
/>
</PressableWithFeedback>
</Tooltip>
) : (
<Tooltip text={translate('reportActionCompose.expand')}>
<PressableWithFeedback
onPress={(e) => {
e?.preventDefault();
raiseIsScrollLikelyLayoutTriggered();
setIsComposerFullSize(reportID, true);
}}
// Keep focus on the composer when Expand button is clicked.
onMouseDown={(e) => e.preventDefault()}
style={styles.composerSizeButton}
disabled={isBlockedFromConcierge || disabled}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('reportActionCompose.expand')}
>
<Icon
fill={theme.icon}
src={Expensicons.Expand}
/>
</PressableWithFeedback>
</Tooltip>
)}

Update to

      {isComposerFullSize ? (
        <Tooltip text={translate('reportActionCompose.collapse')}>
            <PressableWithFeedback
                onPress={(e) => {
                    e?.preventDefault();
                    raiseIsScrollLikelyLayoutTriggered();
                    setIsComposerFullSize(reportID, false);
                }}
                // Keep focus on the composer when Collapse button is clicked.
                onMouseDown={(e) => e.preventDefault()}
                style={styles.composerSizeButton}
                disabled={isBlockedFromConcierge || disabled}
                role={CONST.ROLE.BUTTON}
                accessibilityLabel={translate('reportActionCompose.collapse')}
            >
                <Icon
                    fill={theme.icon}
                    src={Expensicons.Collapse}
                />
            </PressableWithFeedback>
        </Tooltip>
    ) : null}

    {!isComposerFullSize ? (
        <Tooltip text={translate('reportActionCompose.expand')}>
            <PressableWithFeedback
                onPress={(e) => {
                    e?.preventDefault();
                    raiseIsScrollLikelyLayoutTriggered();
                    setIsComposerFullSize(reportID, true);
                }}
                // Keep focus on the composer when Expand button is clicked.
                onMouseDown={(e) => e.preventDefault()}
                style={styles.composerSizeButton}
                disabled={isBlockedFromConcierge || disabled}
                role={CONST.ROLE.BUTTON}
                accessibilityLabel={translate('reportActionCompose.expand')}
            >
                <Icon
                    fill={theme.icon}
                    src={Expensicons.Expand}
                />
            </PressableWithFeedback>
        </Tooltip>
    ) : null}
Screen.Recording.2025-02-05.at.13.10.03.mov

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

None

What alternative solutions did you explore? (Optional)

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.

To resolve this issue, we need to temporarily remove the tooltip before toggling and re-render it with updated content after interactions finish. Some thing like this:

    {isComposerFullSize ? (
        <Tooltip
            text={translate('reportActionCompose.collapse')}
            shouldRender={isShow}
        >
            <PressableWithFeedback
                onPress={(e) => {
                    setIsShow(false);
                    ...
                    InteractionManager.runAfterInteractions(() => {
                        setIsShow(true);
                    });
                }}
                ...
            >
                ...
            </PressableWithFeedback>
        </Tooltip>
    ) : (
        <Tooltip
            text={translate('reportActionCompose.expand')}
            shouldRender={isShow}
        >
            <PressableWithFeedback
                onPress={(e) => {
                    setIsShow(false);
                    ...
                    InteractionManager.runAfterInteractions(() => {
                        setIsShow(true);
                    });
                }}
                ...
            >
                ...
            </PressableWithFeedback>
        </Tooltip>
    )}

Test branch

Copy link

melvin-bot bot commented Feb 10, 2025

@rojiphil, @muttmuure Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
@rojiphil
Copy link
Contributor

Reviewing today

@melvin-bot melvin-bot bot removed the Overdue label Feb 10, 2025
@rojiphil
Copy link
Contributor

Thanks @linhvovan29546 @huult for the proposals. Both proposals would solve the problem.

However, @linhvovan29546 proposal LGTM i.e. adding key to make the tooltip components distinct. But I think it is better to add context specific key value (e.g. composer-expand/composer-collapse instead of generic collapse/expand. Also, this was the first proposal to identify the root cause.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 10, 2025

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

📣 @linhvovan29546 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Feb 11, 2025
@melvin-bot melvin-bot bot added the Weekly KSv2 label Feb 11, 2025
@linhvovan29546
Copy link
Contributor

PR is ready for review!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 12, 2025
@melvin-bot melvin-bot bot changed the title [$250] Web - Compose box - Expand collapse tooltip not dismissed after clicking [Due for payment 2025-02-19] [$250] Web - Compose box - Expand collapse tooltip not dismissed after clicking Feb 12, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 12, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.97-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-02-19. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 12, 2025

@rojiphil @muttmuure @rojiphil The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

Copy link

melvin-bot bot commented Feb 13, 2025

@rojiphil @luacmartins @muttmuure @linhvovan29546 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!

@luacmartins
Copy link
Contributor

PR is merged

@muttmuure muttmuure removed their assignment Feb 14, 2025
@muttmuure
Copy link
Contributor

Heading out on leave - adding auto-assigner

@muttmuure muttmuure added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 14, 2025
Copy link

melvin-bot bot commented Feb 14, 2025

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 14, 2025
@abekkala
Copy link
Contributor

@muttmuure Reviewing this one now to add some status info of where this is at (it's tough being thrown onto a bug issue - a quick summary is helpful!)

@abekkala
Copy link
Contributor

abekkala commented Feb 14, 2025

CURRENT STATUS:

Fix has been chosen and PR created
Deployed to production 2 days ago (Feb 12)

PAYMENT SUMMARY FOR FEB 19

Fix: @linhvovan29546 [$250, if no regressions] Offer
PR Review: @rojiphil [$250, if no regressions] payment via NewDot

@muttmuure
Copy link
Contributor

Sorry! Thanks for taking it

@muttmuure
Copy link
Contributor

Just waiting to be paid out- you got it

@melvin-bot melvin-bot bot added the Overdue label Feb 17, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

@rojiphil, @abekkala, @luacmartins, @linhvovan29546 Whoops! This issue is 2 days overdue. Let's get this updated quick!

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Overdue
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

7 participants