studio-engine 0.54.1 → 0.56.0

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.
@@ -1,39 +0,0 @@
1
- <%# The edit form's save bar — fixed to the viewport bottom, present only while
2
- the form is dirty.
3
-
4
- No locals. It reads `dirty` and `changeCount` off the enclosing
5
- studioProfileForm component, so it must be rendered INSIDE that x-data scope.
6
-
7
- ITS OWN PARTIAL so the browser lane can mount it. The lab page that drives
8
- this in a real browser may set up a partial's locals and nothing else — it may
9
- not hand-roll the markup — and while this lived inline in edit.html.erb there
10
- was no name for it to render. A template needs a controller, a session and a
11
- user; a partial needs none of those. See test/lib/e2e_lane_contract_test.rb.
12
-
13
- Four details that make or break it:
14
-
15
- * fixed, not sticky — it must not reserve height while it is hidden;
16
- * env(safe-area-inset-bottom), or it sits under the iPhone home indicator;
17
- * role="status" + aria-live="polite" announces "unsaved changes" without
18
- stealing focus;
19
- * the enclosing form carries bottom padding while the bar is up, so the bar
20
- never covers the last field. That padding lives on the x-data element in
21
- edit.html.erb, because it is the scroll container's business, not the
22
- bar's.
23
- %>
24
- <div x-show="dirty" x-cloak x-transition.opacity
25
- data-studio-save-bar
26
- role="status" aria-live="polite"
27
- class="fixed inset-x-0 bottom-0 z-40 border-t border-subtle"
28
- style="background: var(--color-surface); padding-bottom: env(safe-area-inset-bottom);">
29
- <div class="max-w-2xl mx-auto px-4 py-3 flex items-center justify-between gap-4">
30
- <p class="text-sm text-secondary">
31
- <span class="font-semibold text-heading" x-text="changeCount"></span>
32
- <span x-text="changeCount === 1 ? 'unsaved change' : 'unsaved changes'"></span>
33
- </p>
34
- <div class="flex items-center gap-2">
35
- <button type="button" @click="discard()" class="btn btn-outline btn-sm">Discard</button>
36
- <button type="submit" class="btn btn-primary btn-sm">Save changes</button>
37
- </div>
38
- </div>
39
- </div>