feat: add contextual help and stabilize repository layout
This commit is contained in:
@@ -8,6 +8,19 @@ async function handleShellActions(event, target, action, repository) {
|
||||
await refreshDeploymentTruth(true);
|
||||
setLoading(false);
|
||||
}
|
||||
} else if (action === "open-context-help" || action === "help-topic") {
|
||||
ui.helpTopic = target.dataset.topic || "getting-started";
|
||||
ui.helpQuery = "";
|
||||
ui.currentView = "help";
|
||||
ui.modal = null;
|
||||
render();
|
||||
requestAnimationFrame(() =>
|
||||
document.querySelector(`[data-help-topic="${ui.helpTopic}"]`)?.scrollIntoView({ block: "start", behavior: "smooth" }),
|
||||
);
|
||||
} else if (action === "clear-help-search") {
|
||||
ui.helpQuery = "";
|
||||
render();
|
||||
requestAnimationFrame(() => document.querySelector("#help-search")?.focus());
|
||||
} else if (action === "select-repo") selectRepository(target.dataset.id);
|
||||
else if (action === "open-deployment-link") {
|
||||
if (!repository) return true;
|
||||
|
||||
Reference in New Issue
Block a user