Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.51k stars 2.87k forks source link

[HOLD for payment 2023-09-06] [$1000] Mweb – Assign Task – Mention options hides behind header. #22930

Closed kbecciv closed 1 year ago

kbecciv commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open any " Assign Task " chat.
  2. Type “@” in composer, so that options appear.
  3. Notice that the first option hides behind header.

Expected Result:

Options should not hide, infect adjust itself according to the space.

Actual Result:

Mention options hide behind header

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.40-5 Reproducible in staging?: n/a Reproducible in production?: n/a 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 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/93399543/138ac274-f9ad-4fea-a11c-59f23ec14089

Expensify/Expensify Issue URL: Issue reported by: @usmantariq96 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689313870564749

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0132b9832a42192981
  • Upwork Job ID: 1681653446268710912
  • Last Price Increase: 2023-08-02
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

allroundexperts commented 1 year ago

Proposal

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

Assign Task - Mention options hide behind the header

What is the root cause of that problem?

The issue happens on screens with very small height. On these screens, the mention menu overlaps with the assign task header. The wrapper component of ReportFooter and thus the MentionOptions contains an overflow: hidden property. This causes the mention options to remain hidden beyond the height of the wrapper.

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

We need to remove overflowHidden from here.

After that, we also need to add the following styles here:

<OfflineWithFeedback
  pendingAction={addWorkspaceRoomOrChatPendingAction}
  errors={addWorkspaceRoomOrChatErrors}
  shouldShowErrorMessages={false}
  needsOffscreenAlphaCompositing
  style={{zIndex: 1, backgroundColor: styles.appContent.backgroundColor}}
>

What alternative solutions did you explore? (Optional)

Alternatively, we can also move the MentionOptions outside of the wrapper here. Doing this will require to treat it as a popover instead so that it can show up based on the Composer acting as a anchor.

melvin-bot[bot] commented 1 year ago

@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

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

aimane-chnaif commented 1 year ago

Not overdue. Just made external

jahnical commented 1 year ago

Proposal

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

Mention Options hide behind header in Task reporting page when you use @ to tag someone.

What is the root cause of that problem?

The MentionSuggestions is not cutting off items "yet" but it's being hidden by the Header because its z-index (Depth in the z axis which determines which element is in front of the other) is lower than that of the header, Making it overlapped by the header component. This problem can also happen on a larger screen when the suggestions are many.

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

It's a matter of changing the styling by making the z-index of MentionSuggestions larger than the Header and also give it maximum height make it to scroll on overflow instead of hiding other suggestions.

What alternative solutions did you explore? (Optional)

Other alternatives could be making the MentionSuggestions a modal so that it always overshadows the other elements.

melvin-bot[bot] commented 1 year ago

📣 @jahnical! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
jahnical commented 1 year ago

Contributor details Your Expensify account email: jahnics1@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0172473540122a1271

melvin-bot[bot] commented 1 year ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

kevinksullivan commented 1 year ago

Hey @aimane-chnaif , have you been able to review the proposals above?

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 1 year ago

@kevinksullivan, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] commented 1 year ago

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

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

kevinksullivan commented 1 year ago

Recruiting a new C+. @robertKozik can you review the proposals above?

aimane-chnaif commented 1 year ago

@kevinksullivan sorry, I was still waiting for more proposals.

melvin-bot[bot] commented 1 year ago

@kevinksullivan @robertKozik 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!

robertKozik commented 1 year ago

Hey all! Will look into this issue shortly!

kevinksullivan commented 1 year ago

Thanks @robertKozik !

robertKozik commented 1 year ago

Shortly was longer than I expected 😅 I've checked both of the proposals in action:

https://github.com/Expensify/App/assets/61146594/c5611d7d-a47e-4e01-8bdb-27c543d27c90

animaton after:

https://github.com/Expensify/App/assets/61146594/d3c05a23-4e96-41a5-a7ea-b50ed3a96c5a

Also, I was thinking about restricting the height of the mention options to always be below the header, even at the cost of fewer mentions being rendered at the time. It should solve the issue. Do you think it's possible?

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

kevinksullivan commented 1 year ago

Proposals still in review

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

kevinksullivan commented 1 year ago

@johncschuster I am going OOO for a week, so tapping you in to help out in the interim. Thanks!

robertKozik commented 1 year ago

@allroundexperts @jahnical pinging you for addressing my review of your proposals

melvin-bot[bot] commented 1 year ago

@johncschuster @kevinksullivan @robertKozik this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

allroundexperts commented 1 year ago

Also, I was thinking about restricting the height of the mention options to always be below the header, even at the cost of fewer mentions being rendered at the time. It should solve the issue. Do you think it's possible?

Yes. This is possible. In order to do that, we have to replace the current measureHeightOfSuggestionRows function here with the following:

const measureHeightOfSuggestionRows = (numRows, isSuggestionPickerLarge) => {
        const maxAmountAllowed = Math.min(CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_SUGGESTIONS_IN_CONTAINER, Math.floor((props.availableHeight - CONST.CHAT_FOOTER_MIN_HEIGHT) / CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT));
        if (isSuggestionPickerLarge) {
            if (numRows > maxAmountAllowed) {
                // On large screens, if there are more than 5 suggestions, we display a scrollable window with a height of 5 items, indicating that there are more items available
                return maxAmountAllowed * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT;
            }
            return numRows * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT;
        }
        if (numRows > 2) {
            // On small screens, we display a scrollable window with a height of 2.5 items, indicating that there are more items available beyond what is currently visible
            return CONST.AUTO_COMPLETE_SUGGESTER.SMALL_CONTAINER_HEIGHT_FACTOR * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT;
        }
        return numRows * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT;
    };

In order to use the function above, we have to pass down the availableHeight prop from ReportScreen (stored in state as this.state.skeletonViewContainerHeight) over to BaseAutoCompleteSuggestion component via ReportFooter -> ReportActionCompose -> MentionSuggestions -> AutoCompleteSuggestions -> BaseAutoCompleteSuggestions.

Result

https://github.com/Expensify/App/assets/30054992/fba64d19-2c15-4bb3-9546-069225e6c3b5

allroundexperts commented 1 year ago
  • but it's causing a behavior change in FloatingMessageCounter. Even after applying your fix for not rendering it, the animation looks different as it's not sliding out from behind the bar (videos attached)

Updated proposal to handle this.

robertKozik commented 1 year ago

Thanks @allroundexperts for this insight and updating the proposal. I think we can proceed with your updated proposal, as it no longer has the problem with animaton and it's not changing the already established behaviour of the mentions options.

Selected proposal: Proposal Author of proposal: @allroundexperts

🎀 👀 🎀 C+ reviewed

melvin-bot[bot] commented 1 year ago

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

johncschuster commented 1 year ago

Not overdue. This was just assigned out.

allroundexperts commented 1 year ago

Bump for the assignment @AndrewGable!

melvin-bot[bot] commented 1 year ago

📣 @allroundexperts Please request via NewDot manual requests for the Contributor role ($1000)

melvin-bot[bot] commented 1 year ago

📣 @usmantariq96 We're missing your Upwork ID to automatically send you an offer for the Reporter role. Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

allroundexperts commented 1 year ago

@robertKozik PR is ready.

kevinksullivan commented 1 year ago

@johncschuster I'll take this back from ya. Thanks for the help!

johncschuster commented 1 year ago

No problem! Thanks, Kev!

kevinksullivan commented 1 year ago

Awaiting review from @AndrewGable

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.58-5 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 2023-09-06. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

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:

kevinksullivan commented 1 year ago

@allroundexperts @robertKozik please finish up the checklist above when you get a chance. Thanks!

melvin-bot[bot] commented 1 year ago

@AndrewGable, @johncschuster, @kevinksullivan, @allroundexperts, @robertKozik Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] commented 1 year ago

@AndrewGable, @johncschuster, @kevinksullivan, @allroundexperts, @robertKozik Eep! 4 days overdue now. Issues have feelings too...

kevinksullivan commented 1 year ago

Upwork job expired so I created a new one and sent offers to @usmantariq96 and @allroundexperts . Lmk when you accept.

kevinksullivan commented 1 year ago

Also, @allroundexperts please finish out the checklist above

usmantariq96 commented 1 year ago

@kevinksullivan accepted Thanks