Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"tauri:build": "tauri build"
},
"dependencies": {
"@carbon/icons-react": "^11.81.0",
"@carbon/react": "^1.108.0",
"@carbon/styles": "^1.107.0",
"@carbon/icons-react": "^11.92.0",
"@carbon/react": "^1.120.0",
"@carbon/styles": "^1.119.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
Expand All @@ -35,33 +35,33 @@
"@slaclab/canopy-shell": "^0.3.0",
"echarts": "^6.1.0",
"echarts-for-react": "^3.0.6",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-resizable-panels": "^4.11.1"
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-resizable-panels": "^4.24.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@slaclab/canopy-vite": "^0.3.0",
"@tauri-apps/cli": "^1.6.3",
"@testing-library/dom": "^10.4.1",
"@testing-library/dom": "^10.4.2",
"@testing-library/jest-dom": "github:testing-library/jest-dom",
"@testing-library/react": "^16.3.2",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "github:testing-library/user-event",
"@types/node": "^26.6.6",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"eslint": "^10.3.0",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.3.0",
"eslint": "^10.15.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.6.0",
"eslint-plugin-react-refresh": "^0.5.8",
"globals": "^17.14.0",
"husky": "^9.1.7",
"jsdom": "^31.0.0",
"lint-staged": "^17.0.4",
"prettier": "^3.8.3",
"jsdom": "^31.0.1",
"lint-staged": "^17.6.1",
"prettier": "^3.10.1",
"typescript": "~6.0.2",
"typescript-eslint": "^8.59.2",
"vite": "^8.1.6",
"typescript-eslint": "^8.72.2",
"vite": "^8.3.8",
"vitest": "^5.1.0"
},
"lint-staged": {
Expand Down
1,755 changes: 770 additions & 985 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/components/ConfigStoreModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ describe('ConfigStoreModal', () => {
await waitFor(() => expect(deleteConfig).toHaveBeenCalledWith('test-config'));
await screen.findByText('No saved configs yet.');
// The row's button went with the row, so focus falls back to the store body.
expect(document.activeElement).toBe(
screen.getByRole('region', { name: 'Config store contents' })
);
// Carbon's ModalBody always sets aria-labelledby to the modal title, which
// takes ARIA naming precedence over its aria-label, so the region's
// accessible name is no longer "Config store contents" -- role alone
// still uniquely identifies it in this modal.
expect(document.activeElement).toBe(screen.getByRole('region'));
});

it('falls back to the store body when the delete trigger is disabled on close', async () => {
Expand All @@ -199,9 +201,7 @@ describe('ConfigStoreModal', () => {
await waitFor(() =>
expect(document.querySelectorAll('.cds--modal.is-visible')).toHaveLength(1)
);
expect(document.activeElement).toBe(
screen.getByRole('region', { name: 'Config store contents' })
);
expect(document.activeElement).toBe(screen.getByRole('region'));
});

it('moves focus into the delete confirmation and back to its trigger on Escape', async () => {
Expand Down
10 changes: 8 additions & 2 deletions src/components/PVSearchModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ function renderModal(props: Partial<ComponentProps<typeof PVSearchModal>> = {})
}

async function typePattern(text: string) {
fireEvent.change(screen.getByLabelText('Pattern'), { target: { value: text } });
// Carbon's Search now sets aria-labelledby on the outer role="search" div
// too, so an unscoped query matches both it and the input.
fireEvent.change(screen.getByLabelText('Pattern', { selector: 'input' }), {
target: { value: text },
});
await act(async () => {
vi.advanceTimersByTime(300);
});
Expand Down Expand Up @@ -308,7 +312,9 @@ describe('PVSearchModal', () => {
fireEvent.click(screen.getByRole('option', { name: 'Plot 2' }));
expect(screen.queryByText('KLYS:A')).toBeNull();
expect(addButton().disabled).toBe(true);
expect((screen.getByLabelText('Pattern') as HTMLInputElement).value).toBe('KLYS');
expect(
(screen.getByLabelText('Pattern', { selector: 'input' }) as HTMLInputElement).value
).toBe('KLYS');

await act(async () => {
vi.advanceTimersByTime(300);
Expand Down
10 changes: 10 additions & 0 deletions src/components/RightPanel.formulaHelp.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ vi.stubGlobal('matchMedia', (query: string) => ({
removeEventListener: () => {},
}));

// Carbon's Tabs also observes its own size; jsdom has no ResizeObserver.
vi.stubGlobal(
'ResizeObserver',
class {
observe() {}
unobserve() {}
disconnect() {}
}
);

// An empty expression shows every help example (including the "Add a {var}"
// hint) and skips the Formula Engine validation request.
const formulaTrace: PVTrace = {
Expand Down
10 changes: 10 additions & 0 deletions src/components/RightPanel.gridOpacity.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ vi.stubGlobal('matchMedia', (query: string) => ({
removeEventListener: () => {},
}));

// Carbon's Tabs also observes its own size; jsdom has no ResizeObserver.
vi.stubGlobal(
'ResizeObserver',
class {
observe() {}
unobserve() {}
disconnect() {}
}
);

function makePlot(gridOpacity: number): Plot {
return {
id: 'p1',
Expand Down
10 changes: 10 additions & 0 deletions src/components/RightPanel.gridOpacityLoop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ vi.stubGlobal('matchMedia', (query: string) => ({
removeEventListener: () => {},
}));

// Carbon's Tabs also observes its own size; jsdom has no ResizeObserver.
vi.stubGlobal(
'ResizeObserver',
class {
observe() {}
unobserve() {}
disconnect() {}
}
);

function makePlot(gridOpacity: number): Plot {
return {
id: 'p1',
Expand Down
10 changes: 10 additions & 0 deletions src/components/RightPanel.timeRange.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ vi.stubGlobal('matchMedia', (query: string) => ({
removeEventListener: () => {},
}));

// Carbon's Tabs also observes its own size; jsdom has no ResizeObserver.
vi.stubGlobal(
'ResizeObserver',
class {
observe() {}
unobserve() {}
disconnect() {}
}
);

function makePlot(overrides: Partial<Plot> = {}): Plot {
return {
id: 'p1',
Expand Down
Loading