Skip to content

Commit 2b87cb1

Browse files
authored
Merge pull request #3495 from plotly/feature/dcc-refactor-datepicker
dcc redesign: `DatePickerSingle` and `DatePickerRange`
2 parents cf1669f + 4cd08ce commit 2b87cb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+7975
-12646
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
66

77
## Added
88
- Modernized `dcc.Tabs`
9+
- Modernized `dcc.DatePickerSingle` and `dcc.DatePickerRange`
910

1011
## Changed
1112
- `dcc.Tab` now accepts a `width` prop which can be a pixel or percentage width for an individual tab.
@@ -50,7 +51,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
5051
- [#3347](https://github.com/plotly/dash/pull/3347) Added 'api_endpoint' to `callback` to expose api endpoints at the provided path for use to be executed directly without dash.
5152
- [#3445](https://github.com/plotly/dash/pull/3445) Added API to reverse direction of slider component.
5253
- [#3460](https://github.com/plotly/dash/pull/3460) Add `/health` endpoint for server monitoring and health checks.
53-
- [#3465](https://github.com/plotly/dash/pull/3465) Plotly cloud integrations, add devtool API, placeholder plotly cloud CLI & publish button, `dash[cloud]` extra dependencies.
54+
- [#3465](https://github.com/plotly/dash/pull/3465) Plotly cloud integrations, add devtool API, placeholder plotly cloud CLI & publish button, `dash[cloud]` extra dependencies.
5455

5556
## Fixed
5657
- [#3490](https://github.com/plotly/dash/pull/3490) Fix stack overflow when circular callbacks are displayed on the devtool callback
Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
11
module.exports = {
22
preset: 'ts-jest',
3-
testEnvironment: 'node',
3+
testEnvironment: 'jsdom',
44
roots: ['<rootDir>/tests'],
5-
testMatch: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts'],
5+
testMatch: ['**/__tests__/**/*.{ts,tsx}', '**/?(*.)+(spec|test).{ts,tsx}'],
66
transform: {
7-
'^.+\\.ts$': 'ts-jest',
7+
'^.+\\.(ts|tsx)$': [
8+
'ts-jest',
9+
{
10+
tsconfig: {
11+
jsx: 'react',
12+
esModuleInterop: true,
13+
allowSyntheticDefaultImports: true,
14+
types: ['jest', '@testing-library/jest-dom'],
15+
},
16+
},
17+
],
18+
'^.+\\.js$': [
19+
'ts-jest',
20+
{
21+
tsconfig: {
22+
allowJs: true,
23+
},
24+
},
25+
],
826
},
927
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'],
1028
moduleNameMapper: {
1129
'^@/(.*)$': '<rootDir>/src/$1',
30+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
1231
},
1332
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
33+
// Disable caching to ensure TypeScript type changes are always picked up
34+
cache: false,
35+
// Limit workers in CI to prevent out-of-memory errors
36+
maxWorkers: process.env.CI ? 2 : undefined,
1437
};
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
// Jest setup file
2-
// This file is loaded before every test file
2+
// This file is loaded before every test file
3+
import '@testing-library/jest-dom';
4+
5+
// Mock window.dash_component_api for components that use Dash context
6+
global.window = global.window || {};
7+
global.window.dash_component_api = {
8+
useDashContext: () => ({
9+
useLoading: () => false,
10+
}),
11+
};

0 commit comments

Comments
 (0)