Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
336763f
feat: messing with the theme
mistercrunch Dec 20, 2024
352aa36
make Cancel secondary
mistercrunch Mar 2, 2025
8d36120
adjusting some buttons
mistercrunch Mar 2, 2025
ac81eef
fix types/tests
mistercrunch Mar 3, 2025
b2b7b89
fix unit test
mistercrunch Mar 4, 2025
22cbec1
ts-ignore
mistercrunch Mar 4, 2025
d131c29
fix a few buttons
mistercrunch Mar 4, 2025
b575aa6
make secondary filled/primary
mistercrunch Mar 4, 2025
6b5d53a
fix dashboard left panel background-color
mistercrunch Mar 4, 2025
d15c6d3
fixing storybook
mistercrunch Mar 4, 2025
4b55a92
set DARK ff to false
mistercrunch Mar 5, 2025
5faf018
switch primary color, keep old hex as comment in case we want to roll…
mistercrunch Mar 5, 2025
dbc7db9
rebased
mistercrunch Mar 17, 2025
2d461de
echarts
mistercrunch Mar 18, 2025
7dbe05f
fix treemap
mistercrunch Mar 19, 2025
f16600e
fix sankey theme
mistercrunch Mar 19, 2025
48df49d
fix BIG number
mistercrunch Mar 19, 2025
83f47d3
fixing vizes
mistercrunch Mar 19, 2025
2f80ebb
minor progress
mistercrunch Mar 19, 2025
e0d86df
merging
mistercrunch Mar 19, 2025
b9be692
fix MoreOutlined button background
mistercrunch Mar 19, 2025
9cb6c3b
color
mistercrunch Mar 19, 2025
1ca0f34
more button background
mistercrunch Mar 20, 2025
11bc496
echarts theming
mistercrunch Mar 20, 2025
b7bc111
Merge branch 'master' into template_less
mistercrunch Mar 20, 2025
358633e
some theming fixes
mistercrunch Mar 20, 2025
31eb105
touchups
mistercrunch Mar 24, 2025
4afbfd1
Merge branch 'master' into template_less
mistercrunch Mar 24, 2025
8ce1449
fix CopyOutlined icon in dataset view to align with sizing
mistercrunch Mar 24, 2025
56e3d16
theme toast icons and various cosmetic updates
mistercrunch Mar 24, 2025
5042248
Fix table row separator in TableCollection
mistercrunch Mar 24, 2025
59e402a
fix icon on Explore's cached label
mistercrunch Mar 24, 2025
cf68160
going vanila on tooltips
mistercrunch Mar 24, 2025
64c480a
aligning some colors tokens
mistercrunch Mar 25, 2025
54d67b6
fix table viz colors
mistercrunch Mar 25, 2025
11a29b1
fix Collapse color content
mistercrunch Mar 25, 2025
d3f450f
fix theme for ag-grid in SQL LAB
mistercrunch Mar 25, 2025
344c8f5
theming react-code-highlighter or whatev it's called
mistercrunch Mar 25, 2025
bcb6da1
Merge branch 'master' into template_less
mistercrunch Mar 25, 2025
cebff5e
improve styles in HighlightedSql
mistercrunch Mar 25, 2025
f949412
fix some tests
mistercrunch Mar 26, 2025
58724b1
fix test
mistercrunch Mar 26, 2025
7af32d4
fix theme test
mistercrunch Mar 26, 2025
023c7da
fix another test
mistercrunch Mar 26, 2025
aabeefb
fix types in Gauge/transformProps.test.ts
mistercrunch Mar 26, 2025
5418f09
fix test for BasicErrorAlert.tsx
mistercrunch Mar 26, 2025
1afa497
fix SavedQueries test
mistercrunch Mar 26, 2025
68ea9ac
fix ErrorMessageWithStackTrace
mistercrunch Mar 26, 2025
0472979
fix test in dashboard/actions.test.js
mistercrunch Mar 26, 2025
06d737e
add theming support to Storybook
mistercrunch Mar 27, 2025
d752b0f
fixing themes in Storybook
mistercrunch Mar 27, 2025
4f0a445
styling the AsyncAceEditor
mistercrunch Mar 27, 2025
5805f24
minor color tweak
mistercrunch Mar 27, 2025
3c289a9
a theme editor
mistercrunch Mar 27, 2025
f5b6806
ThemeEditor
mistercrunch Mar 27, 2025
6a15aaf
ThemeEditor
mistercrunch Mar 27, 2025
e7b2b58
Merge branch 'master' into template_less
mistercrunch Mar 27, 2025
5018749
fix cypress test
mistercrunch Mar 27, 2025
f217865
oopsy daisy
mistercrunch Mar 27, 2025
c31d70d
one minor edit to fix a cypress test
mistercrunch Mar 27, 2025
3665ebc
refactor(table): Upgrade table component from antd4 to antd5 (#32378)
EnxDev Mar 28, 2025
cde1da6
Merge branch 'master' into template_less
mistercrunch Mar 29, 2025
1dd8a76
set Global body bg color to colorBgBase
mistercrunch Mar 29, 2025
8b69958
centralize theming stuff in AsyncAceEditor
mistercrunch Mar 29, 2025
9dedb58
altering comment for THEME_OVERRIDES in superset/config.py
mistercrunch Mar 29, 2025
506c838
lint
mistercrunch Mar 29, 2025
e3342bb
Merge branch 'master' into template_less
mistercrunch Apr 1, 2025
9717159
refactor(form): Migrate Form component to Ant Design 5 (#32729)
msyavuz Apr 1, 2025
27d723f
force colorLink in GlobalStyles
mistercrunch Apr 1, 2025
952658e
fix links and bring GlobalStyles to superset-ui/core
mistercrunch Apr 1, 2025
d266835
remove console.log
mistercrunch Apr 1, 2025
70a5925
theming the viz picker
mistercrunch Apr 2, 2025
bc85a11
fix some type issues
mistercrunch Apr 2, 2025
6f73e58
refactor(theming): Fixes to previously migrated components (#32845)
msyavuz Apr 3, 2025
6b58ef1
feat: Theme to include brand logo configuration
mistercrunch Apr 2, 2025
2580a8b
Merge branch 'master' into template_less
mistercrunch Apr 3, 2025
e6df194
fix merge-related issues
mistercrunch Apr 3, 2025
6254db3
refactor(Components): Create wrappers for Ant Design 5 direct exports…
EnxDev Apr 7, 2025
33febb6
refactor(Tabs): Upgrade Tabs to Antd5 (#32810)
alexandrusoare Apr 7, 2025
c7d2881
Merge branch 'master' into template_less
mistercrunch Apr 7, 2025
3950cf0
refactor(Collapse): Upgrade Collapse to Antd5 (#32959)
DamianPendrak Apr 7, 2025
b835478
refactor(Select): Migrate Select component to Ant Design 5 (#32514)
msyavuz Apr 8, 2025
a9bc465
use colorBorder in AddSliceCard
mistercrunch Apr 7, 2025
c993abe
Merge branch 'master' into template_less
mistercrunch Apr 8, 2025
3b198ab
refactor(Table): Use our custom Table component in CRUD views (#32964)
msyavuz Apr 8, 2025
6c8e72b
Fix theming in Explore west panel - Search Input
mistercrunch Apr 8, 2025
7c2fd55
restyling page header and buttons
mistercrunch Apr 8, 2025
8bb02e2
fix: use Input & TextArea instead of native <input> and <textarea> (#…
mistercrunch Apr 8, 2025
739caa1
refactor(Checkbox): Upgrade component to Ant Design v5 (#32980)
payose Apr 9, 2025
6a4730b
Merge branch 'master' into template_less
mistercrunch Apr 9, 2025
c14dcec
refactor(breadcrumb): Upgrade Breadcrumb component from AntD v4 to An…
EnxDev Apr 11, 2025
662f33b
refactor(Components): Use named imports - P.1 (#33081)
geido Apr 11, 2025
4123d25
Merge branch 'master' into template_less
mistercrunch Apr 12, 2025
f18455c
fix a python build issue
mistercrunch Apr 12, 2025
29ba5ad
fix scripts/change_detector.py
mistercrunch Apr 12, 2025
2667a14
Merge branch 'master' into template_less
EnxDev Apr 14, 2025
334aa1a
fix a unit test
mistercrunch Apr 12, 2025
4f93c2d
Merge branch 'master' into template_less
mistercrunch Apr 15, 2025
dff7c1b
post merge conflicts
mistercrunch Apr 15, 2025
dcea6c0
fix imports
mistercrunch Apr 15, 2025
5e8cd7a
fix: provide id's
msyavuz Apr 15, 2025
18c3f0a
fix(theming): Fix various ci issues (#33147)
msyavuz Apr 16, 2025
86d5537
Merge branch 'master' into template_less
msyavuz Apr 16, 2025
08c9d28
Fix changes in DatasourcePanelItem after merge
kgabryje Apr 16, 2025
3fe5db1
refactor(Tabs): Tabs to use items instead of TabPanel (#33057)
alexandrusoare Apr 16, 2025
50535a9
fix: upgrade tabs in database modal (#33038)
DamianPendrak Apr 16, 2025
51f719f
set colorLink == colorPrimary
mistercrunch Apr 16, 2025
4709eb0
fix(Select): Merge conflicts and Select bug (#33165)
msyavuz Apr 24, 2025
6c01173
Merge branch 'master' into template_less
msyavuz Apr 24, 2025
d43657e
fix: post merge
msyavuz Apr 24, 2025
c217f56
refactor(components): Replace native HTML elements with Ant Design v5…
EnxDev Apr 25, 2025
a7b7e63
refactor(Table): Use Table instead of html <table> in CollectionTable…
msyavuz Apr 25, 2025
b040d52
refactor(Components): Use named imports - P.2 (#33249)
EnxDev Apr 25, 2025
f580da8
fix(Theming): DatabaseModal visual fixes (#33286)
msyavuz Apr 30, 2025
e529d84
fix: button colors and icons (#33287)
mistercrunch May 2, 2025
49bcf79
Merge branch 'master' into template_less
EnxDev May 5, 2025
9da62ed
refactor(InfoTooltipWithTrigger): Replace support for fa icons with a…
EnxDev May 5, 2025
8942489
Merge branch 'master' into template_less
mistercrunch May 5, 2025
fc031ca
fix: various theme-related tweaks and touches (#33372)
mistercrunch May 6, 2025
2c038f5
Merge branch 'master' into template_less
EnxDev May 7, 2025
d635c2a
fix: replace invalid theme tokens
EnxDev May 7, 2025
863a0be
Merge branch 'master' into template_less
mistercrunch May 7, 2025
3983ee0
fix category icon in VizPicker
mistercrunch May 9, 2025
5267ec2
fix DnD options caret and separator
mistercrunch May 9, 2025
67aa991
refactor(ui): replace native HTML elements with Ant Design 5 componen…
EnxDev May 12, 2025
7472714
Merge branch 'master' into template_less
msyavuz May 12, 2025
5b99180
fix: minor import issues
msyavuz May 12, 2025
cf68c87
fix: post merge fix imports
msyavuz May 12, 2025
1c28138
bigger icon in sql lab tab headers
mistercrunch May 9, 2025
f00adac
apply default theme boxShadow to cards
mistercrunch May 9, 2025
5a67713
Merge branch 'master' into template_less
mistercrunch May 13, 2025
e862b5c
more generic error catching
mistercrunch May 13, 2025
b03c425
fix(theming): Fix various visual regressions from theming (#33302)
msyavuz May 13, 2025
3997884
dummy commit to trigger CI
mistercrunch May 14, 2025
b9710f9
set the test for docker-compose-image-tag to only happen on merge to …
mistercrunch May 14, 2025
6fe8a54
fix the e2e GHA
mistercrunch May 14, 2025
14645a2
another try at fixing the GHA
mistercrunch May 14, 2025
7258dc9
fix(theming): Merge ci issues and new antd4 component to antd5 (#33429)
msyavuz May 14, 2025
fcea7e4
feat(theming): Support theming on embedding-sdk (#33360)
msyavuz May 14, 2025
33f2ffd
chore: rip antd-v4 from the app! (#33411)
mistercrunch May 15, 2025
0af5770
Merge branch 'master' into template_less
mistercrunch May 20, 2025
4070dba
fixing package-lock
mistercrunch May 20, 2025
20a17be
Merge branch 'master' into template_less
mistercrunch May 21, 2025
2979c30
fix(theming): Duplicate select values bug (#33558)
msyavuz May 22, 2025
c279d08
fix: remove all `less` styling! (#33445)
mistercrunch May 23, 2025
17ef5b6
fix native filters styling
mistercrunch May 23, 2025
8e48fdb
fix(theming): Fix visual regressions from theming P2/3 (#33587)
EnxDev May 27, 2025
58435e3
feat(Login): Migrate login page to frontend (#33255)
msyavuz May 29, 2025
28db9ad
chore: moving reusable components from `src/components` to `packages/…
mistercrunch May 31, 2025
9c7b676
fix Tooltip-related imports/exports
mistercrunch May 31, 2025
bd77f82
Merge branch 'master' into template_less
mistercrunch Jun 1, 2025
926d2bf
fix type errors
mistercrunch Jun 1, 2025
ef8ba1c
fix unit test live
mistercrunch Jun 1, 2025
90967c6
chore(CronPicker): Bump to v5.2.0 for full theming support (#33690)
EnxDev Jun 4, 2025
3eb04b0
Merge branch 'master' into template_less
EnxDev Jun 4, 2025
fd7b8f6
refactor(collapse): fix custom Collapse and align related imports pos…
EnxDev Jun 4, 2025
54e2c96
fix(RoleList): remove duplicate column
EnxDev Jun 4, 2025
3e34efe
Merge branch 'master' into template_less
EnxDev Jun 5, 2025
20a33b0
refactor(components): align related imports post-merge
EnxDev Jun 5, 2025
0315a37
Merge branch 'master' into template_less
mistercrunch Jun 6, 2025
4676f5c
fix(RTL test): update tab selector to avoid CSS pseudo-class parsing …
EnxDev Jun 8, 2025
84287be
fix(webpack): add stream-browserify fallback for Node.js 'stream' mod…
EnxDev Jun 8, 2025
04d0053
fix(deps): align geostyler versions to resolve dependency conflicts
EnxDev Jun 8, 2025
b41961a
fix(RTL test): adjust ResultsPaneOnDashboard.test.tsx to avoid invali…
EnxDev Jun 8, 2025
a9f744f
fix(tests): fix missing imports in DatasourceEditorCurrency.test and …
EnxDev Jun 8, 2025
0cacaba
refactor(Input Story): enhance type integration
EnxDev Jun 8, 2025
1eb65ec
refactor(UserInfo test): wrap render in await act to ensure state upd…
EnxDev Jun 8, 2025
33b069a
fix(RTL test): await asyncRender in DataSourceEditor.test to prevent …
EnxDev Jun 8, 2025
56089aa
Merge branch 'master' into template_less
msyavuz Jun 11, 2025
72fc7ac
fix(DatasourceEditor): clear mocks
msyavuz Jun 11, 2025
fa88197
fix(e2e): increase timeout
msyavuz Jun 12, 2025
96d7209
Merge branch master into template_less
EnxDev Jun 12, 2025
ae98d5f
refactor(DataSourceEditor tests): remove unused await and increase ti…
EnxDev Jun 12, 2025
253a72f
fix(theming): Fix visual regressions from theming P4 (#33703)
EnxDev Jun 12, 2025
1be1ca1
refactor(theming): Remove direct imports of supersetTheme (#33770)
msyavuz Jun 16, 2025
0a07520
feat(theming): implement a ThemeController (#33420)
msyavuz Jun 16, 2025
45a032a
fix(BaseIcon): Ensure iconSize is parsed correctly when passed as str…
EnxDev Jun 16, 2025
22be65a
fix(Table): table colors
msyavuz Jun 17, 2025
f7c38eb
chore(storybook): Include the missing path for loading component insi…
EnxDev Jun 17, 2025
23fe1e5
Merge branch 'master' into template_less
EnxDev Jun 17, 2025
957be7b
Merge branch 'master' into template_less
EnxDev Jun 17, 2025
e6ccef0
fix CI tests
EnxDev Jun 17, 2025
e2ccd43
fix(ThemeController): change mode when theme is edited
msyavuz Jun 17, 2025
64b390e
fix(ThemeController): update themeObject
msyavuz Jun 18, 2025
5d8e8c9
fix(ThemeController): update theme object with controller and select-…
msyavuz Jun 18, 2025
6b46794
fix SubMenu active button text in home page
mistercrunch Jun 19, 2025
1036b15
fix(theming): Fix visual regressions from theming P5 (#33786)
EnxDev Jun 19, 2025
ed188a2
fix(HeaderMenu): remove mocks
msyavuz Jun 19, 2025
2a837d2
fix(TableChart): background colors test
msyavuz Jun 19, 2025
bdf5858
fix(e2e): containing label
msyavuz Jun 19, 2025
128eb09
Merge branch 'master' into template_less
msyavuz Jun 19, 2025
745c62b
re-removing enzyme from package.json
mistercrunch Jun 19, 2025
3a2d41e
chore(Icons): add import for "UserAddOutlined" icon from AntD
EnxDev Jun 20, 2025
52e116b
fix(RightMenu): center items vertically
EnxDev Jun 20, 2025
217719b
shut pre-commit/pylint up
mistercrunch Jun 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docker/**/*.sh text eol=lf
*.svg binary
*.ipynb binary
*.geojson binary
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ jobs:
docker compose up superset-init --exit-code-from superset-init

docker-compose-image-tag:
# Run this job only on pushes to master (not for PRs)
# goal is to check that building the latest image works, not required for all PR pushes
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ jobs:
cd docs
yarn install --immutable

- name: Cache pre-commit environments
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-v2-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-v2-${{ runner.os }}-py${{ matrix.python-version }}-

- name: pre-commit
run: |
set +e # Don't exit immediately on failure
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/superset-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
with:
persist-credentials: false
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Checkout using ref (workflow_dispatch)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.ref != ''
uses: actions/checkout@v4
Expand Down Expand Up @@ -137,9 +138,16 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=4096"
with:
run: cypress-run-all ${{ env.USE_DASHBOARD }} ${{ matrix.app_root }}
- name: Set safe app root
if: failure()
id: set-safe-app-root
run: |
APP_ROOT="${{ matrix.app_root }}"
SAFE_APP_ROOT=${APP_ROOT//\//_}
echo "safe_app_root=$SAFE_APP_ROOT" >> $GITHUB_OUTPUT
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}-${{ matrix.parallel_id }}
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}-${{ matrix.parallel_id }}--${{ steps.set-safe-app-root.outputs.safe_app_root }}
27 changes: 8 additions & 19 deletions .github/workflows/superset-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Check for File Changes
id: check
Expand All @@ -39,6 +41,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "git rev-parse --short HEAD"
git rev-parse --short HEAD
echo "git show -s --format=raw HEAD"
git show -s --format=raw HEAD
docker buildx build \
-t $TAG \
--cache-from=type=registry,ref=apache/superset-cache:3.10-slim-bookworm \
Expand Down Expand Up @@ -115,24 +121,6 @@ jobs:
files: merged-output/coverage-summary.json
slug: apache/superset

core-cover:
needs: frontend-build
if: needs.frontend-build.outputs.should-run == 'true'
runs-on: ubuntu-24.04
steps:
- name: Download Docker Image Artifact
uses: actions/download-artifact@v4
with:
name: docker-image

- name: Load Docker Image
run: docker load < docker-image.tar.gz

- name: superset-ui/core coverage
run: |
docker run --rm $TAG bash -c \
"npm run core:cover"

lint-frontend:
needs: frontend-build
if: needs.frontend-build.outputs.should-run == 'true'
Expand All @@ -144,7 +132,8 @@ jobs:
name: docker-image

- name: Load Docker Image
run: docker load < docker-image.tar.gz
run: |
docker load < docker-image.tar.gz

- name: eslint
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:
- id: prettier
additional_dependencies:
- prettier@3.5.3
args: ["--ignore-path=./superset-frontend/.prettierignore"]
args: ["--ignore-path=./superset-frontend/.prettierignore", "--exclude", "site-packages"]
files: "superset-frontend"
- repo: local
hooks:
Expand Down
1 change: 1 addition & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ assists people when migrating to a new version.
- [33116](https://github.com/apache/superset/pull/33116) In Echarts Series charts (e.g. Line, Area, Bar, etc.) charts, the `x_axis_sort_series` and `x_axis_sort_series_ascending` form data items have been renamed with `x_axis_sort` and `x_axis_sort_asc`.
There's a migration added that can potentially affect a significant number of existing charts.
- [32317](https://github.com/apache/superset/pull/32317) The horizontal filter bar feature is now out of testing/beta development and its feature flag `HORIZONTAL_FILTER_BAR` has been removed.
- [31590](https://github.com/apache/superset/pull/31590) Marks the begining of intricate work around supporting dynamic Theming, and breaks support for [THEME_OVERRIDES](https://github.com/apache/superset/blob/732de4ac7fae88e29b7f123b6cbb2d7cd411b0e4/superset/config.py#L671) in favor of a new theming system based on AntD V5. Likely this will be in disrepair until settling over the 5.x lifecycle.
- [31976](https://github.com/apache/superset/pull/31976) Removed the `DISABLE_LEGACY_DATASOURCE_EDITOR` feature flag. The previous value of the feature flag was `True` and now the feature is permanently removed.
- [31959](https://github.com/apache/superset/pull/32000) Removes CSV_UPLOAD_MAX_SIZE config, use your web server to control file upload size.
- [31959](https://github.com/apache/superset/pull/31959) Removes the following endpoints from data uploads: `/api/v1/database/<id>/<file type>_upload` and `/api/v1/database/<file type>_metadata`, in favour of new one (Details on the PR). And simplifies permissions.
Expand Down
14 changes: 14 additions & 0 deletions superset-embedded-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export type EmbeddedDashboard = {
callbackFn: ObserveDataMaskCallbackFn,
) => void;
getDataMask: () => Record<string, any>;
setThemeConfig: (themeConfig: Record<string, any>) => void;
};

/**
Expand Down Expand Up @@ -245,6 +246,18 @@ export async function embedDashboard({
ourPort.start();
ourPort.defineMethod('observeDataMask', callbackFn);
};
// TODO: Add proper types once theming branch is merged
const setThemeConfig = async (themeConfig: Record<string, any>): Promise<void> => {
try {
ourPort.emit('setThemeConfig', { themeConfig });
log('Theme config sent successfully (or at least message dispatched)');
} catch (error) {
log(
'Error sending theme config. Ensure the iframe side implements the "setThemeConfig" method.',
);
throw error;
}
};

return {
getScrollSize,
Expand All @@ -253,5 +266,6 @@ export async function embedDashboard({
getActiveTabs,
observeDataMask,
getDataMask,
setThemeConfig
};
}
1 change: 0 additions & 1 deletion superset-frontend/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
coverage/**
dist/*
src/assets/images/*
src/assets/stylesheets/*
node_modules/*
node_modules*/*
vendor/*
Expand Down
25 changes: 16 additions & 9 deletions superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const restrictedImportsRules = {
message: 'Lodash Memoize is unsafe! Please use memoize-one instead',
},
'no-testing-library-react': {
name: '@testing-library/react',
name: '@superset-ui/core/spec',
message: 'Please use spec/helpers/testing-library instead',
},
'no-testing-library-react-dom-utils': {
Expand All @@ -63,10 +63,6 @@ const restrictedImportsRules = {
name: 'antd',
message: 'Please import Ant components from the index of src/components',
},
'no-antd-v5': {
name: 'antd-v5',
message: 'Please import Ant v5 components from the index of src/components',
},
'no-superset-theme': {
name: '@superset-ui/core',
importNames: ['supersetTheme'],
Expand Down Expand Up @@ -101,6 +97,15 @@ module.exports = {
// resolve modules from `/superset_frontend/node_modules` and `/superset_frontend`
moduleDirectory: ['node_modules', '.'],
},
typescript: {
alwaysTryTypes: true,
project: [
'./tsconfig.json',
'./packages/superset-ui-core/tsconfig.json',
'./packages/superset-ui-chart-controls/',
'./plugins/*/tsconfig.json',
],
},
},
// only allow import from top level of module
'import/core-modules': importCoreModules,
Expand Down Expand Up @@ -295,9 +300,9 @@ module.exports = {
'error',
{
paths: Object.values(restrictedImportsRules).filter(
r => r.name !== 'antd-v5',
r => r.name !== 'antd',
),
patterns: ['antd/*'],
patterns: [],
},
],
},
Expand Down Expand Up @@ -330,7 +335,9 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true },
{
devDependencies: true,
},
],
'no-only-tests/no-only-tests': 'error',
'max-classes-per-file': 0,
Expand Down Expand Up @@ -373,7 +380,7 @@ module.exports = {
'fixtures.*',
'cypress-base/cypress/**/*',
'Stories.tsx',
'packages/superset-ui-core/src/style/index.tsx',
'packages/superset-ui-core/src/theme/index.tsx',
],
rules: {
'theme-colors/no-literal-colors': 0,
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
stories: [
'../src/@(components|common|filters|explore|views|dashboard|features)/**/*.stories.@(tsx|jsx)',
'../packages/superset-ui-demo/storybook/stories/**/*.*.@(tsx|jsx)',
'../packages/superset-ui-core/src/components/**/*.stories.@(tsx|jsx)',
],

addons: [
Expand Down
68 changes: 56 additions & 12 deletions superset-frontend/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,75 @@
* under the License.
*/
import { withJsx } from '@mihkeleidast/storybook-addon-source';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { AntdThemeProvider } from '../src/components/AntdThemeProvider';
import { themeObject, css, exampleThemes } from '@superset-ui/core';
import { combineReducers, createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import reducerIndex from 'spec/helpers/reducerIndex';
import { GlobalStyles } from '../src/GlobalStyles';
import { Global } from '@emotion/react';
import { App, Layout, Space, Content } from 'antd';

import 'src/theme.ts';
import './storybook.css';

export const GlobalStylesOverrides = () => (
<Global
styles={css`
html,
body,
#storybook-root {
margin: 0 !important;
padding: 0 !important;
min-height: 100vh !important;
}

.ant-app {
min-height: 100vh !important;
}
`}
/>
);

const store = createStore(
combineReducers(reducerIndex),
{},
compose(applyMiddleware(thunk)),
);

const themeDecorator = Story => (
<ThemeProvider theme={supersetTheme}>
<AntdThemeProvider>
<GlobalStyles />
<Story />
</AntdThemeProvider>
</ThemeProvider>
);
export const globalTypes = {
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'superset',
toolbar: {
icon: 'paintbrush',
items: Object.keys(exampleThemes),
},
},
};

const themeDecorator = (Story, context) => {
const themeKey = context.globals.theme || 'superset';
themeObject.setConfig(exampleThemes[themeKey]);

return (
<themeObject.SupersetThemeProvider>
<App>
<GlobalStylesOverrides />
<Layout
style={{
minHeight: '100vh',
width: '100%',
padding: 24,
backgroundColor: themeObject.theme.colorBgBase,
}}
>
<Story {...context} />
</Layout>
</App>
</themeObject.SupersetThemeProvider>
);
};

const providerDecorator = Story => (
<Provider store={store}>
Expand Down Expand Up @@ -81,5 +125,5 @@ export const parameters = {
],
},
},
controls: { expanded: true, sort: 'alpha' },
controls: { expanded: true, sort: 'alpha', disableSaveFromUI: true },
};
1 change: 0 additions & 1 deletion superset-frontend/.storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
body {
background: transparent;
}
Loading
Loading