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 2023-10-30] [500] Workspace - Settings - Can't select currency item text #29685

Closed
2 of 6 tasks
kbecciv opened this issue Oct 16, 2023 · 24 comments
Closed
2 of 6 tasks
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

@kbecciv
Copy link

kbecciv commented Oct 16, 2023

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: 1.3.84.3
Reproducible in staging?: y
Reproducible in production?: y
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: @Krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697421082877669

Action Performed:

  1. Open settings > workspaces > select workspace > settings > default currency
  2. Try to highlight text of any currency item

Expected Result:

ext should be selectable.

Actual Result:

Text is not selectable.

Workaround:

Unknown

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

Android: Native
android_native.1.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Windows: Chrome
web_chrome.1.mp4
Recording.5011.mp4
MacOS: Desktop
desktop_app.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 16, 2023
@dukenv0307
Copy link
Contributor

Proposal

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

Inconsistency when selecting currency item text in WS Settings > Default currency and Request money > Select currency

What is the root cause of that problem?

Here, we added styles.userSelectNone, which makes the item text in the Default currency page not selectable

styles.userSelectNone,

While the same logic is not applied for Request money > Select currency

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

  1. If item text should be selectable
  • We should remove the styles.userSelectNone in the Default currency page:

styles.userSelectNone,

  1. If item text should not be selectable
  • we should add styles.userSelectNone to make sure all currency pages are consistent

<SectionList
ref={innerRef}
nestedScrollEnabled
style={listStyles}

The most suitable place to apply this style can be discussed further in the PR implementing phase

What alternative solutions did you explore? (Optional)

@eh2077
Copy link
Contributor

eh2077 commented Oct 16, 2023

Proposal

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

Can't select currency item text

What is the root cause of that problem?

The root cause of this issue is that the workspace currency setting select page use SelectionList

<SelectionList
sections={sections}
textInputLabel={translate('workspace.editor.currencyInputLabel')}
textInputValue={searchText}
onChangeText={setSearchText}
onSelectRow={onSelectCurrency}
headerMessage={headerMessage}
initiallyFocusedOptionKey={initiallyFocusedOptionKey}
showScrollIndicator
/>

and the BaseListItem has select-none style

styles.userSelectNone,

So, we can select currency item text from workspace setting currency page.

But from the Select a currency page of request money flow, we're using OptionsSelector to display the currency list

<OptionsSelector
sections={sections}
onSelectRow={confirmCurrencySelection}
value={searchValue}
onChangeText={setSearchValue}
textInputLabel={translate('common.search')}
headerMessage={headerMessage}
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle}
initiallyFocusedOptionKey={initiallyFocusedOptionKey}
shouldHaveOptionSeparator
autoFocus={false}
ref={optionsSelectorRef}
/>

which is allowed to select text.

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

As the SelectionList is newer, I think we can let Select a currency page use SelectionList as well. Then we can have consistent behaviour.

If we want the use to select text, then we can consider removing select-none style from BaseListItem.

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

Upwork posting - https://www.upwork.com/jobs/~013277c25acbd7d5f2

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Oct 16, 2023

Proposal by: @Krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697421082877669

Proposal

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

Can't select currency item text

What is the root cause of that problem?

We are adding styles.userSelectNone to BaseListItem.

styles.userSelectNone,

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

We should remove the style or we should only apply it when option is disabled.

Result

@narefyev91
Copy link
Contributor

Proposal from @eh2077 looks good to me #29685 (comment)
We should use the same logic for currency picker in all needed places. Just swapping to use SelectionList - will bring full consistence between flows
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@eh2077
Copy link
Contributor

eh2077 commented Oct 17, 2023

@Christinadobrzyn I found that selection lists use the new implementation of SelectionList, like Workspace currency setting, Pronouns, Timezone, Year and Country, are all not allowed to select text of items. So the IOU currency selection list can also be same with them right?

cc @pecanoro @narefyev91

@Christinadobrzyn Christinadobrzyn changed the title Workspace - Settings - Can't select currency item text [500] Workspace - Settings - Can't select currency item text Oct 17, 2023
@Christinadobrzyn
Copy link
Contributor

Hi @eh2077 I'm not quite sure the answer to that. I think that is true but @pecanoro and @narefyev91 would probably know more about the coding.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Oct 17, 2023

@narefyev91 and @pecanoro what are your thoughts? Is this something to fix?

@eh2077
Copy link
Contributor

eh2077 commented Oct 18, 2023

@Christinadobrzyn Thanks for your input!

Yes, It's clear we only need to fix the inconsistency of manual requests. C+ team @narefyev91 suggested same in their comment #29685 (comment)

@narefyev91
Copy link
Contributor

@Christinadobrzyn yup the main issue here that we have inconsistence between currency selection in workspace setting and request money flows. We need to following the same way for both. In case that new implementation used SelectionList - my suggestion only to update it for currency selection, and do not touch any other places

@pecanoro
Copy link
Contributor

@narefyev91 I agree with you! Assigning @eh2077 so we can keep both consistent

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 18, 2023
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Weekly KSv2 labels Oct 19, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Oct 23, 2023
@melvin-bot melvin-bot bot changed the title [500] Workspace - Settings - Can't select currency item text [HOLD for payment 2023-10-30] [500] Workspace - Settings - Can't select currency item text Oct 23, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.88-11 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 2023-10-30. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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:

  • [@narefyev91] The PR that introduced the bug has been identified. Link to the PR:
  • [@narefyev91] 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:
  • [@narefyev91] 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:
  • [@narefyev91] Determine if we should create a regression test for this bug.
  • [@narefyev91] 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.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/333593

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 29, 2023
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Oct 30, 2023

Payouts due:

Issue Reporter: $50 @Krishna2323 (Paid in Upwork)
Contributor: $500 + $250 @eh2077 (Paid in Upwork)
Contributor+: $500 + $250 @narefyev91 (paid as outside contractor)

Eligible for 50% #urgency bonus? Y - looks like the PR was created on Oct 18th and merged on Oct 19

Upwork job is here.

@eh2077 can you create a regression test?

@melvin-bot melvin-bot bot added the Overdue label Nov 2, 2023
@Christinadobrzyn
Copy link
Contributor

nudge @eh2077 for a regression test when possible! Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Nov 2, 2023
@eh2077
Copy link
Contributor

eh2077 commented Nov 3, 2023

Regression test

  1. Click FAB and choose Request money
  2. Select Manual tab
  3. Click to change the default currency
  4. Verify that Select a currency page is open and the default currency is highlighted and has a green check mark on the right side
  5. On web or desktop, try to drag and select currency item text
  6. Verify that the text is not selectable
  7. Search a currency USD and select it
  8. Verify the page is redirected to the Request money page with currency changed to USD
  9. Enter amount and split money with someone
  10. Verify that it's able to split the amount money in selected currency with someone

@eh2077
Copy link
Contributor

eh2077 commented Nov 3, 2023

@Christinadobrzyn Sorry for late. Added regression test 👆

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

@pecanoro, @narefyev91, @Christinadobrzyn, @eh2077 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@Christinadobrzyn
Copy link
Contributor

Awesome! Thanks @eh2077! Created the regression test and paid out based on this payment structure. Closing!

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

6 participants