studio-engine 0.135.1 → 0.135.2
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 +6 -0
- data/app/javascript/studio/head_chrome.js +9 -1
- data/app/views/components/_theme_toggle_morph.html.erb +1 -1
- data/lib/studio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 28ff2552c8617d0b83ccf3780a8cdd1606deb3a3038407a702a9d6aa485babd9
|
|
4
|
+
data.tar.gz: 61b03ceb320803267f6af0ea35c159c90e7a0d5431970c12d16323981037123a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9199937c1152f34b557f21da4b5139389295aa2e787b63060c522701407a62f09e39d011425f0c58fe0dd28560db930423210cabdd5ff1a6ae3b1806752b0043
|
|
7
|
+
data.tar.gz: e2766e79b19c8821e045b2d4397208bde0c5022464502b2d8f01de49ed8ec9ad7669bbc8e4fe136c9f55696dc7f89046cc223baccac25560b76a0dbfbe08c338
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.135.2 — 2026-11-08
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **A nav-spinner hide no longer ends a later show.** `hideNavSpinner()` waits out the minimum display time before it hides, and a hide still waiting (the layout's load-time hydrate) used to land after a later `showNavSpinner()` and drop that spinner while its work was still running. Each show now starts a generation, and a hide fires only if no later show has started. Nothing to do in a host: it arrives with the engine bump.
|
|
12
|
+
|
|
7
13
|
## 0.135.1 — 2026-11-07
|
|
8
14
|
|
|
9
15
|
### Fixed
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
// Minimum display time prevents quick flashes; per app via
|
|
15
15
|
// Studio.nav_spinner_min_ms, which the head publishes as
|
|
16
16
|
// <meta name="studio-nav-spinner-min-ms"> (smooth-load apps drop it to ~300).
|
|
17
|
+
// A hide is bound to the show it ends: one still waiting out the minimum when a
|
|
18
|
+
// later show starts does nothing, and that show's own hide takes the spinner down.
|
|
17
19
|
|
|
18
20
|
// How long hide must still wait so the spinner shows for at least minMs.
|
|
19
21
|
export function spinnerHideDelay(shownAt, now, minMs) {
|
|
@@ -27,6 +29,10 @@ export function spinnerMinMs(doc) {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
var spinnerShownAt = 0
|
|
32
|
+
// Each show starts a new generation. A hide captures the generation it ends and
|
|
33
|
+
// hides only if no later show has started one, so a hide still waiting out the
|
|
34
|
+
// minimum (the load's hydrate) never drops a spinner a later press raised.
|
|
35
|
+
var spinnerGeneration = 0
|
|
30
36
|
|
|
31
37
|
function showToggle(doc) {
|
|
32
38
|
doc.querySelectorAll('.nav-toggle-icon').forEach(function (e) { e.style.opacity = '1'; e.style.transform = 'scale(1) rotate(0deg)' })
|
|
@@ -35,13 +41,15 @@ function showToggle(doc) {
|
|
|
35
41
|
|
|
36
42
|
export function showNavSpinner() {
|
|
37
43
|
spinnerShownAt = Date.now()
|
|
44
|
+
spinnerGeneration += 1
|
|
38
45
|
document.querySelectorAll('.nav-toggle-icon').forEach(function (e) { e.style.opacity = '0'; e.style.transform = 'scale(0) rotate(90deg)' })
|
|
39
46
|
document.querySelectorAll('.nav-spinner-icon').forEach(function (e) { e.style.opacity = '1'; e.style.transform = 'scale(1) rotate(0deg)' })
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
export function hideNavSpinner() {
|
|
50
|
+
var generation = spinnerGeneration
|
|
43
51
|
var wait = spinnerHideDelay(spinnerShownAt, Date.now(), spinnerMinMs(document))
|
|
44
|
-
setTimeout(function () { showToggle(document) }, wait)
|
|
52
|
+
setTimeout(function () { if (generation === spinnerGeneration) showToggle(document) }, wait)
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
// Reset spinner state before Turbo caches the page. Installed once.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%# Theme toggle with scale-morph spinner swap.
|
|
2
|
-
showNavSpinner() / hideNavSpinner() (
|
|
2
|
+
showNavSpinner() / hideNavSpinner() (studio/head_chrome) cross-fade between
|
|
3
3
|
the theme toggle and a loading spinner with a scale+rotate animation.
|
|
4
4
|
%>
|
|
5
5
|
<span class="relative flex" style="width: 16px; height: 16px;">
|
data/lib/studio/version.rb
CHANGED