Replace the Notebook tab toolbar with an x, a rename dialog and drag-only reordering

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-20 12:01:37 -07:00
1 parent d4adb53a3a
commit 086c735c65
7 files changed
+194 -182

No files matched your search

+58 -34
View File
@@ -38,7 +38,7 @@
flex: 1 1 auto;
min-height: 0;
border: 1px solid var(--rule-2);
border-radius: 8px;
border-radius: 0;
overflow: hidden;
background: var(--panel);
}
@@ -165,18 +165,35 @@
.notepad-status { margin: 0 auto 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--ink-3); }
.notepad-status.is-problem { color: var(--warn); }
/* The tab bar: a scrolling row of tab buttons with the current one marked,
then New tab. The tools under it act on the current tab. */
.notepad-tabbar { flex: none; display: flex; align-items: flex-end; gap: 8px; margin-bottom: 4px; }
.notepad-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.notepad-tab {
/* The tab bar: a scrolling row of tabs, each its name and an x, with the
current one marked, then New tab. A double-click renames, the x deletes and
a drag moves; the questions open in the small dialogs below. */
.notepad-tabbar { flex: none; display: flex; align-items: flex-end; gap: 8px; margin-bottom: -1px; position: relative; z-index: 1; }
.notepad-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 0; }
.notepad-tabwrap {
flex: none;
max-width: 220px;
padding: 6px 12px;
max-width: 240px;
display: flex;
align-items: center;
border: 1px solid var(--rule-2);
border-radius: 8px 8px 0 0;
background: var(--panel-2);
color: var(--ink-2);
}
.notepad-tabwrap:hover { color: var(--accent); border-color: var(--accent-line); }
.notepad-tabwrap:has(.notepad-tab[aria-selected="true"]) {
background: var(--accent-soft);
border-color: var(--accent);
border-bottom-color: var(--panel);
color: var(--ink);
}
.notepad-tab {
flex: 0 1 auto;
min-width: 0;
padding: 6px 4px 6px 12px;
border: 0;
background: none;
color: inherit;
font: inherit;
font-size: 13px;
line-height: 1.2;
@@ -185,27 +202,37 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.notepad-tab:hover { color: var(--accent); border-color: var(--accent-line); }
.notepad-tab[aria-selected="true"] {
background: var(--accent-soft);
border-color: var(--accent);
color: var(--ink);
font-weight: 600;
.notepad-tab[aria-selected="true"] { font-weight: 600; }
.notepad-tab-x {
flex: none;
width: 20px;
height: 20px;
margin-right: 6px;
padding: 0;
border: 0;
border-radius: 4px;
background: none;
color: inherit;
font: inherit;
font-size: 16px;
line-height: 1;
cursor: pointer;
opacity: 0.6;
}
.notepad-tabwrap:hover .notepad-tab-x,
.notepad-tabwrap:has(.notepad-tab[aria-selected="true"]) .notepad-tab-x,
.notepad-tab-x:focus-visible { opacity: 1; }
.notepad-tab-x:hover { background: var(--panel); color: var(--warn); }
.notepad-tab:focus-visible,
.notepad-tab-x:focus-visible,
.notepad-tab-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.notepad-tab.is-dragging { opacity: 0.5; }
.notepad-tab.is-drop-before { box-shadow: -3px 0 0 0 var(--accent); }
.notepad-tabwrap:has(.is-dragging) { opacity: 0.5; }
.notepad-tabwrap:has(.is-drop-before) { box-shadow: -3px 0 0 0 var(--accent); }
.notepad-tabs.is-drop-end { box-shadow: inset -3px 0 0 0 var(--accent); }
.notepad-tab-new { flex: none; margin-bottom: 2px; }
.notepad-tab-tools { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.notepad-tab-tools[hidden] { display: none; }
.notepad-tab-tools .btn.tiny { margin-bottom: 0; }
.notepad-tab-new { flex: none; margin-bottom: 4px; }
/* The name form (New tab and Rename) and the delete question sit between the
tools and the editor, in the dialog, never in a browser prompt. */
.notepad-name-form,
.notepad-delete,
/* The name and delete questions: small dialogs over the Notebook, never a
browser prompt. The empty state sits where the editor would. */
.notepad-empty {
flex: none;
margin: 0 0 10px;
@@ -214,14 +241,12 @@
border-radius: 8px;
background: var(--panel-2);
}
.notepad-name-form[hidden],
.notepad-delete[hidden],
.notepad-empty[hidden] { display: none; }
.notepad-name-form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.notepad-name-row { display: flex; gap: 8px; align-items: center; }
.notepad-name-row input {
flex: 1 1 auto;
min-width: 0;
.modal.notepad-sub { width: min(420px, calc(100vw - 32px)); }
.modal.notepad-sub h2 { margin: 0 0 10px; }
.notepad-name-form input {
display: block;
width: 100%;
padding: 6px 8px;
border: 1px solid var(--rule-2);
border-radius: 6px;
@@ -229,12 +254,11 @@
color: var(--ink);
font: inherit;
}
.notepad-name-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.notepad-name-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.notepad-name-error { min-height: 1.2em; margin: 6px 0 0; }
.notepad-name-error:not(:empty) { color: var(--warn); }
.modal.notepad-delete { border-color: var(--warn); }
.notepad-delete p { margin: 0 0 8px; }
.notepad-delete { border-color: var(--warn); }
.notepad-delete-row { display: flex; gap: 8px; }
.notepad-empty { text-align: center; padding: 28px 12px; }
.notepad-empty p { margin: 0 0 12px; color: var(--ink-2); }
/* Editor and pictures together, so the empty state hides both at once. */
+4 -5
View File
@@ -64,11 +64,10 @@
.notepad-images { flex-direction: column; align-items: stretch; }
.notepad-tabbar { flex-wrap: wrap; }
.modal.notepad .notepad-tab-new,
.modal.notepad .notepad-tab-tools .btn,
.modal.notepad .notepad-name-row .btn,
.modal.notepad .notepad-delete-row .btn,
.notepad-tab { min-height: 44px; }
.notepad-name-row { flex-wrap: wrap; }
.modal.notepad-sub .modal-actions .btn,
.notepad-tab,
.notepad-tab-x { min-height: 44px; }
.notepad-tab-x { width: 32px; }
.notepad-add { align-self: flex-start; }
.notepad-thumb .notepad-thumb-delete { width: 30px; height: 30px; font-size: 18px; }
.modal.notepad-preview[open] { grid-template-columns: 52px minmax(0, 1fr) 52px; }