refactor: replace vue-bar-graph dependency with inlined SVG chart (#38292)

Inlines the small SVG bar graph into `RepoActivityTopAuthors.vue` (its
only consumer) and drops the `vue-bar-graph` npm dependency.

- Bars render at static height (dropped the grow animation).
- Theme-aware axis color instead of a hardcoded `#555555`.
- Removed the dangling `role="img"`/`aria-labelledby` on the `<svg>`.
- Reserve the chart height so the page does not shift when the component
mounts.

<img width="416" height="110" alt="Screenshot 2026-07-01 at 11 15 25"
src="https://github.com/user-attachments/assets/b2db4d0c-20f1-4345-9951-32a908abfaba"
/>
<img width="419" height="110" alt="Screenshot 2026-07-01 at 11 15 35"
src="https://github.com/user-attachments/assets/853305a5-575f-4a26-ba3b-12fc51081324"
/>

fyi @lafriks

---------

Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2026-07-01 13:17:23 +02:00
committed by GitHub
parent 67a6bd7fc0
commit e8654c7e06
5 changed files with 51 additions and 97 deletions

12
pnpm-lock.yaml generated
View File

@@ -200,9 +200,6 @@ importers:
vue:
specifier: 3.5.38
version: 3.5.38(typescript@6.0.3)
vue-bar-graph:
specifier: 2.2.0
version: 2.2.0(typescript@6.0.3)
vue-chartjs:
specifier: 5.3.3
version: 5.3.3(chart.js@4.5.1)(vue@3.5.38(typescript@6.0.3))
@@ -4306,9 +4303,6 @@ packages:
vscode-uri@3.1.0:
resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==}
vue-bar-graph@2.2.0:
resolution: {integrity: sha512-1xFPho2nM6nFDziExLu48vKO+Q90gjxz1NyHfc+MhgfYDSxR9BMyhOIXUO5EmwKIVEX5dBoP2n3Ius8SjKRD4g==}
vue-chartjs@5.3.3:
resolution: {integrity: sha512-jqxtL8KZ6YJ5NTv6XzrzLS7osyegOi28UGNZW0h9OkDL7Sh1396ht4Dorh04aKrl2LiSalQ84WtqiG0RIJb0tA==}
peerDependencies:
@@ -8979,12 +8973,6 @@ snapshots:
vscode-uri@3.1.0: {}
vue-bar-graph@2.2.0(typescript@6.0.3):
dependencies:
vue: 3.5.38(typescript@6.0.3)
transitivePeerDependencies:
- typescript
vue-chartjs@5.3.3(chart.js@4.5.1)(vue@3.5.38(typescript@6.0.3)):
dependencies:
chart.js: 4.5.1