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

add percentile rank icon and remove progress #2859

Merged
merged 5 commits into from Jun 20, 2023
Merged

Conversation

rickstaa
Copy link
Collaborator

@rickstaa rickstaa commented Jun 19, 2023

This pull request adds the percentile option for the rank_icon query variable. This option displays the rank percentile the user belongs to. See #2858 (comment).

[![Anurag's GitHub stats](https://github-readme-stats-git-addpercentilerankicon-rickstaa.vercel.app//api?username=anuraghazra&rank_icon=percentile)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

@qwerty541 let me know what you think. We can also replace the progress option that was merged, but maybe having both options would be nice. I'm not yet sure 🤔 .

@vercel
Copy link

vercel bot commented Jun 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
github-readme-stats ✅ Ready (Inspect) Visit Preview Jun 20, 2023 5:35am

@github-actions github-actions bot added dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation. stats-card Feature, Enhancement, Fixes related to stats the stats card. labels Jun 19, 2023
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a362af0) 97.72% compared to head (68c5019) 97.72%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2859   +/-   ##
=======================================
  Coverage   97.72%   97.72%           
=======================================
  Files          24       24           
  Lines        5088     5094    +6     
  Branches      452      452           
=======================================
+ Hits         4972     4978    +6     
  Misses        115      115           
  Partials        1        1           
Impacted Files Coverage Δ
src/cards/stats-card.js 100.00% <100.00%> (ø)
src/common/icons.js 100.00% <100.00%> (ø)
src/getStyles.js 73.52% <100.00%> (+0.59%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.
`;
case "percentile":
return `
<text x="-5" y="-12" alignment-baseline="central" dominant-baseline="central" text-anchor="middle" data-testid="percentile-top-header" class="rank-percentile-header">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The y values were chosen after a quick look. It could be that these could be improved to align the header and value better.

Copy link
Collaborator

@qwerty541 qwerty541 left a comment

Choose a reason for hiding this comment

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

@qwerty541 let me know what you think. We can also replace the progress option that was merged, but maybe having both options would be nice. I'm not yet sure 🤔 .

I agree with the @MindLaborDev's point of view explained in #2858 (comment) that it is impossible to understand what the percentile means for random profile visitors. I think that it is better to overwrite the progress option because very little time has passed since merge of #2858 and most likely no one is using it yet, except @silverwind who needs to be warned.

I have updated the code a little, please check it and feel free to merge.

Anurag's GitHub stats

@rickstaa rickstaa merged commit 2642fc5 into master Jun 20, 2023
6 checks passed
@rickstaa rickstaa deleted the add_percentile_rank_icon branch June 20, 2023 06:47
@rickstaa rickstaa changed the title add percentile rank icon add percentile rank icon and remove progress Jun 20, 2023
dhollinger pushed a commit to dhollinger/github-readme-stats that referenced this pull request Jun 23, 2023
* feat: add 'percentile' rank icon

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.

* style: improve percentile rank icon styling

* dev

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
HackingGate pushed a commit to HackingGate/github-readme-stats that referenced this pull request Jun 25, 2023
* feat: add 'percentile' rank icon

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.

* style: improve percentile rank icon styling

* dev

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 24, 2023
* feat: add 'percentile' rank icon

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.

* style: improve percentile rank icon styling

* dev

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
setdebarr pushed a commit to setdebarr/github-readme-stats that referenced this pull request Jan 12, 2024
* feat: add 'percentile' rank icon

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.

* style: improve percentile rank icon styling

* dev

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation. stats-card Feature, Enhancement, Fixes related to stats the stats card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants