-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] VBA -URL is shown on bottom left corner when Fix the error
is hovered reported by @huzaifa-99
#12692
Comments
Triggered auto assignment to @zanyrenney ( |
Proposal App/src/components/TextLink.js Lines 60 to 66 in 0d653ca
Solution To make it didn't show the bottom left url when hovered we can pass undefined as href prop. In some case, we need to use the TextLink.js but we didn't pass the href (like in this issue), we need to define the href prop default value.
<Text
style={[styles.link, ...additionalStyles]}
accessibilityRole="link"
- href={props.href}
+ href={props.href ? props.href : undefined}
onPress={openLink}
onKeyDown={openLinkIfEnterKeyPressed}
>
{props.children}
</Text> or we can change the const defaultProps = {
- href: '',
+ href: undefined,
style: [],
onPress: undefined,
}; Result: Screen.Recording.2022-11-13.at.00.29.12.mov |
ProposalThe issue has origins in App/src/components/FormAlertWrapper.js Lines 59 to 64 in 1b375ed
Since we are not passing an actual link/href prop, this <Text
style={[styles.label, styles.link]}
onPress={props.onFixTheErrorsLinkPressed}
>
{props.translate('common.fixTheErrors')}
</Text> which fixes the bug Demo12692.-.Demo.-.Hide.url.when.hovered.over.link.-.Screen.Recording.2022-11-14.at.1.32.53.AM.mp4 |
Your proposal will cause accessibility issue. |
I thought we are not handling |
But that doesn't mean it's fine to break currently working accessibility feature |
Updated Proposal (original #12692 (comment))If not breaking accessibility is a concern than we can wrap the Basically replacing this whole block App/src/components/FormAlertWrapper.js Lines 57 to 66 in 1b375ed
<View style={{ flexDirection: 'row' }}>
<Text style={[styles.formError, styles.mb0]}>
{`${props.translate('common.please')} `}
</Text>
<Pressable onPress={props.onFixTheErrorsLinkPressed}>
<Text style={[styles.label, styles.link]}>
{props.translate('common.fixTheErrors')}
</Text>
</Pressable>
<Text style={[styles.formError, styles.mb0]}>
{` ${props.translate('common.inTheFormBeforeContinuing')}.`}
</Text>
</View> This also achieves the same result but accessibility is not broken |
This will cause an error console on web, you need to make sure there's no console error happened with your solution.
|
@huzaifa-99 are you able to reproduce the issue in dev? I can reproduce the issue in staging, but not in dev. |
@hungvu193 i see no console errors specific to this change. Can you please describe a little more? Thanks @mdneyazahmad yes still reproducible on |
Screen.Recording.2022-11-14.at.20.00.58.mov@huzaifa-99 FYI |
Hm strange, I don't get this error. @hungvu193 Can you please expand the log to see the stack trace. Thanks in advance For a reference please see this demo (ignore the 30x git file changes in my vscode, they are just console logs) No.console.errors.on.fix.Screen.Recording.2022-11-14.at.6.52.31.PM.mp4 |
@huzaifa-99 Sure, here you are |
@hungvu193 I see where the problem is. In your video demo, you are using this code
but in your comment here, it was different. That's why you get the error because Again see my proposal here for the correct code block |
ah I see. |
ProposalIf href property is not null, diff --git a/src/components/TextLink.js b/src/components/TextLink.js
index 55344d987..3aa2aaf25 100644
--- a/src/components/TextLink.js
+++ b/src/components/TextLink.js
@@ -58,9 +58,10 @@ const TextLink = (props) => {
return (
<Text
+ focusable
style={[styles.link, ...additionalStyles]}
accessibilityRole="link"
- href={props.href}
+ href={props.href ? props.href : null}
onPress={openLink}
onKeyDown={openLinkIfEnterKeyPressed}
>
ORdiff --git a/src/components/TextLink.js b/src/components/TextLink.js
index 55344d987..bff36764b 100644
--- a/src/components/TextLink.js
+++ b/src/components/TextLink.js
@@ -25,7 +25,7 @@ const propTypes = {
};
const defaultProps = {
- href: '',
+ href: null,
style: [],
onPress: undefined,
};
@@ -58,6 +58,7 @@ const TextLink = (props) => {
return (
<Text
+ focusable
style={[styles.link, ...additionalStyles]}
accessibilityRole="link"
href={props.href} Can somebody test this for me. I am not able to reproduce on my macbook. |
Looks like something related to As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our Feel free to drop a note in #expensify-open-source with any questions. |
Updated ProposalThis fixes the issue diff --git a/src/components/TextLink.js b/src/components/TextLink.js
index 55344d987..a453b9788 100644
--- a/src/components/TextLink.js
+++ b/src/components/TextLink.js
@@ -25,7 +25,7 @@ const propTypes = {
};
const defaultProps = {
- href: '',
+ href: null,
style: [],
onPress: undefined,
};
Thanks @huzaifa-99 I can reproduce the issue in DEV. |
The job listing is here: https://www.upwork.com/jobs/~01bd917604edb70bce |
Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
I am having troubles logging in to Upwork just now: I'll hire you when I get it sorted, sorry @hungvu193 |
no worries :) |
I got back in and have hired you @hungvu193 - let me know if you have any further questions :) |
Thank you, I accepted your offer :) |
@zanyrenney am I eligible for reporting on this? |
Yes! I have hired you there too @huzaifa-99 :) |
@hungvu193, @parasharrajat, @zanyrenney, @aldo-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Hired contributors, waiting on the reviews @aldo-expensify @parasharrajat |
PR deployed to PROD 5 days back. #12858 (comment) |
Waiting until the 7 days and then we will be ready for payment. |
sent the payment to you both on upwork @hungvu193 @huzaifa-99 - any questions, lmk! |
@zanyrenney Since the PR was merged within 3 days, Can I have the bonus as well? |
@zanyrenney Could you please send me offer for C+? |
Friendly bump @zanyrenney |
have also extended the contract to you @parasharrajat - please accept it so I can pay it out. @hungvu193 bonus has been paid. |
@zanyrenney Accepted. |
@parasharrajat paid, inc bonus! closing this issue out now as everyone has been paid. |
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:
Expected Result:
The label “fix-the-errors” should not show url-address when hovered
Actual Result:
“fix-the-errors” label is showing the current url as address on bottom-left screen corner when hovered
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.2.27-3
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/201452993-388bb712-3673-4a28-822c-43aeb6623b99.mp4
Expensify/Expensify Issue URL:
Issue reported by: @huzaifa-99
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1668124426446149
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: