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

override default anchor style with parent style #5060

Merged

Conversation

pROFESOR11
Copy link
Contributor

Details

if there are specific styles being applied to the parent element that conflict with the default styles of the link, this PR will give preference to the parent style.

Fixed Issues

$ #4897

Tests

QA Steps

  1. Launch the app
  2. Log in with any account
  3. Start your conversation with text www.google.com

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

4897_Web_Screenshot

Mobile Web

4897_MobileWeb_Screenshot

Desktop

4897_Desktop_Screenshot

iOS

Android

4897_Android_Screenshot

@pROFESOR11 pROFESOR11 requested a review from a team as a code owner September 3, 2021 11:29
@MelvinBot MelvinBot requested review from marcaaron and removed request for a team September 3, 2021 11:29
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@pROFESOR11
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@parasharrajat
Copy link
Member

From screens, looks like text is not vertical aligned and relatively large for link.

@pROFESOR11
Copy link
Contributor Author

Hi @parasharrajat,
Thanks for your feedback. This PR only aims to solve issues listed in Fixed issues section above.

If you check the screenshot in the original issue description, you can see similar styling there too. So I don't think that this PR brings along those problems.

roryabraham
roryabraham previously approved these changes Sep 8, 2021
Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM

@roryabraham
Copy link
Contributor

Heads up @pROFESOR11 there are some merge conflicts on this PR.

@pROFESOR11
Copy link
Contributor Author

pROFESOR11 commented Sep 14, 2021

Hi @roryabraham and @marcaaron,
Thanks for letting me know, resolved conflicts now.

@@ -72,6 +72,7 @@ function AnchorRenderer({tnode, key, style}) {
// An auth token is needed to download Expensify chat attachments
const isAttachment = Boolean(htmlAttribs['data-expensify-source']);
const fileName = lodashGet(tnode, 'domNode.children[0].data', '');
const parentStyle = lodashGet(tnode, 'parent.styles.nativeTextRet', {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks OK to me, but seems potentially brittle because it's relying on some internal detail of the html library we are using.

e.g. I'm not really sure what parent.styles.nativeTextRet is or whether we can depend on it to always exist? I also don't have an alternative suggestion so I'm fine with this for now - but would have preferred more comments in the code to add context about why we are doing this.

@marcaaron marcaaron merged commit a6bc4f6 into Expensify:main Sep 14, 2021
@OSBotify
Copy link
Contributor

@pROFESOR11, Great job getting your first Expensify/App pull request over the finish line! 🎉

I know there's a lot of information in our contributing guidelines, so here are some points to take note of 📝:

  1. Now that your first PR has been merged, you can be hired for another issue. Once you've completed a few issues, you may be eligible to work on more than one job at a time.
  2. Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that it doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically, we would revert this PR and give you another chance to create a similar PR without causing a regression.
  3. Once your PR is deployed to production, we start a 7-day timer ⏰. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job. 💰

So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! 😊

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.0.98-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Jag96 in version: 1.0.99-4 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants