web: app shell — left destination rail, settings-hosted connection, viewport panes
The layout item's work plus the two defects its review found:
- the wide grid sized the list track from its MAX, so at 600-759px the detail pane
was clipped to 40-199px; cap the list below 900px and narrow the rail there
(measured now: detail 232px at 600, 332 at 700, 340 at 900, 880 at 1440);
- the shell said 'Not connected' on a fresh page because the prefilled proxy URL
validated; the status now reflects a SAVED endpoint ('Not configured' until then)
and refreshes as the draft changes.
Includes the rail + bottom dock, connection moved into Settings, viewport-only
scrolling with panes that scroll themselves, tab semantics, skip link, h1 per
route, and the design tokens.
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
export function createTemplatesView(rt) {
|
||||
const { state, repo } = rt;
|
||||
const renderContent = (...args) => rt.renderContent(...args);
|
||||
const focusDetailHeading = (...args) => rt.focusDetailHeading(...args);
|
||||
const pushRoute = (...args) => rt.pushRoute(...args);
|
||||
const setError = (...args) => rt.setError(...args);
|
||||
const refreshPipelines = (...args) => rt.views.pipelines.refreshPipelines(...args);
|
||||
@@ -60,14 +61,6 @@ function templateGraphFor(key) {
|
||||
|
||||
function renderTemplateGallery() {
|
||||
const pane = h("div", { class: "list gallery" });
|
||||
pane.append(
|
||||
h(
|
||||
"div",
|
||||
{ class: "pane-head" },
|
||||
h("h2", { text: "Templates" }),
|
||||
h("button", { class: "ghost", text: "Refresh templates", onclick: () => loadTemplates(true) }),
|
||||
),
|
||||
);
|
||||
if (state.templateLoading && !state.templates.length) {
|
||||
pane.append(h("div", { class: "muted pad", text: "Loading templates…" }));
|
||||
return pane;
|
||||
@@ -76,7 +69,7 @@ function renderTemplateGallery() {
|
||||
pane.append(h("div", { class: "muted pad", text: "No templates are available on this server." }));
|
||||
return pane;
|
||||
}
|
||||
const cards = h("div", { class: "cards" });
|
||||
const cards = h("div", { class: "cards list-scroll" });
|
||||
for (const entry of state.templates) {
|
||||
const card = templateCard(entry, templateGraphFor(entry.key));
|
||||
cards.append(
|
||||
@@ -84,6 +77,7 @@ function renderTemplateGallery() {
|
||||
"button",
|
||||
{
|
||||
class: `card${state.selectedTemplateKey === entry.key ? " selected" : ""}`,
|
||||
"data-template-key": entry.key,
|
||||
onclick: () => selectTemplate(entry.key),
|
||||
},
|
||||
h("span", { class: "card-name", text: templateGalleryName(card.name) }),
|
||||
@@ -105,15 +99,7 @@ function renderTemplateDetail() {
|
||||
}
|
||||
const graph = templateGraphFor(entry.key);
|
||||
pane.append(renderTemplateDetailActions());
|
||||
pane.append(
|
||||
h(
|
||||
"div",
|
||||
{ class: "tabstrip" },
|
||||
templateTabButton("summary", "Summary"),
|
||||
templateTabButton("graph", "Graph"),
|
||||
templateTabButton("source", "Source"),
|
||||
),
|
||||
);
|
||||
pane.append(h("h1", { class: "detail-title", id: "detailTitle", tabindex: "-1", text: templateDetailName(entry) }));
|
||||
if (state.templateTab === "graph") pane.append(renderTemplateGraphTab(graph));
|
||||
else if (state.templateTab === "source") pane.append(renderTemplateSourceTab(entry, graph));
|
||||
else pane.append(renderTemplateSummaryTab(entry, graph));
|
||||
@@ -287,20 +273,8 @@ async function createFromTemplate(entry) {
|
||||
renderContent();
|
||||
}
|
||||
|
||||
function templateTabButton(tab, label) {
|
||||
return h("button", {
|
||||
class: `minitab${state.templateTab === tab ? " active" : ""}`,
|
||||
text: label,
|
||||
onclick: () => {
|
||||
state.templateTab = tab;
|
||||
renderContent();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function renderTemplateSummaryTab(entry, graph) {
|
||||
const wrap = h("div", { class: "tabbody" });
|
||||
wrap.append(h("h2", { text: templateDetailName(entry) }));
|
||||
if ((entry.description ?? "").trim()) {
|
||||
wrap.append(h("p", { class: "body", text: entry.description }));
|
||||
}
|
||||
@@ -392,6 +366,7 @@ function selectTemplate(key) {
|
||||
state.selectedTemplateKey = key || null;
|
||||
resetTemplateCreateState();
|
||||
renderContent();
|
||||
if (key) focusDetailHeading();
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user