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
RE: Add related categories to "More Info" section on add-on details #10761
Conversation
I have removed the review request for this PR as it requires some changes which I discussed with Lisa in our bi-weekly meeting. |
1ac68fc
to
88a9dc0
Compare
Codecov Report
@@ Coverage Diff @@
## master #10761 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 255 255
Lines 7448 7462 +14
Branches 1354 1357 +3
=======================================
+ Hits 7333 7347 +14
Misses 107 107
Partials 8 8
Continue to review full report at Codecov.
|
88a9dc0
to
9dcc0d4
Compare
Thanks for the additional insight, @bobsilverberg ! I have pushed through two commits - (1) using #2758 as a starting point and adding the respective tests, (2) cleaning up the order of the imports in the I am working on updating the category names to display as links - I'll include screenshots when complete! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to mention using css for joining the list with commas but Will beat me to it 😉
Looks like fine to me - I'm assuming @bobsilverberg has already been looking at it while it was a draft and he's okay with the general strategy
I have not reviewed this PR at all, I just put it into the rotation, so don't assume anything! It looks like @willdurand is also looking at it, so I probably don't need to add my 2¢ as well, but I will take a look. |
Thanks for the feedback, @eviljeff and @willdurand ! The latest revision includes using the CSS approach to join the related categories as advised. Regarding the Please review when you have a moment. Thanks! |
Now #10798 is merged this is going to need a rebase. Can you adjust the way you build the list of categories so it does it in a similar way too? There may be scope for abstracting how the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Just the css change.
r+wc
Thanks for the feedback, @willdurand and @eviljeff ! The latest push removes the unnecessary Please review when you have a moment. Thanks! |
(I have nothing more to add - it was a r+wc - don't know about @willdurand ) |
Yeah, I'll do another review later today. I need to remember why we need a new error handler in this component and why it isn't a "fixed" handler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is looking good but there is some more work needed to handle edge cases/errors.
Thanks for the additional feedback, @willdurand ! The latest push includes updating variable names ( As mentioned in the conversations above, please let me know how I should proceed with the order of the information in this component as well as if there are additional tests that I should add. Please review when you have a moment. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good and it works well, thanks. I have some comments on the test part.
Thanks for the feedback, @willdurand! The latest push reverts the order of information, adds the blank line, and includes updates for the tests. I added a comment to an above conversation regarding the test cases. Please review when you have a moment. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is looking very good. I made some suggestions, which I am going to accept myself so that we can land your patch 🎉
I added one more test case to cover the case where the add-on type does not have a category. |
Fixes #2758
I am still updating
TestAddonMoreInfo.js
, but wanted to provide an update.I took a look at #9253 as it was referenced as a starting point in the issue. However, as the addon's categories are already included in the
addon
props, it made more sense to start from scratch since there were changes made that did not seem necessary (e.g, updating theAddon
page,Categories
component and reducer).This pull request includes the following updates:
amo/components/AddonMoreInfo/index.js
)AddonMoreInfo
stylesheet (amo/components/AddonMoreInfo/styles.scss
)getRelatedCategories
to help return the categories - I was not sure where to place this though, please let me know if it should go elsewhere. (amo/utils/addons.js
)tests/unit/amo/utils/test_addons.js
Screenshots
Before
Mock-up
After
Screen width: 425px
Screen width: 768px
Screen width: 1024px
I tried to stay as close to the mock-up as possible, but I came across an example (see below) that became distorted especially between
large
(min-width: 720px) andextraLarge
(min-width: 900px). I am not sure if it's just dummy text on dev, but I updateddisplay
toblock
for that width range.While the issue is to add 'Related Categories' to this panel, should I update the links to not be underlined as well?
As mentioned I am still working on updating
TestAddonMoreInfo
and will push it through when ready (or I'll let you know if I have any questions). Please let me know if you have any feedback when you have a moment. Thank you!!