feat(web/ui): consolidate dialogs, cards, and breakpoints (Pass 3)

- Unify modal/dialog system; .modal-* are now aliases of .dialog-*
- Migrate WorkspacesPage, start-tool-modal, merge-dialog, workspace-tools-panel to .dialog-*
- Add .card-sm/.card-md/.card-lg/.card-elevated/.card-borderless modifiers
- Apply card utilities across workspaces, projects, ssh-keys, workspace-detail, git-history
- Remove duplicated card-like background/border/padding from page CSS
- Remove 860px breakpoint; standardize on 767px/768px mobile split
- Add docs/development/ui-review-checklist.md
- Archive web-ui-spacing-typography-rework OpenSpec change
This commit is contained in:
Developer
2026-06-16 15:27:45 +00:00
parent 4f4939406f
commit 6e419f815d
25 changed files with 752 additions and 202 deletions
+131 -134
View File
@@ -255,8 +255,27 @@
.card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
padding: 1rem;
border-radius: var(--radius-md);
}
.card-sm {
padding: var(--space-3);
}
.card-md {
padding: var(--space-4);
}
.card-lg {
padding: var(--space-5);
}
.card-elevated {
box-shadow: var(--shadow-sm);
}
.card-borderless {
border-color: transparent;
}
.card-label {
@@ -387,40 +406,129 @@
margin: 0;
}
/* ─── Dialog / Modal System ───
* .dialog-* is the canonical implementation.
* .modal-overlay and .modal-content are deprecated aliases kept for backward compatibility.
*/
.dialog-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
display: grid;
place-content: center;
z-index: 50;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-4);
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(2px);
}
.modal-overlay {
/* deprecated alias */
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-4);
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(2px);
}
.dialog {
width: 100%;
max-width: 32rem;
max-height: calc(100vh - var(--space-8));
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
padding: var(--space-5);
width: min(560px, 100vw - 2rem);
max-height: min(800px, 100vh - 2rem);
overflow-y: auto;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
}
.modal-content {
/* deprecated alias */
width: 100%;
max-width: 32rem;
max-height: calc(100vh - var(--space-8));
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
}
.dialog-lg {
width: min(800px, 100vw - 2rem);
max-width: 48rem;
}
.dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding: var(--space-4);
border-bottom: 1px solid var(--border);
}
.dialog-header h2,
.dialog-header h3 {
margin: 0;
font-size: var(--font-size-lg);
line-height: var(--line-height-tight);
}
.dialog-body {
flex: 1;
overflow: auto;
padding: var(--space-4);
}
.dialog-footer,
.dialog-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: var(--space-3);
padding: var(--space-4);
border-top: 1px solid var(--border);
}
.dialog-close {
display: flex;
align-items: center;
justify-content: center;
width: var(--touch-target);
height: var(--touch-target);
padding: 0;
background: transparent;
border: none;
border-radius: var(--radius-md);
color: var(--muted);
cursor: pointer;
}
.dialog-close:hover {
background: var(--bg);
color: var(--ink);
}
@media (max-width: 767px) {
.dialog {
width: 100vw;
height: 100vh;
max-height: 100vh;
border-radius: 0;
padding: var(--space-4);
.dialog-overlay,
.modal-overlay {
align-items: flex-end;
padding: 0;
}
.dialog-overlay {
padding: 0;
.dialog,
.modal-content {
max-width: 100%;
max-height: calc(100vh - var(--space-6));
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
}
@@ -551,18 +659,8 @@
border-radius: 10px;
}
@media (max-width: 860px) {
.shell-body {
grid-template-columns: 1fr;
}
.shell-nav {
flex-direction: row;
overflow-x: auto;
border-right: 0;
border-bottom: 1px solid var(--border);
}
/* The 860px breakpoint is deprecated; mobile layout is handled at 767px above. */
@media (max-width: 767px) {
.card-grid {
grid-template-columns: 1fr;
}
@@ -641,43 +739,6 @@
font-size: 0.85rem;
}
/* Modal Styles */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
min-width: 400px;
max-width: 600px;
max-height: 80vh;
overflow: auto;
}
.modal-content h2 {
margin: 0 0 1rem 0;
font-size: 1.25rem;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
margin-top: 1.5rem;
}
/* Merge Dialog */
.merge-form {
display: flex;
@@ -776,7 +837,7 @@
}
/* Mobile responsiveness */
@media (max-width: 768px) {
@media (max-width: 767px) {
.settings-layout {
flex-direction: column;
gap: 1rem;
@@ -879,65 +940,9 @@
}
/* Commit Dialog */
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.commit-dialog {
background: var(--panel);
border-radius: 14px;
width: 100%;
max-width: 600px;
max-height: 90vh;
overflow: auto;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.dialog-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
}
.dialog-header h3 {
margin: 0;
font-size: 1.1rem;
}
.dialog-close {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--muted);
padding: 0;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
}
.dialog-close:hover {
background: var(--bg);
color: var(--ink);
}
.dialog-body {
padding: 1.5rem;
}
.file-info {
@@ -1012,14 +1017,6 @@
margin-bottom: 1rem;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding: 1rem 1.5rem;
border-top: 1px solid var(--border);
}
/* Icon System */
.icon {
display: inline-flex;