Repository navigation
[HOLD for payment 2024-01-24] [$500] Share code/Get $250 - Copy referral link is not activated using the Tab button #32080
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Nov 28, 2023 github-actions commented
on Nov 28, 2023 on Nov 28, 2023 – with GitHub ActionsContributorMore actions👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Triggered auto assignment to @robertjchen (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.Proposal
Please re-state the problem that we are trying to solve in this issue.
- Share code/Get $250 - Copy referral link is not activated using the Tab button
What is the root cause of that problem?
- Our "Coppy referral link" button is based on PressableWithDelayToggle component
- Currently, the wrapper component of the PressableWithDelayToggle is a Text, so it can not be focused by using Tab.
const PressableView = inline ? Text : PressableWithoutFeedback;
What changes do you think we should make in order to solve the problem?
- We can update:
<PressableView
to:
<PressableView tabIndex={0} ... />- Additionally, on this page, when the user presses ENTER, it will close the referral page. The RCA is that the "Got it" button has
pressOnEnter: true
App/src/pages/ReferralDetailsPage.js
Lines 106 to 113 in 61ed900
<Button success style={[styles.w100]} text={translate('common.buttonConfirm')} onPress={() => Navigation.goBack(getFallbackRoute())} pressOnEnter enterKeyEventListenerPriority={1} /> - So the solution is:
- First, add the
dataSet={{tag: 'pressable'}}to:
<PressableView
It will become:
<PressableView tabIndex={0} dataSet={{tag: 'pressable'}} ... />- Then, what we need to do is just updating:
App/src/components/Button/validateSubmitShortcut/index.ts
Lines 13 to 21 in 1682be4
const validateSubmitShortcut: ValidateSubmitShortcut = (isFocused, isDisabled, isLoading, event) => { const eventTarget = event?.target as HTMLElement; if (!isFocused || isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') { return false; } event?.preventDefault(); return true; };
to:
const validateSubmitShortcut: ValidateSubmitShortcut = (isFocused, isDisabled, isLoading, event, shouldSkipWhenFocusingOnPressable) => { const eventTarget = event?.target as HTMLElement; + const focusedDataTag = lodashGet(event, ['target', 'attributes', 'data-tag', 'value']); + if (focusedDataTag === 'pressable' && shouldSkipWhenFocusingOnPressable) { + return; + } if (!isFocused || isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') { return false; } event?.preventDefault(); return true; };- The
shouldSkipWhenFocusingOnPressableis added to keep the backward compatibility
- addedDailyKSv2KSv2and removedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deploymentHourlyKSv2KSv2
on Nov 28, 2023 Not a blocker, same happens in production
https://github.com/Expensify/App/assets/36083550/ada6e6b7-c30e-4abf-a4e5-d410139cd20dReacted by Robert Chen@robertjchen Whoops! This issue is 2 days overdue. Let's get this updated quick!
@robertjchen I just pdated my proposal
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on Dec 3, 2023 36 remaining items
Bug0 Triage Checklist (Main S/O)
- This "bug" occurs on a supported platform (ensure
Platformsin 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
- This "bug" occurs on a supported platform (ensure
@greg-schroeder Could you please assist with the next steps here now that the PR has been merged and deployed? Thanks!
@robertjchen, @narefyev91, @greg-schroeder, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!
@robertjchen, @narefyev91, @greg-schroeder, @DylanDylann Huh... This is 4 days overdue. Who can take care of this?
bump @greg-schroeder 🙏
- addedAwaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionand removedReviewingHas a PR in reviewHas a PR in review
on Jan 24, 2024 - changed the title
[-][$500] Share code/Get $250 - Copy referral link is not activated using the Tab button[/-][+][HOLD for payment 2024-01-24] [$500] Share code/Get $250 - Copy referral link is not activated using the Tab button[/+]on Jan 24, 2024 Okay looks like this is ready to pay
C: @DylanDylann
C+: @narefyev91both $500
The upwork job closed for inactivity so I have to create a new one
offer sent @DylanDylann - also I forgot @narefyev91 you're CS, right?
Reacted by narefyev91
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.4.4-0
Reproducible in staging?: Y
Reproducible in production?: N
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: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
Copy referral link activated using the Tab button
Actual Result:
Copy referral link is not activated using the Tab button
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6292462_1701126845299.bandicam_2023-11-27_22-08-12-783.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @greg-schroeder