Move heatmap to first-party code#37262
Merged
bircni merged 6 commits intogo-gitea:mainfrom Apr 20, 2026
Merged
Conversation
Replaces the `@silverwind/vue3-calendar-heatmap` dependency with an inlined implementation tailored to Gitea's single use. Drops the onMounted legend viewBox workaround (rendered correctly from the start), uses tippy's `createSingleton` for the shared hover tooltip with move transition, and adds an e2e test for tooltip display. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces the third-party Vue calendar heatmap component with a first-party SVG-rendered implementation, including a shared tippy.js singleton tooltip and an e2e regression test, while removing the external dependency.
Changes:
- Inline SVG-based activity heatmap rendering (weeks/days/month labels + legend) and tippy.js singleton tooltip setup.
- CSS tweak for legend alignment.
- Add Playwright e2e coverage for tooltip-on-hover; remove
@silverwind/vue3-calendar-heatmapfrom dependencies/lockfile.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/components/ActivityHeatmap.vue | Replaces component dependency with computed SVG grid + singleton tooltip wiring |
| web_src/css/features/heatmap.css | Adds legend wrapper margin adjustment previously done imperatively |
| tests/e2e/heatmap.test.ts | Adds Playwright test ensuring tooltip becomes visible on hover |
| package.json | Removes @silverwind/vue3-calendar-heatmap dependency |
| pnpm-lock.yaml | Removes locked package entries for the removed dependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Will do a bit more refactoring, like renaming the |
Member
|
ping me when your done :-) |
Drop the legacy BEM-style class names inherited from the upstream `vue3-calendar-heatmap` library and use the codebase's kebab-case convention (`heatmap-*`). Also drop the redundant `vch__container` and `vch__legend-left`/`-right` wrappers, and the empty `vch__legend__wrapper` `<g>`. Variables/constants renamed to camelCase, a few small cleanups while here. Rendering remains pixel-identical. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Member
Author
|
Renames and cleanups done. @bircni ping. |
bircni
approved these changes
Apr 20, 2026
lunny
approved these changes
Apr 20, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Apr 20, 2026
…-lang * origin/main: Update go js dependencies (go-gitea#37312) Update GitHub Actions to latest major versions (go-gitea#37313) Revert "Add WebKit to e2e test matrix (go-gitea#37298)" (go-gitea#37315) Add `form-fetch-action` to some forms, fix "fetch action" resp bug (go-gitea#37305) Move heatmap to first-party code (go-gitea#37262) Use updated yaml fields for snapcraft (go-gitea#37318) Remove dead code identified by `deadcode` tool (go-gitea#37271) Enable strict TypeScript, add `errorMessage` helper (go-gitea#37292) Fix vite manifest update masking build errors (go-gitea#37279) bump snapcraft base (go-gitea#37301) # Conflicts: # web_src/js/modules/errors.ts
silverwind
added a commit
to 6543-forks/gitea
that referenced
this pull request
Apr 21, 2026
…n-better * origin/main: (645 commits) When the requested arch rpm is missing fall back to noarch (go-gitea#37236) Fix `relative-time` error and improve global error handler (go-gitea#37241) Enhance styling in actions page (go-gitea#37323) fix(oauth): Error on auth sources with spaces (go-gitea#37327) Fix actions concurrency groups cross-branch leak (go-gitea#37311) Fix bug when accessing user badges (go-gitea#37321) Fix AppFullLink (go-gitea#37325) Update go js dependencies (go-gitea#37312) Update GitHub Actions to latest major versions (go-gitea#37313) Revert "Add WebKit to e2e test matrix (go-gitea#37298)" (go-gitea#37315) Add `form-fetch-action` to some forms, fix "fetch action" resp bug (go-gitea#37305) Move heatmap to first-party code (go-gitea#37262) Use updated yaml fields for snapcraft (go-gitea#37318) Remove dead code identified by `deadcode` tool (go-gitea#37271) Enable strict TypeScript, add `errorMessage` helper (go-gitea#37292) Fix vite manifest update masking build errors (go-gitea#37279) bump snapcraft base (go-gitea#37301) Add WebKit to e2e test matrix (go-gitea#37298) Don't add useless labels which will bother changelog generation (go-gitea#37267) Fix Repository transferring page (go-gitea#37277) ... # Conflicts: # options/locale/locale_en-US.ini # templates/package/content/debian.tmpl
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 22, 2026
* main: (25 commits) Add URL to `Learn more about blocking a user` (go-gitea#37355) fix: use TriggerEvent instead of Event in workflow runs API response for scheduled runs (go-gitea#37288) Add event.schedule context for schedule actions task (go-gitea#37320) Fix typos (go-gitea#37346) Fix an issue where changing an organization’s visibility caused problems when users had forked its repositories. (go-gitea#37324) Fail vite build on rolldown warnings via NODE_ENV=test (go-gitea#37270) Use modern "git update-index --cacheinfo" syntax to support more file names (go-gitea#37338) Fix URL related escaping for oauth2 (go-gitea#37334) When the requested arch rpm is missing fall back to noarch (go-gitea#37236) Fix `relative-time` error and improve global error handler (go-gitea#37241) Enhance styling in actions page (go-gitea#37323) fix(oauth): Error on auth sources with spaces (go-gitea#37327) Fix actions concurrency groups cross-branch leak (go-gitea#37311) Fix bug when accessing user badges (go-gitea#37321) Fix AppFullLink (go-gitea#37325) Update go js dependencies (go-gitea#37312) Update GitHub Actions to latest major versions (go-gitea#37313) Revert "Add WebKit to e2e test matrix (go-gitea#37298)" (go-gitea#37315) Add `form-fetch-action` to some forms, fix "fetch action" resp bug (go-gitea#37305) Move heatmap to first-party code (go-gitea#37262) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
@silverwind/vue3-calendar-heatmapwith an inlined SVG implementation. Renders pixel-identically tomain, drops theonMountedlegend viewBox workaround, and uses tippy'screateSingletonfor the hover tooltip. Adds an e2e test for tooltip display.This is a prereq for migrating tippy.js to floating-ui to avoid having two tooltip libs active.
This PR was written with the help of Claude Opus 4.7