fix(admin/tables): clamp long description to 2 lines so Actions stay reachable
This commit is contained in:
parent
f598b7e2f6
commit
e369d0ed7b
2 changed files with 22 additions and 5 deletions
|
|
@ -10,6 +10,9 @@ CalVer image tags (`stable-YYYY.MM.N`, `dev-YYYY.MM.N`) are produced for every C
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- **Admin / Tables**: long table descriptions no longer push the row's Edit / Manage access / Delete buttons off-screen. The Description column is now clamped to 2 lines with the full text available on hover and in the Edit modal.
|
||||
|
||||
## [0.38.0] — 2026-05-06
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -473,6 +473,18 @@
|
|||
.registry-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.registry-table .col-description {
|
||||
max-width: 0; /* lets line-clamp / overflow take effect inside fixed layout */
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow-wrap: anywhere;
|
||||
line-height: 1.4;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.registry-table th {
|
||||
|
|
@ -512,8 +524,10 @@
|
|||
}
|
||||
|
||||
.registry-table .col-actions {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
width: 120px;
|
||||
min-width: 120px;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* ── Modal overlay ── */
|
||||
|
|
@ -2606,8 +2620,8 @@
|
|||
html += '<td class="col-id" title="' + escapeHtml(table.id) + '">' + escapeHtml(table.id) + '</td>';
|
||||
html += '<td>' + escapeHtml(table.query_mode || 'local') + '</td>';
|
||||
html += '<td>' + escapeHtml((table.primary_key || []).join(', ') || '-') + '</td>';
|
||||
html += '<td>' + escapeHtml(table.description || '-') + '</td>';
|
||||
html += '<td class="col-actions">';
|
||||
html += '<td class="col-description" title="' + escapeHtml(table.description || '') + '">' + escapeHtml(table.description || '-') + '</td>';
|
||||
html += '<td class="col-actions"><div style="display:flex; gap:4px; justify-content:flex-end;">';
|
||||
html += '<button class="btn-icon" title="Edit" onclick=\'openEditModal(' + JSON.stringify(table).replace(/'/g, "\\'") + ')\'>';
|
||||
html += '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>';
|
||||
html += '</button>';
|
||||
|
|
@ -2618,7 +2632,7 @@
|
|||
html += '<button class="btn-icon danger" title="Delete" onclick="deleteTable(\'' + escapeHtml(table.id).replace(/'/g, "\\'") + '\')">';
|
||||
html += '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>';
|
||||
html += '</button>';
|
||||
html += '</td></tr>';
|
||||
html += '</div></td></tr>';
|
||||
});
|
||||
html += '</tbody></table>';
|
||||
target.innerHTML = html;
|
||||
|
|
|
|||
Loading…
Reference in a new issue