Add a "Clear all" button to the Layout tab's widget canvas
One request (DELETE /api/frames/{id}/widgets) removes every widget on
the frame in a single locked transaction, cascading their configs and
button-action bindings the same way single-widget delete already does.
Gated behind confirm() like the existing per-widget remove button, and
disabled when there's nothing to clear. Covered by the same owner/
unrelated-user/linked-but-not-controlling permission shape used
elsewhere (test_widget_placement.py).
Also fixes a real, pre-existing mobile bug this surfaced: the Layout
page's .layout grid used a bare `1fr` track on the <860px breakpoint
instead of `minmax(0, 1fr)` like the desktop rule already does, so a
wide enough descendant (previously nothing hit this; the new title-row
button did) would force the whole page into horizontal scroll on phone
widths. Verified before/after with the run-server driver's new
`viewport` command.
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
<div class="layout">
|
||||
<div class="main-col">
|
||||
<section class="card">
|
||||
<h2 class="card-title">Widgets</h2>
|
||||
<div class="card-title-row">
|
||||
<h2 class="card-title">Widgets</h2>
|
||||
<button type="button" id="clear-all-widgets" class="secondary btn-inline">Clear all</button>
|
||||
</div>
|
||||
<p class="sub">Drag a widget to move it, drag its bottom-right corner
|
||||
to resize it -- like arranging widgets on a phone's home screen.
|
||||
Widgets can't overlap. Click a widget's gear icon for its own
|
||||
|
||||
Reference in New Issue
Block a user