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

[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Workspace switcher search bar is in the wrong place #40826

Closed
1 of 6 tasks
rlinoz opened this issue Apr 23, 2024 · 40 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

Comments

@rlinoz
Copy link
Contributor

rlinoz commented Apr 23, 2024

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:**v1.4.64-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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:
Slack conversation:

Action Performed:

Break down in numbered steps

  1. Add enough workspaces so the search in the workspace switcher is visible(8+)
  2. Open the workspace switcher

Expected Result:

Describe what you think should've happened
The search bar should be below the workspaces title
image

Actual Result:

Describe what actually happened
Search bar is below Choose workspace

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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f05cea763c8e597d
  • Upwork Job ID: 1782868524583206912
  • Last Price Increase: 2024-04-23
  • Automatic offers:
    • getusha | Reviewer | 0
    • Krishna2323 | Contributor | 0
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@rlinoz rlinoz added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Apr 23, 2024

Proposal

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

Workspace switcher search bar is in the wrong place

What is the root cause of that problem?

We have included the everything section as a section of selection list.

{
title: translate('workspace.switcher.everythingSection'),
shouldShow: true,
indexOffset: 0,
data: [
{
text: CONST.WORKSPACE_SWITCHER.NAME,
policyID: '',
icons: [{source: Expensicons.ExpensifyAppIcon, name: CONST.WORKSPACE_SWITCHER.NAME, type: CONST.ICON_TYPE_AVATAR}],
brickRoadIndicator: getIndicatorTypeForPolicy(undefined),
isSelected: activeWorkspaceID === undefined,
keyForList: CONST.WORKSPACE_SWITCHER.NAME,
},
],
},

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

We first need to remove the section from SelectionList sections and create the jsx for everything section.

pseudo-code:

            <View style={[styles.mh4, styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.mb1]}>
                <Text
                    style={styles.label}
                    color={theme.textSupporting}
                >
                    {translate('workspace.switcher.everythingSection')}
                </Text>
            </View>
            <View>
                <UserListItem
                    item={{
                        text: CONST.WORKSPACE_SWITCHER.NAME,
                        policyID: '',
                        icons: [{source: Expensicons.ExpensifyAppIcon, name: CONST.WORKSPACE_SWITCHER.NAME, type: CONST.ICON_TYPE_AVATAR}],
                        brickRoadIndicator: getIndicatorTypeForPolicy(undefined),
                        isSelected: activeWorkspaceID === undefined,
                        keyForList: CONST.WORKSPACE_SWITCHER.NAME,
                    }}
                    isFocused={false}
                    isDisabled={false}
                    showTooltip={false}
                    canSelectMultiple={false}
                    onSelectRow={() =>
                        selectPolicy({
                            text: CONST.WORKSPACE_SWITCHER.NAME,
                            policyID: '',
                            icons: [{source: Expensicons.ExpensifyAppIcon, name: CONST.WORKSPACE_SWITCHER.NAME, type: CONST.ICON_TYPE_AVATAR}],
                            brickRoadIndicator: getIndicatorTypeForPolicy(undefined),
                            isSelected: activeWorkspaceID === undefined,
                            keyForList: CONST.WORKSPACE_SWITCHER.NAME,
                        })
                    }
                />
            </View>

This will be placed before the selection list. This is just pseudo-code, props are filled randomly. Minor styling changes can be discussed during PR phase.

What alternative solutions did you explore? (Optional)

remove_everything_Section.mp4

@rlinoz rlinoz added Help Wanted Apply this label when an issue is open to proposals by contributors External Added to denote the issue can be worked on by a contributor labels Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

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

@melvin-bot melvin-bot bot changed the title Workspace switcher search bar is in the wrong place [$250] Workspace switcher search bar is in the wrong place Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

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

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 23, 2024

Proposal

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

Search bar is below Choose workspace

What is the root cause of that problem?

This is a feature request

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

  1. Pass the BaseSelectionList's current TextInput component (wrapped inside a memoized variable) as a children of section's CustomSectionHeader. Of course, we'll need to update the types accordingly:

if (section.CustomSectionHeader) {
return <section.CustomSectionHeader section={section} />;
}

<section.CustomSectionHeader
    section={section}
>
    {textInput}
</section.CustomSectionHeader>
  1. Inside WorkspacesSectionHeader, render that children with proper style. In WorkspaceSwitcherPage:
    • Disable shouldShowTopTextInput (new prop) to hide the current text input
    • Move headerMessage to WorkspacesSectionHeader (or we can wrap inside the above mentioned variable)
    • Use iconLeft to display the magnifier icon and modify textInputLabel to Find a workspace.

What alternative solutions did you explore? (Optional)

NA

@Krishna2323
Copy link
Contributor

Proposal Updated

  • Added a note and result video

@gijoe0295
Copy link
Contributor

Proposal updated to include detailed implementation.

@getusha
Copy link
Contributor

getusha commented Apr 24, 2024

@gijoe0295 i don't like the idea of modifying BaseSelectionList just for this since it's used multiple places.
@Krishna2323 could you provide a more complete branch to test? there are some details you missed from the design.

@Krishna2323
Copy link
Contributor

@getusha test branch.

@Delgee
Copy link
Contributor

Delgee commented Apr 24, 2024

Proposal

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

Workspace switcher search bar is in the wrong place

What is the root cause of that problem?

Everything section is part of same SelectionList component. So according to SelectionList component logic every section will be under text input

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

We just need to create one more SelectionList component that have everything section inside. So everything section will be rendered on top of the text input. This way we don't need to do custom style changes for section and don't need create custom logic to replicate SelectionList functionality

<SelectionList<WorkspaceListItem>
    containerStyle={{
        flexBasis: 'auto',
        flexGrow: 0,
    }}
    ListItem={UserListItem}
    sections={everythingSection}
    onSelectRow={selectPolicy}
    initiallyFocusedOptionKey={activeWorkspaceID ?? CONST.WORKSPACE_SWITCHER.NAME}
/>
<SelectionList<WorkspaceListItem>
    ListItem={UserListItem}
    sections={sections}
    onSelectRow={selectPolicy}
    textInputLabel={usersWorkspaces.length >= CONST.WORKSPACE_SWITCHER.MINIMUM_WORKSPACES_TO_SHOW_SEARCH ? translate('common.search') : undefined}
    textInputValue={searchTerm}
    onChangeText={setSearchTerm}
    headerMessage={headerMessage}
    listFooterContent={shouldShowCreateWorkspace ? WorkspaceCardCreateAWorkspaceInstance : null}
    initiallyFocusedOptionKey={activeWorkspaceID ?? CONST.WORKSPACE_SWITCHER.NAME}
    showLoadingPlaceholder
/>

What alternative solutions did you explore? (Optional)

We can separate everything section from SelectionList component and write everything custom.

Screen.Recording.2024-04-25.at.01.06.40.mov

Copy link

melvin-bot bot commented Apr 24, 2024

📣 @Delgee! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

@Delgee
Copy link
Contributor

Delgee commented Apr 24, 2024

Contributor details
Your Expensify account email: stormrage0527@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/delgee

Copy link

melvin-bot bot commented Apr 24, 2024

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

@getusha
Copy link
Contributor

getusha commented Apr 26, 2024

The branch @Krishna2323 provided looks good, we can proceed with that.

Screenshot 2024-04-26 at 4 28 33 in the afternoon

This is not highlighted when selected, but we can address this on the PR as it is a minor issue.
🎀 👀 🎀 C+ Reviewed!

Copy link

melvin-bot bot commented Apr 26, 2024

Triggered auto assignment to @blimpich, 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 Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 26, 2024

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

Copy link

melvin-bot bot commented Jun 11, 2024

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:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR:
  • [@getusha] 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. Link to comment:
  • [@getusha] A discussion in #expensify-bugs 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:
  • [@getusha] Determine if we should create a regression test for this bug.
  • [@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-18] [$250] Workspace switcher search bar is in the wrong place [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Workspace switcher search bar is in the wrong place Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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 2024-06-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 2024

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:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR:
  • [@getusha] 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. Link to comment:
  • [@getusha] A discussion in #expensify-bugs 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:
  • [@getusha] Determine if we should create a regression test for this bug.
  • [@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jun 18, 2024
@JmillsExpensify
Copy link

JmillsExpensify commented Jun 22, 2024

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Jun 22, 2024
@JmillsExpensify
Copy link

JmillsExpensify commented Jun 22, 2024

I've paid out @Krishna2323. @getusha Mind filling out the BZ checklist above, and additionally, can you confirm if you'll be paid via Upwork or NewDot?

@getusha
Copy link
Contributor

getusha commented Jun 23, 2024

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:

[@getusha] The PR that introduced the bug has been identified. Link to the PR: N/a this is a feature request
[@getusha] 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. Link to comment: N/a
[@getusha] A discussion in #expensify-bugs 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: N/a
[@getusha] Determine if we should create a regression test for this bug: I don't think we need a regression test for this, as it is not something that will be accidentally affected unless there is intentional UI design change.
[@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/a

@getusha
Copy link
Contributor

getusha commented Jun 23, 2024

I've paid out @Krishna2323. @getusha Mind filling out the BZ checklist above, and additionally, can you confirm if you'll be paid via Upwork or NewDot?

newDot, i just requested. thanks!

@mallenexpensify
Copy link
Contributor

@getusha , the job was created as a milestone in Upwork so it's been auto-paid. The hire date was before your cutoff date too, can you please rescind your offer request for payment via NewDot?

Contributor: @Krishna2323 paid $250 via Upwork
Contributor+: @getusha paid $250 via Upwork

@JmillsExpensify
Copy link

$250 approved for @getusha

@getusha
Copy link
Contributor

getusha commented Jun 24, 2024

@getusha , the job was created as a milestone in Upwork so it's been auto-paid. The hire date was before your cutoff date too, can you please rescind your offer request for payment via NewDot?

@mallenexpensify apologies for the delay, just refunded the amount on UW

Screenshot 2024-06-24 at 9 53 32 at night

@JmillsExpensify
Copy link

I think we're good here now.

@mallenexpensify
Copy link
Contributor

The hire date was before your cutoff date too, can you please rescind your offer request for payment via NewDot?

@getusha we need to pay via Upwork here because you were assigned here before 5/9, your eligible date. Can you please rescind your NewDot payment request and accept this new job I created? Thx
https://www.upwork.com/jobs/~01d662b6ac617b4224

@getusha
Copy link
Contributor

getusha commented Jun 27, 2024

@getusha we need to pay via Upwork here because you were assigned here before 5/9, your eligible date. Can you please rescind your NewDot payment request and accept this new job I created? Thx

@mallenexpensify is there a way to refund the ND payment?

@mallenexpensify
Copy link
Contributor

If you've already been paid via NewDot for this, let's not complicate things with a refund. Both you and I are assigned to this issue, I'll comment there that payment is already made and link to here (assuming it's $250). Also.. let's consider this an edge case, it should not be used as a reference in the future :)

@mallenexpensify
Copy link
Contributor

d'oh, looks like you haven't accepted the job in Upwork, can you plz @getusha ?
https://www.upwork.com/jobs/~01d662b6ac617b4224

@getusha
Copy link
Contributor

getusha commented Jun 28, 2024

d'oh, looks like you haven't accepted the job in Upwork, can you plz @getusha ?

Accepted. thank you!

@mallenexpensify
Copy link
Contributor

Paid, thanks @getusha
Payment confirmation is correct above

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
Projects
None yet
Development

No branches or pull requests

8 participants