studio-engine 0.111.2.rc1 → 0.111.3.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/app/assets/tailwind/studio_engine/engine.css +12 -2
- data/app/javascript/studio/nav_collapse.js +14 -6
- data/app/views/layouts/_navbar.html.erb +5 -2
- data/lib/studio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8107aa8a527107e7b61ed7816152274bda0265ecb8fdfc1c1ac102cb96adff0c
|
|
4
|
+
data.tar.gz: 74e40a25b75a473bca96886dd3811cfb844ba9e93de65fa4e5b9ab32b1b70ffe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0837f160f4ff4c1d250b34ca315b195af43f03b1a506ae6b57e08f1b3b643e5192523489a6306615ce3b2dc4d7450ed01fa4f6be3ca36b32d93d6189384ef8a1'
|
|
7
|
+
data.tar.gz: d0e31886e8ce2ab4a0125e3ea9f7e25b53cf62392f3f46ede9b6d7d45e4468d21a4d03014cfa9c50de3c78c7f7804473c82b6ecf2d11eda7b45cc72849d24a76
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.111.3 — 2026-10-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **The desktop navbar links keep their gap to the brand on the scroll
|
|
12
|
+
timeline.** From 768px on `data-nav-timeline`, the brand shrinks by a
|
|
13
|
+
transform from its left edge, and a transform keeps its layout box, so the
|
|
14
|
+
links beside it stayed put and the gap widened as the page scrolled (24px at
|
|
15
|
+
the top to 148px collapsed on the lab header). `studio/nav_collapse` now also
|
|
16
|
+
publishes `--nav-brand-shrink`, the brand's expanded width times
|
|
17
|
+
`1 - --nav-brand-scale`, measured once like the other timeline values, and
|
|
18
|
+
`[data-nav-links]` slides left by it on the brand's own timeline, range and
|
|
19
|
+
easing (reduced motion snaps it with the brand). The engine navbar's desktop
|
|
20
|
+
`<nav>` carries the hook only when the header is on the timeline, so an
|
|
21
|
+
opted-out navbar stays byte-identical; a forked header opts in by putting `data-nav-links`
|
|
22
|
+
on its links, as with `data-nav-account` and `data-nav-tools`. Off the
|
|
23
|
+
timeline (phones, Firefox, previews) nothing changes.
|
|
24
|
+
|
|
7
25
|
## 0.111.2 — 2026-10-18
|
|
8
26
|
|
|
9
27
|
### Fixed
|
|
@@ -775,7 +775,14 @@ body.modal-open .studio-app-banner {
|
|
|
775
775
|
band so it stays centred on the visible bar, the brand scales from its left
|
|
776
776
|
edge, the avatar and name from the right (the name by the avatar's ratio,
|
|
777
777
|
the rule of 3), and the icon rail slides right by what the account gave up
|
|
778
|
-
so the gaps stay even.
|
|
778
|
+
so the gaps stay even. A transform keeps the brand's layout box, so the
|
|
779
|
+
links beside it ([data-nav-links], the navbar's desktop <nav>) slide left
|
|
780
|
+
by the width the brand gives up (--nav-brand-shrink) and keep their gap
|
|
781
|
+
to it. The compositor runs these with the scroll itself.
|
|
782
|
+
|
|
783
|
+
FORKED HEADERS opt in by hook, as with data-nav-account and data-nav-tools:
|
|
784
|
+
data-nav-links on the element holding the links beside the brand. Without
|
|
785
|
+
it those links stay put while the brand shrinks, and the gap widens.
|
|
779
786
|
|
|
780
787
|
THE SCROLLED LINE AND SHADOW are drawn by ::after on the same timeline,
|
|
781
788
|
not by border-b (which would add a pixel of height and reflow).
|
|
@@ -823,7 +830,8 @@ body.modal-open .studio-app-banner {
|
|
|
823
830
|
.nav-shell[data-nav-timeline] .nav-logo-link,
|
|
824
831
|
.nav-shell[data-nav-timeline] [data-nav-account] > [aria-hidden],
|
|
825
832
|
.nav-shell[data-nav-timeline] [data-nav-account] > span:first-child,
|
|
826
|
-
.nav-shell[data-nav-timeline] [data-nav-tools]
|
|
833
|
+
.nav-shell[data-nav-timeline] [data-nav-tools],
|
|
834
|
+
.nav-shell[data-nav-timeline] [data-nav-links] {
|
|
827
835
|
animation-timing-function: ease-in-out;
|
|
828
836
|
animation-fill-mode: both;
|
|
829
837
|
animation-timeline: scroll(root block);
|
|
@@ -833,6 +841,7 @@ body.modal-open .studio-app-banner {
|
|
|
833
841
|
.nav-shell[data-nav-timeline] [data-nav-account] > [aria-hidden] { transform-origin: right center; animation-name: nav-tl-avatar; }
|
|
834
842
|
.nav-shell[data-nav-timeline] [data-nav-account] > span:first-child { transform-origin: right center; animation-name: nav-tl-name; }
|
|
835
843
|
.nav-shell[data-nav-timeline] [data-nav-tools] { animation-name: nav-tl-tools; }
|
|
844
|
+
.nav-shell[data-nav-timeline] [data-nav-links] { animation-name: nav-tl-links; }
|
|
836
845
|
}
|
|
837
846
|
/* Reduced motion: the shrink snaps at the first pixel, as --nav-p's 0/1
|
|
838
847
|
snap does on the script path. */
|
|
@@ -876,6 +885,7 @@ body.modal-open .studio-app-banner {
|
|
|
876
885
|
@keyframes nav-tl-avatar { to { transform: scale(var(--nav-avatar-scale, 1)); } }
|
|
877
886
|
@keyframes nav-tl-name { to { transform: translateX(var(--nav-avatar-shrink, 0px)) scale(var(--nav-avatar-scale, 1)); } }
|
|
878
887
|
@keyframes nav-tl-tools { to { transform: translateX(var(--nav-tools-shift, 0px)); } }
|
|
888
|
+
@keyframes nav-tl-links { to { transform: translateX(calc(-1 * var(--nav-brand-shrink, 0px))); } }
|
|
879
889
|
@keyframes nav-tl-lit { to { opacity: 1; } }
|
|
880
890
|
|
|
881
891
|
/* A board whose controller failed to load (studio/lazy_controllers marks its
|
|
@@ -220,26 +220,32 @@ export function timelineOn(el, wide) {
|
|
|
220
220
|
//
|
|
221
221
|
// rest, collapsed the header's height expanded and collapsed
|
|
222
222
|
// brand0, brand1 the brand link's height expanded and collapsed
|
|
223
|
+
// brandW the brand link's width expanded (0: none)
|
|
223
224
|
// avatar0, avatar1 the avatar's height expanded and collapsed (0: none)
|
|
224
225
|
// nameW the account name's width
|
|
225
226
|
//
|
|
226
227
|
// The name scales by the avatar's ratio (the rule of 3), and the icon rail
|
|
227
228
|
// slides right by what the name and avatar give up, so the gaps stay even.
|
|
228
|
-
// Without an avatar (signed out) nothing on the right moves.
|
|
229
|
-
|
|
229
|
+
// Without an avatar (signed out) nothing on the right moves. The brand scales
|
|
230
|
+
// from its left edge, but a transform keeps its layout box, so the links beside
|
|
231
|
+
// it ([data-nav-links]) slide left by the width it gives up (brandShrink) and
|
|
232
|
+
// keep their gap to it.
|
|
233
|
+
export function timelineVars({ rest, collapsed, brand0, brand1, brandW, avatar0, avatar1, nameW }) {
|
|
234
|
+
var brandScale = brand0 > 0 ? brand1 / brand0 : 1;
|
|
230
235
|
var avatarScale = avatar0 > 0 ? avatar1 / avatar0 : 1;
|
|
231
236
|
var avatarShrink = avatar0 > 0 ? Math.max(0, avatar0 - avatar1) : 0;
|
|
232
237
|
return {
|
|
233
238
|
band: Math.max(0, rest - collapsed),
|
|
234
|
-
brandScale:
|
|
239
|
+
brandScale: brandScale,
|
|
240
|
+
brandShrink: brandW > 0 ? Math.max(0, brandW * (1 - brandScale)) : 0,
|
|
235
241
|
avatarScale: avatarScale,
|
|
236
242
|
avatarShrink: avatarShrink,
|
|
237
243
|
toolsShift: avatar0 > 0 ? nameW * (1 - avatarScale) + avatarShrink : 0
|
|
238
244
|
};
|
|
239
245
|
}
|
|
240
246
|
|
|
241
|
-
var TIMELINE_PROPS = ['--nav-band', '--nav-start', '--nav-brand-scale', '--nav-
|
|
242
|
-
'--nav-avatar-shrink', '--nav-tools-shift'];
|
|
247
|
+
var TIMELINE_PROPS = ['--nav-band', '--nav-start', '--nav-brand-scale', '--nav-brand-shrink',
|
|
248
|
+
'--nav-avatar-scale', '--nav-avatar-shrink', '--nav-tools-shift'];
|
|
243
249
|
|
|
244
250
|
// What the timeline mode leaves on the header. stopTimeline() clears it, and
|
|
245
251
|
// so does the --nav-p path's start(): a Turbo snapshot taken wide and restored
|
|
@@ -450,6 +456,7 @@ export class NavCollapse {
|
|
|
450
456
|
return {
|
|
451
457
|
h: el.offsetHeight,
|
|
452
458
|
brand: brand ? brand.offsetHeight : 0,
|
|
459
|
+
brandW: brand ? brand.offsetWidth : 0,
|
|
453
460
|
avatar: avatar ? avatar.offsetHeight : 0
|
|
454
461
|
};
|
|
455
462
|
};
|
|
@@ -460,7 +467,7 @@ export class NavCollapse {
|
|
|
460
467
|
el.style.removeProperty('--nav-p');
|
|
461
468
|
var vars = timelineVars({
|
|
462
469
|
rest: open.h, collapsed: shut.h,
|
|
463
|
-
brand0: open.brand, brand1: shut.brand,
|
|
470
|
+
brand0: open.brand, brand1: shut.brand, brandW: open.brandW,
|
|
464
471
|
avatar0: open.avatar, avatar1: shut.avatar,
|
|
465
472
|
nameW: name ? name.offsetWidth : 0
|
|
466
473
|
});
|
|
@@ -472,6 +479,7 @@ export class NavCollapse {
|
|
|
472
479
|
'--nav-band': round(vars.band) + 'px',
|
|
473
480
|
'--nav-start': start + 'px',
|
|
474
481
|
'--nav-brand-scale': String(round(vars.brandScale)),
|
|
482
|
+
'--nav-brand-shrink': round(vars.brandShrink) + 'px',
|
|
475
483
|
'--nav-avatar-scale': String(round(vars.avatarScale)),
|
|
476
484
|
'--nav-avatar-shrink': round(vars.avatarShrink) + 'px',
|
|
477
485
|
'--nav-tools-shift': round(vars.toolsShift) + 'px'
|
|
@@ -175,8 +175,11 @@
|
|
|
175
175
|
<<%= brand_tag %> class="nav-title font-extrabold text-heading tracking-tight min-w-0"><span class="truncate"><%= prefix %></span><span class="text-primary truncate"><%= last_word %></span></<%= brand_tag %>>
|
|
176
176
|
<% end %>
|
|
177
177
|
<% end %>
|
|
178
|
-
<%# Desktop nav — Studio.navbar_links
|
|
179
|
-
|
|
178
|
+
<%# Desktop nav — Studio.navbar_links. data-nav-links, only where the
|
|
179
|
+
header is on the scroll timeline (so an opted-out header stays
|
|
180
|
+
byte-identical): it slides left by what the scaled brand gives up
|
|
181
|
+
(engine.css, THE SCROLL-DRIVEN COLLAPSE). %>
|
|
182
|
+
<nav <%= "data-nav-links " if scroll_timeline && !is_preview %>class="hidden md:flex items-center gap-4"<%= ' aria-label="Main"'.html_safe if navbar_links.any? %>>
|
|
180
183
|
<% navbar_links.each do |link| %>
|
|
181
184
|
<%= studio_navbar_link_tag(link, size: "text-sm") %>
|
|
182
185
|
<% end %>
|
data/lib/studio/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: studio-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.111.
|
|
4
|
+
version: 0.111.3.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex McRitchie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|