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

Hide specific languages in "Top languages" card #150

Merged
merged 7 commits into from
Jul 23, 2020

Conversation

arjunmahishi
Copy link
Contributor

Addressing #140

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #150 into master will increase coverage by 0.21%.
The diff coverage is 97.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #150      +/-   ##
==========================================
+ Coverage   94.47%   94.69%   +0.21%     
==========================================
  Files          15       15              
  Lines         362      377      +15     
  Branches      107      112       +5     
==========================================
+ Hits          342      357      +15     
  Misses         16       16              
  Partials        4        4              
Impacted Files Coverage Δ
api/index.js 100.00% <ø> (ø)
api/top-langs.js 100.00% <ø> (ø)
src/fetchRepo.js 95.83% <ø> (ø)
src/retryer.js 73.68% <75.00%> (+1.46%) ⬆️
api/pin.js 95.23% <100.00%> (ø)
src/fetchStats.js 100.00% <100.00%> (ø)
src/fetchTopLanguages.js 100.00% <100.00%> (ø)
src/renderRepoCard.js 100.00% <100.00%> (ø)
src/renderTopLanguages.js 100.00% <100.00%> (ø)
src/utils.js 96.15% <100.00%> (+0.50%) ⬆️

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 03f55e8...1523091. Read the comment docs.

@martinRenou
Copy link

Shouldn't it be a change in the request instead?

Changing the request might recompute automatically the other percentages.

For example if I contributed to 60% C++ and 40% JavaScript, and wanted to hide the C++, I would like it to show that I contributed 100% JavaScript, not 40%.

@terror
Copy link
Contributor

terror commented Jul 23, 2020

@martinRenou I'm pretty sure in order to recompute the percentage values, all we have to do is hide the languages before computing the total size

@anuraghazra
Copy link
Owner

Shouldn't it be a change in the request instead?

Changing the request might recompute automatically the other percentages.

For example if I contributed to 60% C++ and 40% JavaScript, and wanted to hide the C++, I would like it to show that I contributed 100% JavaScript, not 40%.

Yes the calculations should be relative to how many langs are shown

api/top-langs.js Outdated Show resolved Hide resolved
api/top-langs.js Outdated Show resolved Hide resolved
@anuraghazra anuraghazra changed the base branch from master to add-license-1 July 23, 2020 14:13
@anuraghazra anuraghazra changed the base branch from add-license-1 to master July 23, 2020 14:14
@anuraghazra
Copy link
Owner

LGTM Thanks @arjunmahishi

Note: I've deprecated hide_langs_below option.

@anuraghazra anuraghazra merged commit c2adcfd into anuraghazra:master Jul 23, 2020
@martinRenou
Copy link

Thanks for the amazing work, this repo deserves every single star it gets ;)

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.

4 participants