Commit Graph

108 Commits

Author SHA1 Message Date
Rick Staa 3cb205c65b feat: improve card loading speed (#2124)
* feat: improve card loading times

This commit adds the `stale-while-revalidate` option to speed up the
card loading times.

* mend
2022-11-21 10:21:46 +01:00
Rick Staa 5df25a6472 fix: improve boolean parse behaviour (#2029) 2022-11-21 10:10:46 +01:00
rickstaa b2e34ac8db test: update snapshots 2022-11-20 08:39:44 +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
Fabian Joswig 26cde6bfe9 Missing term in calculation of TOTAL_VALUES. (#2116)
* fix: added missing term in calculation of TOTAL_VALUES.

* fix: fix rank test

* refactor: update code formatting

* refactor: update code formatting

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-11-18 15:19:04 +01:00
Ray Chan c0d7493c3f Fix truncation of compact wakatime progress bar when langs_count is set (#2228)
* refactor: use default value for languages

* fix: truncated compact progress bar

* test: add test for truncated compact progress bar with langs_count set
2022-10-28 20:47:09 +02:00
Rick Staa 98f9045f98 fix: improve error caching behavoir (#2211)
This commit ensures that the GraphQL Pat error is not cached in any
browser. See
https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282630614.
2022-10-18 18:07:38 +02:00
Rick Staa 6fdf73f39c test: increase e2e test timeout 2022-10-11 18:10:44 +02:00
rickstaa f0f92c2635 test: add cache on error test 2022-10-10 12:48:26 +02:00
rickstaa fcd0588786 test: cleanup tests 2022-10-09 15:18:11 +02:00
rickstaa 60012707c7 test: increase stats card e2e timeout 2022-10-08 15:04:49 +02:00
Rick Staa bd9865d5a2 test: burst cache in e2e tests (#2154) 2022-10-07 20:01:01 +02:00
rickstaa 15620a11db test: fix tests 2022-10-07 12:42:04 +02:00
Matteo Pierro af97e5765b fix: fetch all repos for for the stats card (#2100)
* fetch all stars

* stop fetching when there are repos with zero stars

* remove not needed parameters from the query

* add docstring

* removed not needed mock

* style: update formatting

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-04 13:10:50 +02:00
rickstaa 3a07cb02db ci: fix e2e test 2022-10-02 12:27:34 +02:00
rickstaa 51e7887b95 ci: fix e2e test 2022-10-02 10:52:33 +02:00
rickstaa aaf710c024 ci: fix e2e test 2022-10-02 10:35:11 +02:00
Rick Staa f8e32f9e0c ci: add e2e vercel test action (#2054)
* ci: add e2e vercel test action

This commit adds several end-to-end tests that can be used
to test whether the Vercel Preview deployment successfully
returns the cards.

* test: add additional e2e card tests

* test: improve e2e card tests

This commit makes sure that the tests also check whether a valid cards
are returned from the preview deployment.
2022-10-01 13:59:02 +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
Rick Staa f9b9015ec2 feat(stats): add 'not_bold' option to stats card (#1468) 2022-09-17 13:32:40 +02:00
Rick Staa c1324b31bf feat: add 'exclude_repo' option to stats card (#1450)
This commit allows users to exclude repositories for the stats card
using the `exclude_repo` option.
2022-09-16 13:09:19 +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
f9c0e0bff64f325235ccbf936c9d5f7a918ac790. 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
Steven 4c2307ab4b Add prettier check to CI (#1999)
* Add prettier check to CI

* Run prettier:format
2022-09-06 09:09:45 +02:00
Qi Mo Lin dd5a41d696 feat: add min width languages card (#1953)
* Add min width to languages card

* Add test for min width languages card

* feat: increase lang card min width

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2022-08-18 10:32:03 +02:00
Qi Mo Lin 8d5f2da3f3 test: fix gradient test by using more specific querySelector (#1954) 2022-08-17 23:22:52 +02:00
Anurag Hazra 4e2f631f95 feat: added accessibility label and title in svg (#1787) 2022-05-26 21:59:51 +05:30
Anurag Hazra 9d2bfd9d8f fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Anurag Hazra 8d1e7f6ab5 feat: improve default card black color, a more modern color (#1624) 2022-03-01 01:19:34 +05:30
Anurag Hazra e00fe88ed3 feat: added better error messages (#1608) 2022-02-23 20:52:18 +05:30
Anurag 3199b9f088 test: happy new year 2022-02-11 00:58:28 +05:30
Rick Staa 397e321c2a test: adds language card 'exclude_repo' test (#1452) 2021-12-13 20:27:27 +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
Markus Tyrkkö 28fa0b8877 fix: bug where wakatime api returns undefined languages (#1403)
Co-authored-by: Markus Tyrkkö <markus.tyrkko@nitor.com>
2021-11-05 19:49:51 +05:30
Anurag Hazra d049f0688d fix: hotfix for graphql api error (#1409) 2021-10-23 13:50:33 +05:30
Markus Tyrkkö 02e714aeb4 fix: word-wrap bug (#1378)
* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382)"

This reverts commit 2723f00cb8.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <markus.tyrkko@nitor.com>
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2021-10-18 19:11:50 +05:30
Anurag Hazra 62d65ab483 refactor: refactor repo card (#1325)
* refactor: refactored repo-card

* test: fix tests

* test: fixed tests

* fix: unprovided description error
2021-09-26 21:02:27 +05:30
Anurag Hazra 97690e173d feat(layout): improve flexLayout & fixed layout overlaps (#1314)
* feat(layout): improve flexLayout & fixed layout overlaps

* chore: fix vercel build
2021-09-18 22:39:28 +05:30
Julian Holfeld 1a3edcaae0 feat: hide wakatime languages (#1212)
* feat: added option to hide languages

* feat: recalculate percentages for hidden languages

* refactor: reverted langs_count and did some formatting

* doc: added hide to readme

* feat: make languages var mutable and improve filter logic

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>

* refactor: improve code and added tests

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2021-08-28 00:35:10 +05:30
Anurag Hazra 112efb4b92 refactor: language card renderer refactor (#1184)
* refactor: language card render refactor

* chore: change error msg
2021-07-11 19:28:06 +05:30
Anurag 99aea7f803 test: fixed snapshot tests 2021-06-24 22:43:24 +05:30
Florian Bussmann 24063f149b fix: wakatime langs_count when layout=compact (#1041) 2021-06-10 00:40:40 +05:30
Anurag fef8bc3a4a refactor: minor refactors 2021-05-07 00:49:43 +05:30
Florian Bussmann f8b0c8767e fix: langs_count overflow when hide is set (#989) 2021-05-07 00:31:04 +05:30
Rishi Suresh 7a096acf66 feat: added border_color option (#1000)
* feat: Allow customization of border color

* docs: Update readme
2021-04-28 00:28:44 +05:30
Ferdinand Mütsch 24e5f866c0 feat: allow to customize wakatime range (#874)
* chore: allow to customize wakatime data range

* docs: document wakatime range parameter
docs: add wakatime section to german readme

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
2021-03-08 11:39:43 +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
Haraldo Filho 32976d8bd6 fix: wakatime compact card bargraph rendering (#885)
* fix: wakatime compact card bargraph rendering at the right side

* Updated snapshots
2021-03-07 22:16:02 +05:30