Commit Graph

41 Commits

Author SHA1 Message Date
Markus Tyrkkö
1bb65ddc29
Added pr reviews to stats (#1404)
* Added pr reviews to stats

* Add 'show' query parameter

* Fix show test

* refactoring

* cleanup

* refactor: restructure stats-card code

---------

Co-authored-by: Markus <markus.tyrkko@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-15 09:35:09 +02:00
Rick Staa
f2841e09e1
fix: fix stats contributed to translations (#2708)
* fix: fix stats contributed to translations

* Improved russian and ukrainian translation of statcard.contribs (#2715)

---------

Co-authored-by: Alexandr Garbuzov <53787217+qwerty541@users.noreply.github.com>
2023-06-07 10:19:40 +03:00
Fabiano Couto
879937c11d
feat(RankIcon): add rank_icon option (#2628)
* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank icon option

* feat(RankIcon): extract rankIcon to icons file

* feat(RankIcon): update readme

* feat(RankIcon): test coverage

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-24 13:56:14 +00:00
Caeden Perelli-Harris
d8244a7fe5
Add format stats option (#2155)
* feat: added `format_stats` option (#2128)

* refactor: change `format_stats` to `short_values` (#2128)

* test: create shorten values test (#2128)

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: rename ``short_values`` to ``number_format``

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update src/cards/stats-card.js

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: format codebase

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-01 10:17:56 +05:30
Rick Staa
cd5cbcdb09
fix: fixes card overflow problem #2452 (#2460)
This commit makes sure that the card width is formatted correctly.
2023-01-24 20:10:11 +05:30
rickstaa
cfa84232e2
test: update snapshots 2023-01-21 11:32:25 +01:00
Rick Staa
ad3726ee49
fix: fix repoContrib confusion (#2269) (#2274)
This commit prevents confusion about the Contributed to stat. Currently,
only the last year's results are shown, but it looks like it is the
all-time contribution count (see #2269). This commit adds a ' (last year)'
suffix to prevent this confusion from happening.
2022-11-22 09:18:22 +01:00
Pranav Joglekar
9aa39dfe81
feat: allow users to pass ring_color param (#2075)
* fix: prevent crash if undefined color is passed to func fallbackColor

* feat: allow users to pass ring_color param

Before this commit, the ring color was always equal to the title color.
This commit allows the user to pass a ring_color property to allow him
to style the ring color the way he pleases to. If no ring_color is
passed we default to the title color.

* docs: improves ring color documentation

* fix: improve code style

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-11-19 20:18:42 +01:00
rickstaa
fcd0588786
test: cleanup tests 2022-10-09 15:18:11 +02:00
rickstaa
8886b93a7e
refactor: clean up imports 2022-09-24 14:10:06 +02:00
rickstaa
41d6760abd
fix: fix es6 import file extension 2022-09-24 13:20:52 +02:00
rsk2
107f7ca52c
Feature/grs 1955 change commonjs imports (#1995)
* GRS-1955: Using ES6 import/export in src files

* GRS-1955: Using ES6 import/export in test files

* GRS-1955: Using ES6 import/export in themes index.js

* GRS-1955: Readding blank line at end of top-languages-card.js

* feat: fix test es6 import errors

This commit makes sure jest is set-up to support es6. It also fixes
several test errors and sorts the imports.

* test: update test node version

This commit makes sure node 16 is used in the github actions.

* refactor: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-24 10:20:54 +02:00
Artem Kostiuk
b0bb994ad3
Fix #1170: Allow customizable width for GitHub Stats Card (#1334)
* Change default stats card width with hide rank

* Add tests for stats card with card_width

* Add card_width Stats Card description to readme

* fix: add icon width to stats-card min width calculation

* fix: fixes rank circle padding problem

This commit fixes a padding problem that was introduced in
f9c0e0bff6. In the new code, the padding
around the rank circle will be 50 when the stats card is bigger than
450. When it is smaller than 450 the left and right padding will shrink
equally.

* style: run prettier

* tests: add extra stats 'card_width' tests

This commit makes sure we also test the stats card width for the case that the 'show_icons'
option is enabled.

* style: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-16 12:50:30 +02:00
Anurag Hazra
8d1e7f6ab5
feat: improve default card black color, a more modern color (#1624) 2022-03-01 01:19:34 +05:30
Anurag
3199b9f088 test: happy new year 2022-02-11 00:58:28 +05:30
T. de Kimpe
b6c184e8ff
fix: firefox text overflow issue (#1492)
* Fixed Firefox text overflow / overwriting issue

Tests currently don't work becouse it appears that '@supports' is not supported by cssToObject used within the tests. I currently have no idea how to fix that test but the cards themself appear to not be broken

Fixes anuraghazra/github-readme-stats#664

Fixes anuraghazra/github-readme-stats#1134

* Fixed tests by moving to other css-to-object

Moved the `css-to-object` package to @uppercod's version for test fix. This doesn't seem to have the same issues as the older package

* chore: cleanup test

Co-authored-by: Anurag <hazru.anurag@gmail.com>
2021-12-13 20:12:03 +05:30
Anurag Hazra
922f7165cb
test: fix broken tests (#926) 2021-03-07 22:34:25 +05:30
Teddy Heinen
c8a5e835a5
feat: add corner rounding parameter so we can make square cards (#845)
* add corner rounding parameter so i can make square cards

* rename rx to border_radius
2021-03-07 22:23:32 +05:30
Yishuai Li
cf8f23a0cc
chore(translation): improved Chinese locale (#774)
Localise with English annotated
2021-01-07 19:38:16 +05:30
Anurag Hazra
c7973a7df6
chore: added card-i18n labeler (#779)
* chore: added card-i18n labeler

* test: fix test year
2021-01-03 13:40:38 +05:30
Anurag Hazra
1c12326081
feat: auto resize card if rank is hidden (#721) 2020-12-13 20:15:00 +05:30
Jalen
725297295c
chore(card-translation): improve translathion of Chinese (#539)
* improve: improve translation of Chinese

* improve: update the text on test files
2020-10-04 20:17:13 +05:30
Nathan Chu
f1df178643
feat: card locale translations (#509)
* Add Card Translations

* Add tests and documentation for `?lang` option

* Card Translations: update Italian

* Run Prettier

* Correct German Translations.

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* refactor: added i18n class to manage translation logic & improved code

* Make the new src/translations.js more concise

* Update translations.js

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* Revert 4175484d69

* fix: overlap because of language length

Co-authored-by: lrusso96 <russo.1699981@studenti.uniroma1.it>
Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-10-04 13:35:15 +05:30
Bas950
8aea1e3c35
feat: added repo card hide border option (#488)
* 🚀 Prettier config

* 🚀 hide_border for Repo Card

* fix: wrong total commits (#490)

* chore: run prettier on all files

* chore: lol lets add the trailing commas

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
2020-09-24 21:38:14 +05:30
Anurag Hazra
67b434dc79
chore(*): reorganized all files and folders (#283) 2020-08-02 13:07:26 +05:30
Anurag Hazra
3b0f1b11a0
refactor: added reusable Card class to reduce code & test duplication (#260)
* refactor: added reusable Card class to reduce code & test duplication

* fix: top-langs card width & documented card_width option
2020-07-30 19:19:03 +05:30
Anurag Hazra
8be88461b4
chore: change color codes to lowercase (#198)
* chore: change color codes to lowercase

* fix: tests
2020-07-26 14:44:20 +05:30
Liam
9624cf6acd
fix: stats hide_border bug (#151)
* fix: stats hide border bug

* fix white border on dark mode issue

* chore: refactor code & tests

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-24 13:07:09 +05:30
Anurag Hazra
aa44bd7615
fix: hide parameter array implementation (#162)
* fix: hide paramter array implementation

* chore: parseArray str check

* docs: updated readme

* chore: add codecov threshold

* docs: update docs
2020-07-23 21:01:23 +05:30
Anurag Hazra
92dcc89a3d
tests: added more tests for themes (#125) 2020-07-21 13:15:53 +05:30
Sreetam Das
dd2c7ed278
fix: proper apostrophe in stats card's header
* fix: remove 's' after apostrophe if name ends with 's'

* fix: respect GITHUB_TOKEN env var before PAT_s

* revert: verbose console log for retries

* Revert "fix: respect GITHUB_TOKEN env var before PAT_s"

This reverts commit 2becbe595c.

* test: added test for title apostrophe

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-20 00:02:07 +05:30
Anurag Hazra
2c26329e13
feat: added inbuilt themes (#105)
* feat: added inbuilt themes

* docs: added theming docs

* docs: update docs
2020-07-19 20:34:41 +05:30
anuraghazra
253eb39b19 refactor: added FlexLayout for flex layouts 2020-07-18 22:44:27 +05:30
Anurag Hazra
2709d5b434
feat: added hide_title option (#88) 2020-07-17 23:01:16 +05:30
Rico
6d4fbfecfb
perf: align icons and text vertical (#33)
* improve: improved rating algorithm wip

* Fixed typos, punctuation [...]

Corrected many instances of "Github" to "GitHub", fixed the punctuation on some sections, fixed the ~lack of~ uppercase chars in others, tweaked the grammar a bit, and added the Vercel guide to a spoiler-ish section so it's only visible if you click to expand.

<3

* fix: github rate limiter with multiple PATs

* perf: vertically align text left

* refactor: refactored retryer logic & handled invalid tokens

* chore: remove redundant codes

`axios` is Promise based, there is no need to wrap it into a Promise constructor again

* fix: query param booleans

* design: fixed rank alignment

* chore: rebase from master

* fix: fixed repo card breaking in absence of primaryLanguage

* fix: fixed stars count #39 & fixed progressbar percentage

* perf: replace emoji icons with GitHub SVG icons

* chore: added funding link

* refactor: refacted icons to another file

* test: added test for icons

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
Co-authored-by: Micael Jarniac <micael@jarniac.com>
Co-authored-by: JounQin <admin@1stg.me>
2020-07-16 15:51:21 +05:30
anuraghazra
6059cb1691 feat: added animations! 2020-07-14 20:04:36 +05:30
anuraghazra
db49ca7b71 feat: added rankings 2020-07-13 19:41:47 +05:30
anuraghazra
b2aa92c53e fix: tests 2020-07-12 13:57:35 +05:30
anuraghazra
9af56df2c1 feat: added bg_color options, added RepoCard color options too 2020-07-12 12:46:08 +05:30
JoaoVSouto
61a0f517db test: adds colors checking tests 2020-07-11 23:28:28 -03:00
anuraghazra
45941f6c70 test: added test & refactored files 2020-07-11 22:10:13 +05:30