FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Create a RecommendedBadge component by bobsilverberg · Pull Request #7958 · mozilla/addons-frontend · GitHub

Create a RecommendedBadge component - #7958

Merged
bobsilverberg merged 11 commits into
mozilla:masterfrom
bobsilverberg:recommended-badge-7957
May 7, 2019
Merged

bobsilverberg merged 11 commits into
mozilla:masterfrom
bobsilverberg:recommended-badge-7957

Conversation

bobsilverberg commented May 2, 2019 •
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes mozilla/addons#13153

Note that I am using the existing "trophy" icon that is used for "Staff Pick", but this will be replaced by a newer icon. I am waiting to acquire that from @brassy-. Note also that the color of the text is from the InVision mockup at https://mozilla.invisionapp.com/share/BXQTIIC86ZN.

Note also that we do not have a SUMO article to link to yet, so currently the link just points to SUMO. I have opened mozilla/addons#13155 as a follow-up to update the link once it is available.

Here's a screenshot of the component in storybook:

bobsilverberg force-pushed the recommended-badge-7957 branch from 88c60dd to 253ac6f Compare May 2, 2019 18:12

codecov-io commented May 2, 2019 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #7958 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    mozilla/addons-frontend#7958      +/-   ##
==========================================
+ Coverage   98.04%   98.09%   +0.05%     
==========================================
  Files         258      259       +1     
  Lines        7152     7349     +197     
  Branches     1325     1325              
==========================================
+ Hits         7012     7209     +197     
  Misses        126      126              
  Partials       14       14
Impacted Files Coverage Δ
src/ui/components/RecommendedBadge/index.js 100% <100%> (ø)
src/disco/pages/DiscoPane/index.js 100% <0%> (ø) ⬆️
src/ui/components/DropdownMenu/index.js 100% <0%> (ø) ⬆️
src/ui/components/LoadingText/index.js 100% <0%> (ø) ⬆️
src/amo/components/SectionLinks/index.js 100% <0%> (ø) ⬆️
src/amo/components/RatingManager/index.js 100% <0%> (ø) ⬆️
src/ui/components/HeroSection/index.js 100% <0%> (ø) ⬆️
src/ui/components/ConfirmButton/index.js 100% <0%> (ø) ⬆️
src/core/components/SurveyNotice/index.js 100% <0%> (ø) ⬆️
src/ui/components/DismissibleTextForm/index.js 100% <0%> (ø) ⬆️
... and 74 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a6b23b...103376f. Read the comment docs.

Copy link
Copy Markdown
Contributor Author

Oops, somehow the test didn't get added. Let me try to find it!

bobsilverberg force-pushed the recommended-badge-7957 branch 2 times, most recently from bd823e9 to a57c691 Compare May 2, 2019 18:40
bobsilverberg force-pushed the recommended-badge-7957 branch from a57c691 to c7f5fbc Compare May 2, 2019 19:38

Copy link
Copy Markdown
Contributor Author

After working on integrating this into the details page, I made a few tweaks to the styles. Here's a new screenshot of storybook at large screen size:

and one at less than large screen size:

Comment thread stories/ui/RecommendedBadge.js Outdated
Comment thread stories/ui/RecommendedBadge.js Outdated
willdurand removed the request for review from kumar303 May 3, 2019 08:15

Copy link
Copy Markdown
Member

Note also that we do not have a SUMO article to link to yet, so currently the link just points to SUMO. I have opened mozilla/addons#13155 as a follow-up to update the link once it is available.

Do we want to add _target=blank?

Copy link
Copy Markdown
Contributor Author

Thanks for the review @willdurand. I have addressed your comments about the storybook story, but for all of the other ones we are awaiting more information.

bobsilverberg requested a review from willdurand May 3, 2019 14:40

Copy link
Copy Markdown
Contributor Author

Note also that we do not have a SUMO article to link to yet, so currently the link just points to SUMO. I have opened mozilla/addons#13155 as a follow-up to update the link once it is available.

Do we want to add _target=blank?

Yes, I think so. I've added it.

Copy link
Copy Markdown
Contributor Author

I received the proper icon, and I have attempted to style it according to the latest prototype. I have not been entirely successful, but it's a start and maybe someone can help me improve it.

Here's what it currently looks like in storybook:

bobsilverberg commented May 6, 2019 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

@MeridelW Can you confirm what the text should be when hovering over the recommended badge? I've looked through some of the docs about this, but I'm not sure of the final decision. I currently have "Recommended extensions are safe, high-quality extensions."


Oops, I really should have added this to the issue, not to the PR. I'll repeat it there. Sorry for the noise.

willdurand left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice! I played with the CSS and here is a patch: https://gist.github.com/willdurand/15fe2ddba5aaec10198d0fd634a41584
It's not perfect but it goes in the direction that I'd like to take in order to merge this patch :)

rel="noopener noreferrer"
target="_blank"
title={i18n.gettext(
'Recommended extensions are safe, high-quality extensions.',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is this the final copy? (it looks like but if not, let's create a new issue)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I asked @MeridelW in the issue to confirm whether that is the final text or not. I will open up and issue to track that question, as I gather we might land this before we have a final answer.

className="RecommendedBadge-link"
href="https://support.mozilla.org/"
rel="noopener noreferrer"
target="_blank"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am pretty sure it's done automatically but we should double-check that rel="noopener noreferrer" is added.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure I understand. Do you mean add a test to assert that the prop is there?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No sorry, I meant manually looking at the generated HTML :p

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looking at it in Storybook, I see rel="noopener noreferrer" on the a tag.

Copy link
Copy Markdown
Contributor Author

Nice! I played with the CSS and here is a patch: gist.github.com/willdurand/15fe2ddba5aaec10198d0fd634a41584
It's not perfect but it goes in the direction that I'd like to take in order to merge this patch :)

Thanks @willdurand, that is much better indeed. I noticed that it kind of breaks in rtl mode though:

But I think I fixed that by using padding-end and padding-start.

This is ready for another look.

bobsilverberg requested a review from willdurand May 6, 2019 18:14

willdurand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

r+wc, thanks!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Create a RecommendedBadge component

3 participants


Back | FazBrowse Home | New Git URL