style: apply workbench visual system
This commit is contained in:
@@ -24,6 +24,14 @@ describe('ProjectWorkbench', () => {
|
|||||||
expect(screen.getByText('Ops Dashboard')).toBeInTheDocument();
|
expect(screen.getByText('Ops Dashboard')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('marks active channel with aria-pressed', async () => {
|
||||||
|
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
|
||||||
|
|
||||||
|
await fireEvent.click(screen.getByRole('button', { name: 'Work Plan 8' }));
|
||||||
|
|
||||||
|
expect(screen.getByRole('button', { name: 'Work Plan 8' })).toHaveAttribute('aria-pressed', 'true');
|
||||||
|
});
|
||||||
|
|
||||||
it('shows inspected task details in the inspector', async () => {
|
it('shows inspected task details in the inspector', async () => {
|
||||||
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
|
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
|
||||||
const inspector = screen.getByLabelText('Object inspector');
|
const inspector = screen.getByLabelText('Object inspector');
|
||||||
|
|||||||
@@ -1,165 +1,192 @@
|
|||||||
:root {
|
:root {
|
||||||
color: #202124;
|
color: #18181b;
|
||||||
background: #f6f7f9;
|
background: #f4f4f5;
|
||||||
font-family:
|
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||||
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
--background: #f4f4f5;
|
||||||
|
--panel: #ffffff;
|
||||||
|
--panel-muted: #fafafa;
|
||||||
|
--border: #d4d4d8;
|
||||||
|
--text: #18181b;
|
||||||
|
--muted: #71717a;
|
||||||
|
--primary: #0f7ae5;
|
||||||
|
--primary-strong: #0969c8;
|
||||||
|
--success: #15803d;
|
||||||
|
--danger: #b91c1c;
|
||||||
|
--radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* { box-sizing: border-box; }
|
||||||
box-sizing: border-box;
|
body { margin: 0; min-width: 320px; min-height: 100vh; }
|
||||||
}
|
button, input, textarea, select { font: inherit; }
|
||||||
|
button { cursor: pointer; }
|
||||||
|
button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
|
||||||
|
|
||||||
body {
|
.login-page {
|
||||||
margin: 0;
|
|
||||||
min-width: 320px;
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
textarea,
|
|
||||||
select {
|
|
||||||
font: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shell {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 280px 1fr;
|
place-items: center;
|
||||||
min-height: 100vh;
|
padding: 24px;
|
||||||
|
background: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.login-panel {
|
||||||
border-right: 1px solid #d9dde3;
|
width: min(420px, 100%);
|
||||||
background: #ffffff;
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
background: var(--panel);
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar h1 {
|
.server-login,
|
||||||
margin: 0 0 24px;
|
.login-heading,
|
||||||
font-size: 24px;
|
.channel-page,
|
||||||
}
|
.object-inspector,
|
||||||
|
.channel-sidebar {
|
||||||
.workspace {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 24px;
|
gap: 12px;
|
||||||
padding: 24px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-status,
|
.server-login input,
|
||||||
.selection-status {
|
.search-box input {
|
||||||
margin: 12px 0 0;
|
width: 100%;
|
||||||
color: #5f6673;
|
border: 1px solid var(--border);
|
||||||
font-size: 13px;
|
border-radius: 6px;
|
||||||
|
padding: 9px 10px;
|
||||||
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-login {
|
.server-login button,
|
||||||
|
.primary-action {
|
||||||
|
border: 1px solid var(--primary);
|
||||||
|
border-radius: 6px;
|
||||||
|
background: var(--primary);
|
||||||
|
color: white;
|
||||||
|
padding: 9px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workbench-shell {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 64px 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspace-topbar {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 160px minmax(240px, 1fr) auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
background: var(--panel);
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workbench-body {
|
||||||
|
min-height: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 76px 280px minmax(0, 1fr) 320px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-rail,
|
||||||
|
.channel-sidebar,
|
||||||
|
.object-inspector {
|
||||||
|
border-right: 1px solid var(--border);
|
||||||
|
background: var(--panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-rail {
|
||||||
|
display: grid;
|
||||||
|
align-content: start;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-rail button {
|
||||||
|
min-width: 48px;
|
||||||
|
min-height: 48px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--panel-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-rail button.active,
|
||||||
|
.channel-group button.active {
|
||||||
|
border-color: var(--primary);
|
||||||
|
color: var(--primary);
|
||||||
|
background: #eff6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.channel-sidebar,
|
||||||
|
.object-inspector,
|
||||||
|
.channel-stage {
|
||||||
|
padding: 16px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.channel-group,
|
||||||
|
.recent-sessions,
|
||||||
|
.task-list,
|
||||||
|
.record-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-login label {
|
.channel-group button,
|
||||||
font-size: 13px;
|
.recent-sessions button,
|
||||||
color: #4b5563;
|
.task-card,
|
||||||
}
|
.record-row,
|
||||||
|
.cron-row {
|
||||||
.server-login input {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #c7ccd4;
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius);
|
||||||
padding: 9px 10px;
|
background: var(--panel);
|
||||||
|
padding: 10px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.server-login button {
|
.task-card,
|
||||||
border: 1px solid #1f2937;
|
.record-row,
|
||||||
border-radius: 6px;
|
.cron-row {
|
||||||
background: #1f2937;
|
|
||||||
color: white;
|
|
||||||
padding: 9px 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-grid {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, minmax(160px, 1fr));
|
grid-template-columns: auto 1fr auto;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-metric {
|
|
||||||
border: 1px solid #d9dde3;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: white;
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-metric span {
|
|
||||||
display: block;
|
|
||||||
color: #5f6673;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-metric strong {
|
|
||||||
display: block;
|
|
||||||
margin-top: 8px;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inbox-review {
|
|
||||||
display: grid;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inbox-review h2 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.suggestions {
|
|
||||||
display: grid;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.suggestion {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 20px 1fr;
|
|
||||||
gap: 10px;
|
|
||||||
align-items: start;
|
align-items: start;
|
||||||
border: 1px solid #d9dde3;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: white;
|
|
||||||
padding: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-body {
|
.task-card.completed {
|
||||||
|
color: var(--muted);
|
||||||
|
background: var(--panel-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inspector-tabs {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-body small {
|
.inspector-tabs button[aria-selected='true'] {
|
||||||
color: #5f6673;
|
border-color: var(--primary);
|
||||||
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestions button {
|
@media (max-width: 920px) {
|
||||||
justify-self: start;
|
.workspace-topbar {
|
||||||
border: 1px solid #1f2937;
|
grid-template-columns: 1fr;
|
||||||
border-radius: 6px;
|
height: auto;
|
||||||
background: #1f2937;
|
padding: 12px;
|
||||||
color: white;
|
}
|
||||||
padding: 9px 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
.workbench-shell {
|
||||||
.shell {
|
grid-template-rows: auto 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workbench-body {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.project-rail,
|
||||||
|
.channel-sidebar,
|
||||||
|
.object-inspector {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
border-bottom: 1px solid #d9dde3;
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-grid {
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user