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

Omit rendering for rating/downloads of an extension if 0 #7380

Merged
merged 2 commits into from
Mar 27, 2020
Merged

Omit rendering for rating/downloads of an extension if 0 #7380

merged 2 commits into from
Mar 27, 2020

Conversation

kaiyue0329
Copy link
Contributor

@kaiyue0329 kaiyue0329 commented Mar 19, 2020

What it does

Fixes: #7376
Fixes #7423

The pull-request addresses the following:

  • Omit the rendering for rating/downloads of an extension in the extension tree if it is equal to 0
  • Omit the rendering for downloads in extension editor if it is equal to 0
  • Render the star icons for published extension in extension editor even if rating equals to 0
  • Updates the font-family for the download count when viewing an extension's information

How to test

  • Click View in the top menu and select Extensions
  • Search for Omi Snippets
  • The 0 rating for should no longer be there

Review checklist

Reminder for reviewers

@akosyakov akosyakov added ui/ux issues related to user interface / user experience vsx-registry Issues related to Open VSX Registry Integration labels Mar 20, 2020
@kaiyue0329 kaiyue0329 requested a review from akosyakov March 20, 2020 14:30
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

@kaiyue0329 the changes look good to me, I verified and did not see any rating/download when the value is 0 (undefined). I also verified that the rating/download is displayed when providing mock data.

@akosyakov
Copy link
Member

There is also an issue in the extension editor:
Screenshot 2020-03-21 at 11 00 06

But it has to work a bit different:

  • for rating it is fine to show 5 empty stars
  • for downloads it should be omitted

@kaiyue0329 kaiyue0329 requested a review from akosyakov March 23, 2020 14:36
@kaiyue0329 kaiyue0329 requested a review from akosyakov March 24, 2020 19:41
@kaiyue0329 kaiyue0329 requested a review from akosyakov March 25, 2020 15:55
@kaiyue0329
Copy link
Contributor Author

kaiyue0329 commented Mar 25, 2020

@akosyakov I enforced the rating here to be undefined for built-ins like this:

get averageRating(): number | undefined {
  return !this.builtin ? this.getData('averageRating') : undefined;
}

since the 0 rating was showing up for some of the built-ins
image
image

Fixes #7423

This commit fixes the inconsistent `font-family` used
when displaying the `download-count` when viewing an extension's information.

Signed-off-by: Kaiyue Pan <[email protected]>
@akosyakov
Copy link
Member

@kaiyue0329 it is not correct, if built-in is published to the registry then it should show rating

Omit the rendering for rating/downloads of an extension in the extension tree if it is equal to 0
Omit the rendering for downloads in extension editor if it is equal to 0
Render the star icons of published extension in extension editor even if rating equals to 0

Signed-off-by: Kaiyue Pan <[email protected]>
@kaiyue0329 kaiyue0329 requested a review from akosyakov March 26, 2020 14:30
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

it looks great now, thank you!

@vince-fugnitto
Copy link
Member

Merging! Thank you @kaiyue0329 :)

@vince-fugnitto vince-fugnitto merged commit 5e7dc96 into eclipse-theia:master Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux issues related to user interface / user experience vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
3 participants