Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ export default function App() {
const share = getActivityShare(bucket, allActivityCount)

return (
<li key={bucket.kind} className={bucket.kind === selectedKind ? 'selected' : ''}>
<li
key={bucket.kind}
className={bucket.kind === selectedKind ? 'selected' : ''}
data-visible={isVisible}
>
<label className="bucket-toggle">
<input
type="checkbox"
Expand All @@ -175,6 +179,9 @@ export default function App() {
<small>{share}%</small>
</span>
<span className="bucket-count">{bucket.count}</span>
<span className="bucket-share-meter" aria-hidden="true">
<span style={{ width: `${share}%`, backgroundColor: bucket.color }} />
</span>
</label>
<button
className="inspect-button"
Expand Down
32 changes: 31 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,15 @@ input:focus-visible {
min-width: 0;
display: grid;
grid-template-columns: 16px 9px minmax(0, 1fr) auto;
gap: 10px;
column-gap: 10px;
row-gap: 5px;
align-items: center;
padding: 8px 4px 8px 12px;
cursor: pointer;
}

.bucket-toggle input {
grid-row: 1 / 3;
width: 16px;
height: 16px;
margin: 0;
Expand All @@ -302,6 +304,7 @@ input:focus-visible {
}

.bucket-swatch {
grid-row: 1 / 3;
width: 9px;
height: 9px;
border-radius: 50%;
Expand Down Expand Up @@ -334,6 +337,33 @@ input:focus-visible {
font-variant-numeric: tabular-nums;
}

.bucket-share-meter {
grid-row: 2;
grid-column: 3 / 5;
height: 3px;
overflow: hidden;
border-radius: var(--radius-pill);
background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.bucket-share-meter span {
display: block;
height: 100%;
min-width: 3px;
border-radius: inherit;
transition: opacity var(--motion-standard);
}

.bucket-list li[data-visible='false'] .bucket-swatch,
.bucket-list li[data-visible='false'] .bucket-share-meter span {
opacity: 0.24;
}

.bucket-list li[data-visible='false'] .bucket-name,
.bucket-list li[data-visible='false'] .bucket-count {
color: var(--color-subtle);
}

.inspect-button,
.stage-actions button {
display: inline-grid;
Expand Down
Loading