Skip to content

Commit 6b2b6aa

Browse files
committed
Enhances timeline hover, zoom, & chart interaction
Hovers are now "grouped" on the x axis Adds better zoom in/out functionality with wheel support and reset Optimizes chart resizing and axis label rendering with author indicators Improves cursor feedback and interaction states for timeline elements
1 parent 5c282fa commit 6b2b6aa

File tree

6 files changed

+249
-89
lines changed

6 files changed

+249
-89
lines changed

src/webviews/apps/plus/graph/minimap/minimap.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,14 @@ export class GlGraphMinimap extends GlElement {
466466
color: var(--color-graph-minimap-tip-tagForeground);
467467
}
468468
469-
.bb-event-rects {
469+
.bb-event-rects,
470+
.bb-event-rect {
470471
cursor: pointer !important;
471472
}
473+
.bb-event-rects:active,
474+
.bb-event-rect:active {
475+
cursor: ew-resize !important;
476+
}
472477
`;
473478

474479
@query('#chart')
@@ -491,7 +496,7 @@ export class GlGraphMinimap extends GlElement {
491496
this.select(this.activeDay);
492497
}
493498

494-
@property({ type: Map })
499+
@property({ type: Object })
495500
data: Map<number, GraphMinimapStats | null> | undefined;
496501

497502
@property({ type: String })
@@ -502,15 +507,15 @@ export class GlGraphMinimap extends GlElement {
502507
this.handleDataChanged(false);
503508
}
504509

505-
@property({ type: Map })
510+
@property({ type: Object })
506511
markers: Map<number, GraphMinimapMarker[]> | undefined;
507512

508513
@observe('markers')
509514
private onMarkersChanged() {
510515
this.handleDataChanged(true);
511516
}
512517

513-
@property({ type: Map })
518+
@property({ type: Object })
514519
searchResults: Map<number, GraphMinimapSearchResultMarker> | undefined;
515520

516521
@observe('searchResults')

src/webviews/apps/plus/timeline/components/chart.css.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ export const timelineChartStyles = css`
4848
font-size: 11px;
4949
}
5050
51-
.bb .bb-legend-item-tile,
51+
.bb .bb-event-rects,
52+
.bb .bb-event-rect {
53+
cursor: pointer !important;
54+
}
55+
56+
.bb .bb-event-rects:active,
57+
.bb .bb-event-rect:active {
58+
cursor: ew-resize !important;
59+
}
60+
5261
.bb .bb-xgrid-focus,
5362
.bb .bb-ygrid-focus,
5463
.bb .bb-ygrid,
@@ -57,6 +66,11 @@ export const timelineChartStyles = css`
5766
shape-rendering: crispEdges;
5867
}
5968
69+
.bb .bb-legend-item-tile {
70+
stroke-width: 2px;
71+
transform: translate(0, 1px);
72+
}
73+
6074
.bb .bb-chart-arc .bb-gauge-value {
6175
fill: #000;
6276
}
@@ -375,4 +389,23 @@ export const timelineChartStyles = css`
375389
.bb-tooltip .message__content {
376390
white-space: pre-line;
377391
}
392+
393+
:host-context(:host[placement='view']) .bb-axis-y .tick text {
394+
transform: translate(0, 0.4rem);
395+
font-family: codicon;
396+
font-size: 1.5rem;
397+
}
398+
399+
@media (max-height: 275px) {
400+
:host-context(:host[placement='view']) .bb-axis-y .tick text {
401+
transform: none;
402+
font-size: 1rem;
403+
}
404+
}
405+
406+
@media (max-height: 225px) {
407+
:host-context(:host[placement='view']) .bb-axis-y .tick text {
408+
display: none;
409+
}
410+
}
378411
`;

0 commit comments

Comments
 (0)