Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/design/web-shell-advanced-table-controls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Web Shell advanced table controls

## Goal

Align the advanced Markdown table with the updated Web Shell design while
preserving cell selection, statistics, filtering, sorting, resizing, row
details, full-value dialogs, copying, and first-column freezing.

## Design

- Keep row counts and selection statistics on the left of a compact toolbar.
Show selection copy beside those statistics, and group density, column
customization, and visible-table copy on the right.
- Sort only from the dedicated header icon. Filter popovers contain filtering
controls only.
- Manage table-column visibility and order from one shadcn-based popover.
- Manage row-detail fields independently in the same popover. Detail fields
keep source order and are not draggable.
- Keep at most one expanded row. Its panel contains only selected detail fields.
- Reset restores source column order and the initial visible/detail selections.

## Compatibility

The underlying Markdown table data and public customization API are unchanged.
All behavior remains local to `EnhancedMarkdownTable`.
2 changes: 2 additions & 0 deletions packages/web-shell/client/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
--foreground: #fafafa;
--card: #161616;
--card-foreground: #fafafa;
--table-section-bg: var(--subtle-bg);
--popover: #1a1a1a;
--popover-foreground: #fafafa;
--primary: #fafafa;
Expand Down Expand Up @@ -416,6 +417,7 @@
--foreground: #0a0a0b;
--card: #ffffff;
--card-foreground: #0a0a0b;
--table-section-bg: #f3f4f6;
--popover: #ffffff;
--popover-foreground: #0a0a0b;
--primary: #151517;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,10 @@ describe('AssistantMessage markdown tables', () => {
</WebShellCustomizationProvider>,
);

expect(container.textContent).toContain('Quick copy');
expect(container.textContent).toContain('Details');
expect(container.querySelector('button[aria-label*="table"]')).toBeNull();
expect(container.textContent).toContain('Copy table');
expect(
container.querySelector('button[aria-label="View details for row 1"]'),
).not.toBeNull();
});

it('keeps streaming assistant tables plain', () => {
Expand All @@ -459,6 +460,6 @@ describe('AssistantMessage markdown tables', () => {
);

expect(container.querySelector('table')).not.toBeNull();
expect(container.textContent).not.toContain('Quick copy');
expect(container.textContent).not.toContain('Copy table');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('EchartsFullDataBlock', () => {
);
expect(headerTexts[1]).toContain('day');
expect(headerTexts[2]).toContain('orders');
expect(container.textContent).toContain('Quick copy');
expect(container.textContent).toContain('Copy table');
expect(
container.querySelector('button[aria-label="Sort by orders"]'),
).not.toBeNull();
Expand Down
Loading
Loading