diff --git a/.github/workflows/preview-cleanup.yml b/.github/workflows/preview-cleanup.yml deleted file mode 100644 index 6c84822..0000000 --- a/.github/workflows/preview-cleanup.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Preview Cleanup - -on: - pull_request: - types: [closed] - -jobs: - cleanup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - uses: pnpm/action-setup@v5 - with: - version: 10 - - - uses: actions/setup-node@v6 - with: - node-version: 22 - cache: pnpm - - - run: pnpm install --frozen-lockfile - - - name: Delete preview alias - run: pnpm exec wrangler versions delete-alias pr-${{ github.event.pull_request.number }} - env: - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/.gitignore b/.gitignore index 3b462cb..c2044c0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ Thumbs.db .env.* !.env.example !.env.test +.dev.vars # Vite vite.config.js.timestamp-* diff --git a/src/lib/components/ActivityBarChart.svelte b/src/lib/components/ActivityBarChart.svelte new file mode 100644 index 0000000..9d44ca4 --- /dev/null +++ b/src/lib/components/ActivityBarChart.svelte @@ -0,0 +1,345 @@ + + +{#if allItems.length > 0} +
+
+
+ {#each bars as bar (bar.repo)} +
+ {bar.label} + + {bar.total} +
+ {/each} +
+
+ {#each scaleTicks as tick (tick)} + {tick} + {/each} +
+
+
+ {#each legendGroups as group (group.label)} +
+ {group.label} +
+ {#each group.types as type (type)} + + + {ACTIVITY_TYPE_SHORT_LABELS[type]} + + {/each} +
+
+ {/each} +
+
+{/if} + +{#if tooltip} +
+
{tooltip.repo}
+
{tooltip.line}
+
+{/if} + + diff --git a/src/lib/components/ActivityHeatmap.svelte b/src/lib/components/ActivityHeatmap.svelte index 628051a..ee1a605 100644 --- a/src/lib/components/ActivityHeatmap.svelte +++ b/src/lib/components/ActivityHeatmap.svelte @@ -64,47 +64,48 @@ } -
- - {#each grid.monthLabels as label (label.col)} - - {label.text} - - {/each} - - {#each dayLabels as label, i (i)} - - {label} - - {/each} - - {#each grid.cells as cell (cell.entry.date)} - showTooltip(cell.entry, e)} - onmouseleave={hideTooltip} - onclick={() => handleCellClick(cell.entry)} - role="button" - tabindex={0} - onkeydown={(e) => { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - handleCellClick(cell.entry); - } - }} - aria-label={`${cell.entry.count} activit${cell.entry.count === 1 ? 'y' : 'ies'} on ${formatDisplayDate(cell.entry.date)}`} - aria-pressed={isSelected(cell.entry.date)} - /> - {/each} - - -
+
+
+ + {#each grid.monthLabels as label (label.col)} + + {label.text} + + {/each} + + {#each dayLabels as label, i (i)} + + {label} + + {/each} + + {#each grid.cells as cell (cell.entry.date)} + showTooltip(cell.entry, e)} + onmouseleave={hideTooltip} + onclick={() => handleCellClick(cell.entry)} + role="button" + tabindex={0} + onkeydown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleCellClick(cell.entry); + } + }} + aria-label={`${cell.entry.count} activit${cell.entry.count === 1 ? 'y' : 'ies'} on ${formatDisplayDate(cell.entry.date)}`} + aria-pressed={isSelected(cell.entry.date)} + /> + {/each} + +
+
Less @@ -152,12 +153,12 @@ z-index: 10; } - .legend { + .heatmap-legend { display: flex; align-items: center; gap: 3px; - margin-top: 8px; - justify-content: flex-end; + margin-top: 6px; + margin-bottom: 8px; } .legend-label { diff --git a/src/lib/components/ActivityTabs.svelte b/src/lib/components/ActivityTabs.svelte index 933e76f..fe4ae18 100644 --- a/src/lib/components/ActivityTabs.svelte +++ b/src/lib/components/ActivityTabs.svelte @@ -1,20 +1,22 @@ - -