mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
fade in the page header actions instead of popping them in (#12165)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ceae568583
commit
dee18d9ee0
@@ -448,6 +448,25 @@ input[type='time']::-webkit-calendar-picker-indicator {
|
||||
}
|
||||
}
|
||||
|
||||
/* Content arriving, rather than being there: Home's page and the page header's actions, which
|
||||
appear only once the header has measured them and so land after what is around them. */
|
||||
@keyframes wm-page-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.wm-page-in {
|
||||
animation: wm-page-in 500ms ease-out both;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.wm-page-in {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.svelte-flow__edges {
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
@@ -82,8 +82,7 @@ The row's height matches the sidebar's own header row, so the two read as one ba
|
||||
chrome: padLeft + padRight + (handleShown ? handleWidth + GAP : 0),
|
||||
trail: trailMeasures.trail,
|
||||
summary: BAR_STAGES.map(() => (hasSummary ? GAP + summaryFloorWidth : 0)),
|
||||
actions:
|
||||
!hasActions ? [0] : actionsRigid ? actionWidths : [GAP + FLEXIBLE_ACTIONS_RESERVE],
|
||||
actions: !hasActions ? [0] : actionsRigid ? actionWidths : [GAP + FLEXIBLE_ACTIONS_RESERVE],
|
||||
folds: hasActions && actionsRigid ? (content?.actionFolds ?? 0) : 0,
|
||||
earlyFolds: content?.earlyActionFolds,
|
||||
summaryNamesItem,
|
||||
@@ -117,11 +116,7 @@ The row's height matches the sidebar's own header row, so the two read as one ba
|
||||
next[fold] = width
|
||||
actionWidthsByVersion[version] = next
|
||||
}
|
||||
function measureActions(
|
||||
fold: number,
|
||||
_epoch: number,
|
||||
_version: string
|
||||
): Attachment<HTMLElement> {
|
||||
function measureActions(fold: number, _epoch: number, _version: string): Attachment<HTMLElement> {
|
||||
return (node) => {
|
||||
const ro = new ResizeObserver(() => recordActions(fold, GAP + node.offsetWidth))
|
||||
ro.observe(node)
|
||||
@@ -324,12 +319,13 @@ The row's height matches the sidebar's own header row, so the two read as one ba
|
||||
bar and run to its right edge, and they stretch its full height because that surface
|
||||
sits on the bottom edge. -->
|
||||
<!-- `data-wm-snapshot-hidden`: a mount always starts unmeasured, so Home's snapshot draws
|
||||
this box hidden too (homeSnapshot.ts). -->
|
||||
this box hidden too (homeSnapshot.ts). It fades in rather than popping in, since it
|
||||
lands after what the snapshot already painted around it. -->
|
||||
<div
|
||||
{@attach measureActions(fold, actionsEpoch, actionsVersion)}
|
||||
data-wm-snapshot-hidden
|
||||
class={twMerge(
|
||||
'flex',
|
||||
'flex wm-page-in',
|
||||
// pl-4: the gap between the breadcrumb and the filling surface is bare bar, so it
|
||||
// belongs here rather than inside that surface, where it would be filled.
|
||||
content?.actionsFill
|
||||
|
||||
@@ -359,6 +359,9 @@
|
||||
{/if}
|
||||
{/snippet}
|
||||
|
||||
<!-- The layout has already painted the sidebar and the surface behind it, so only what is new to
|
||||
this route fades in. It plays on every arrival at Home, not just the one off a workspace
|
||||
hand-over: that is the arrival it is for, and a soft one costs nothing on the others. -->
|
||||
<div
|
||||
bind:this={pageEl}
|
||||
class="{fromSnapshot
|
||||
@@ -506,28 +509,3 @@
|
||||
{#if !$roleCapabilities.code}
|
||||
<OperatorTour bind:this={operatorTour} />
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
/* The page's content arriving, rather than being there. The layout has already painted the
|
||||
sidebar and the surface behind it, so only what is new to this route fades. It plays on
|
||||
every arrival at Home, not just the one off a workspace hand-over — that is the arrival it
|
||||
is for, and a soft one costs nothing on the others. */
|
||||
@keyframes wm-page-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.wm-page-in {
|
||||
animation: wm-page-in 500ms ease-out both;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.wm-page-in {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user