addons-frontend icon indicating copy to clipboard operation
addons-frontend copied to clipboard

Include Add-on name and Add-on Icon in each review under "My reviews" on User Profile

Open shribyte opened this issue 2 years ago • 11 comments

Fixes mozilla/addons#2050

This patch includes the Add-on Name and Add-on Icon in each review under "My reviews", on the User Profile.

Before: Screenshot 2023-09-25 at 11 03 43 AM

After: Screenshot 2023-09-25 at 11 02 14 AM

shribyte avatar Sep 25 '23 15:09 shribyte

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (0094a99) 98.50% compared to head (9d086d9) 98.50%. Report is 20 commits behind head on master.

:exclamation: Current head 9d086d9 differs from pull request most recent head adc8f36. Consider uploading reports for the commit adc8f36 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master   mozilla/addons-frontend#12426   +/-   ##
=======================================
  Coverage   98.50%   98.50%           
=======================================
  Files         258      258           
  Lines       10177    10189   +12     
  Branches     3060     3071   +11     
=======================================
+ Hits        10025    10037   +12     
  Misses        144      144           
  Partials        8        8           
Files Coverage Δ
src/amo/actions/reviews.js 100.00% <100.00%> (ø)
src/amo/api/reviews.js 100.00% <ø> (ø)
src/amo/components/AddonReviewCard/index.js 100.00% <100.00%> (ø)
src/amo/pages/UserProfile/index.js 100.00% <ø> (ø)
src/amo/reducers/reviews.js 100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 25 '23 18:09 codecov[bot]

There's a UX mockup in the issue - #5858 (comment) - can we have it look like that?

Sure, I will be pushing changes per the UX mockup tomorrow.

shribyte avatar Sep 26 '23 22:09 shribyte

Here's the UI after some styling changes, it's now similar to the UX mockup.

Screenshot 2023-09-27 at 12 21 19 PM

I've tried to avoid modifying the styling of existing elements (such as the rating and review body being pushed to the right, to afford more space for the icon), since that may have cascading effects across multiple views and would require re-styling a number of elements.

shribyte avatar Sep 27 '23 16:09 shribyte

We need a test in TestAddonReviewCard that checks this extra markup is displayed when isUserProfile is true.

eviljeff avatar Sep 28 '23 09:09 eviljeff

I've tried to avoid modifying the styling of existing elements (such as the rating and review body being pushed to the right, to afford more space for the icon), since that may have cascading effects across multiple views and would require re-styling a number of elements.

It looks a little weird with the icon outside like that. IMHO the icon should be left-aligned with the stars and text on that page.

diox avatar Sep 29 '23 14:09 diox

Here's a screenshot of a hard-coded icon to make it simpler to visualize the left-align:

Screenshot 2023-09-29 at 1 44 14 PM

shribyte avatar Sep 29 '23 21:09 shribyte

there are some createInternalReview calls in amo/reducers/reviews.js that also make the invariant checks in selectLocalizedContent fail. What should I do about these? They are invoked via reviewReducerfunction in reducers/test_reviews.js

As discussed with @eviljeff, this may be due to some of the existing tests not having the correct setup.

shribyte avatar Oct 02 '23 13:10 shribyte

I assume that some of the existing tests don't have the correct setup. The fix should otherwise be ready to merge. I will move on to other bugs.

shribyte avatar Oct 02 '23 16:10 shribyte

https://github.com/mozilla/addons-frontend/commit/e3409a1e0d7e6148e3c62e99cdc9180a29dcd766 reduces the failing tests to 6.

eviljeff avatar Oct 03 '23 00:10 eviljeff

@shribyte could you look at the last failing tests ?

diox avatar Oct 11 '23 09:10 diox

@diox I looked at it some time back and couldn't exactly figure out why some existing tests were failing despite the state.lang additions.

Will look into it again after I'm done with my current assigned bugs.

shribyte avatar Oct 11 '23 15:10 shribyte