feat(edit): inline editing controls on every record surface (spec-v4-inline-editing §5 steps 1-7)

- EditableText: wrapper zone + pencil trigger (E6), inline validation errors,
  provenance tooltip + copy-chip (E7)
- TagListEditor: per-chip edit/delete/move + ghost add over all six tag
  arrays, tagline emphasis toggle
- RecordControls + AddGhost on About, AboutPage, Expertise, Experience,
  ExperiencePage, Projects, ProjectsListPage, ProjectDetailPage (incl.
  sections), PhilosophyPage; RecordSettings popover (featured, section list
  with type picker, variant, location, logo)
- id-slug rename on committed record titles (E3); per-field conflict UI in
  EditBar; chrome CSS in App.css; labels in both ui.json
- JsonPanel kept until the inline surface is verified in a real browser
  (spec progress row 8); acceptance §6 partial — build, validate:content,
  lint, smoke-draft pass 2026-10-23
This commit is contained in:
dong.nguyen committed 2026-10-23 09:36:59 +07:00
1 parent 753b28a4e3
commit 0a72cd9b58
22 files changed
+1812 -277

No files matched your search

+253
View File
@@ -2428,6 +2428,259 @@
background: var(--accent-tint);
}
/* Field and record chrome (spec-v4-inline-editing E2/E4/E5): the controls are
edit-mode-only islands inside the site's own elements — one bordered icon
language (44px targets stay on the bar, 24px here), hover/focus in the
accent, delete in the error colour. */
.edit-field-controls {
display: inline-flex;
align-items: center;
gap: 4px;
margin-left: 8px;
vertical-align: middle;
}
.edit-pencil,
.edit-item-control,
.edit-record-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-surface);
color: var(--text-muted);
cursor: pointer;
}
.edit-pencil:hover,
.edit-item-control:hover,
.edit-record-btn:hover:not(:disabled) {
color: var(--accent);
border-color: var(--accent);
}
.edit-pencil:focus-visible,
.edit-item-control:focus-visible,
.edit-record-btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.edit-item-control:disabled,
.edit-record-btn:disabled {
opacity: 0.35;
cursor: default;
}
.edit-item-remove:hover,
.edit-record-btn.edit-record-remove:hover {
color: var(--error);
border-color: var(--error);
}
.edit-provenance {
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
color: var(--text-muted);
border: 1px dashed var(--border);
border-radius: 4px;
background: none;
padding: 2px 6px;
cursor: pointer;
}
.edit-provenance:hover {
color: var(--accent);
border-color: var(--accent);
}
.edit-field-error {
display: block;
font-size: 12px;
color: var(--error);
margin-top: 2px;
}
.edit-add-inline,
.edit-add-ghost {
display: inline-flex;
align-items: center;
gap: 5px;
border: 1px dashed var(--border-strong);
border-radius: 6px;
background: transparent;
color: var(--text-muted);
padding: 6px 10px;
cursor: pointer;
}
.edit-add-inline:hover,
.edit-add-ghost:hover {
color: var(--accent);
border-color: var(--accent);
border-style: solid;
}
.edit-add-ghost-card {
justify-content: center;
width: 100%;
min-height: 160px;
border-radius: 12px;
}
/* A record whose box hosts the controls (cards, timeline entries, sections)
and a grid card whose body is a link (wrapped in a shell) both float the
controls at the top-right corner of the record. Elsewhere — the project
detail header — they stay in flow. */
.edit-record-host,
.edit-record-shell {
position: relative;
}
.edit-record-controls {
display: inline-flex;
gap: 4px;
}
.edit-record-host > .edit-record-controls,
.edit-record-shell > .edit-record-controls {
position: absolute;
top: 8px;
right: 8px;
z-index: 30;
}
/* Record settings dialog (E2): the structure fields of one record —
featured, section list, timeline variant, logo. */
.record-settings {
position: fixed;
top: 80px;
left: 50%;
transform: translateX(-50%);
z-index: 960;
width: min(560px, calc(100vw - 32px));
max-height: min(70vh, 640px);
overflow-y: auto;
background: var(--bg-elevated);
border: 1px solid var(--border-strong);
border-radius: 10px;
padding: 14px 16px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.record-settings-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.record-settings-title {
font-weight: 600;
}
.record-settings-close {
border: 1px solid var(--border);
border-radius: 4px;
background: none;
color: var(--text-muted);
font-size: 16px;
line-height: 1;
padding: 2px 8px;
cursor: pointer;
}
.record-settings-close:hover {
color: var(--error);
border-color: var(--error);
}
.record-settings-group-title {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin: 12px 0 6px;
}
.record-settings-field {
display: flex;
align-items: center;
gap: 8px;
margin: 8px 0;
}
.record-settings-field input {
background: var(--bg-surface);
color: inherit;
border: 1px solid var(--border);
border-radius: 4px;
padding: 4px 8px;
min-width: 220px;
}
.record-settings-list {
list-style: none;
display: grid;
gap: 6px;
margin: 0;
padding: 0;
}
.record-settings-row {
display: flex;
align-items: center;
gap: 8px;
border: 1px solid var(--border);
border-radius: 6px;
padding: 6px 8px;
}
.record-settings-row select {
background: var(--bg-surface);
color: inherit;
border: 1px solid var(--border);
border-radius: 4px;
padding: 3px 6px;
}
.record-settings-id {
font-size: 12px;
color: var(--text-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 220px;
}
/* Field-by-field conflict view (E8). */
.edit-bar-conflict-fields {
list-style: none;
margin: 8px 0 0;
padding: 0;
display: grid;
gap: 6px;
}
.edit-bar-conflict-fields li {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.edit-bar-conflict-side {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
}
@media (max-width: 768px) {
.json-panel {
width: 100%;