Huge refactor for bulk editing of references and new schema changes in backend

This commit is contained in:
Ian Keane 2026-06-11 10:06:20 -04:00
parent eb130ffcfd
commit 067272b797
3 changed files with 624 additions and 19 deletions

221
style.css
View file

@ -138,6 +138,9 @@ th[data-filter].filter-active::before {
}
.popover-clear:hover { color: var(--text); }
/* Short/full column header label swap (see responsive section) */
.col-short { display: none; }
/* ── Buttons ──────────────────────────────────────────────── */
button {
cursor: pointer;
@ -156,6 +159,7 @@ main {
flex: 1;
overflow-x: auto;
padding: 1rem 1.25rem;
min-width: 0; /* required for overflow-x: auto to work inside a flex container */
}
#tune-table {
@ -345,6 +349,219 @@ fieldset.active .fs-body { display: contents; }
/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
#tune-table th:nth-child(n+5),
#tune-table td:nth-child(n+5) { display: none; }
/* Header: let actions wrap onto a second line */
header { flex-wrap: wrap; }
#header-actions { flex-wrap: wrap; }
/* Table: scroll horizontally instead of hiding columns */
#tune-table { width: max-content; min-width: 100%; }
/* Tighter cell padding on mobile */
#tune-table th,
#tune-table td { padding: .4rem .35rem; }
/* Short column headers: swap to abbreviated label on mobile */
.col-full { display: none; }
.col-short { display: inline; }
/* Modals: fullscreen */
dialog {
position: fixed;
inset: 0;
width: 100%;
max-width: 100%;
height: 100%;
max-height: 100%;
border-radius: 0;
border: none;
margin: 0;
}
}
/* ── Bulk edit popover ────────────────────────────────────── */
#bulk-edit-popover {
position: fixed;
z-index: 100;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: .4rem;
min-width: 200px;
box-shadow: 0 4px 16px rgba(0,0,0,.4);
flex-direction: column;
gap: .2rem;
}
#bulk-edit-popover:not([hidden]) { display: flex; }
#bulk-edit-popover button {
text-align: left;
background: transparent;
border: none;
color: var(--text);
padding: .4rem .65rem;
border-radius: var(--radius);
font-size: .875rem;
}
#bulk-edit-popover button:hover { background: rgba(255,255,255,.08); opacity: 1; }
#btn-bulk-edit { background: transparent; border: 1px solid var(--border); color: var(--muted); }
/* ── Bulk refs modal ──────────────────────────────────────── */
#bulk-refs-modal { max-width: 760px; }
#bulk-refs-controls {
display: flex;
gap: .5rem;
flex-wrap: wrap;
margin-bottom: .75rem;
}
#bulk-refs-controls input,
#bulk-refs-controls select {
background: var(--bg);
border: 1px solid var(--border);
color: var(--text);
border-radius: var(--radius);
padding: .3rem .5rem;
font-size: .85rem;
}
#bulk-refs-controls input[type="search"] { flex: 1; min-width: 140px; }
#bulk-refs-list {
max-height: 55vh;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: var(--radius);
margin-bottom: .5rem;
}
.bulk-tune-row {
padding: .45rem .65rem;
border-bottom: 1px solid var(--border);
}
.bulk-tune-row:last-child { border-bottom: none; }
.bulk-tune-main {
display: flex;
align-items: center;
gap: .6rem;
}
.bulk-tune-name {
font-weight: 600;
font-size: .875rem;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bulk-tune-meta,
.bulk-tune-instruments {
font-size: .8rem;
color: var(--muted);
white-space: nowrap;
}
.bulk-tune-refs { white-space: nowrap; }
.btn-bulk-add-ref { flex-shrink: 0; font-size: .75rem; padding: .2rem .5rem; }
.bulk-ref-form {
display: flex;
gap: .4rem;
align-items: center;
margin-top: .35rem;
padding-top: .35rem;
border-top: 1px solid var(--border);
}
.bulk-ref-form input {
background: var(--bg);
border: 1px solid var(--border);
color: var(--text);
border-radius: var(--radius);
padding: .3rem .5rem;
font-size: .85rem;
flex: 1;
}
.bulk-ref-form .bulk-ref-site { max-width: 110px; flex: none; }
.btn-bulk-ref-save { background: var(--accent); flex-shrink: 0; font-size: .8rem; padding: .25rem .6rem; }
.bulk-refs-empty { color: var(--muted); text-align: center; padding: 1.5rem; font-size: .875rem; }
/* ── Musician chips ──────────────────────────────────────────── */
.ref-musicians-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .35rem;
width: 100%;
margin-top: .3rem;
}
.ref-musician-chips {
display: flex;
flex-wrap: wrap;
gap: .3rem;
}
.musician-chip {
display: inline-flex;
align-items: center;
gap: .2rem;
background: var(--accent2);
border-radius: 99px;
padding: .15rem .45rem .15rem .55rem;
font-size: .75rem;
white-space: nowrap;
}
.chip-remove {
background: transparent;
border: none;
color: inherit;
padding: 0 .1rem;
font-size: .65rem;
line-height: 1;
opacity: .7;
}
.chip-remove:hover { opacity: 1; }
/* Allow ref rows to wrap so the musician row sits on its own line */
.ref-row { flex-wrap: wrap; }
/* Same for bulk ref form */
.bulk-ref-form { flex-wrap: wrap; }
.bulk-ref-musicians-mount { width: 100%; }
.bulk-ref-musicians-mount .ref-musicians-row { margin-top: 0; }
/* ── References display modal ────────────────────────────────── */
.refs-modal-item {
display: flex;
flex-direction: column;
gap: .2rem;
padding: .5rem 0;
border-bottom: 1px solid var(--border);
}
.refs-modal-item:last-child { border-bottom: none; }
.ref-link-anchor {
color: var(--accent);
font-size: .875rem;
word-break: break-all;
text-decoration: none;
}
.ref-link-anchor:hover { text-decoration: underline; }
.ref-meta {
font-size: .8rem;
color: var(--muted);
}
.ref-site-wrap { max-width: 160px; }