Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: massive theming-related PR #31590

Draft
wants to merge 52 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2167c9c
feat: messing with the theme
mistercrunch Dec 20, 2024
db0c8ff
tweaking headers
mistercrunch Dec 28, 2024
474f878
fixup submenues
mistercrunch Dec 28, 2024
b693ae5
fixing font-size
mistercrunch Dec 28, 2024
0accf06
more tweaks
mistercrunch Dec 28, 2024
4e2bdea
fix empty states svg for theming
mistercrunch Dec 28, 2024
eeadc31
fix svg
mistercrunch Dec 29, 2024
e1086ba
huge refactor
mistercrunch Dec 30, 2024
a298da0
fixing input box in explore
mistercrunch Dec 30, 2024
d988b2b
minimal
mistercrunch Dec 30, 2024
47dc2a3
license headers
mistercrunch Dec 30, 2024
f106aed
linting
mistercrunch Dec 30, 2024
4033436
linted it all
mistercrunch Dec 30, 2024
be206c0
one more license
mistercrunch Dec 30, 2024
c5971ac
linting
mistercrunch Dec 30, 2024
0b42a59
fixup svg
mistercrunch Dec 30, 2024
f82994e
fix one test
mistercrunch Dec 30, 2024
caed939
fix lerna build
mistercrunch Dec 30, 2024
64a4ed9
lint
mistercrunch Dec 30, 2024
321d2b9
fixing unit tests
mistercrunch Dec 30, 2024
347f382
test
mistercrunch Dec 30, 2024
a86e292
test
mistercrunch Dec 30, 2024
e772d95
fixing tests
mistercrunch Dec 30, 2024
340daa1
type fixes
mistercrunch Dec 30, 2024
d248924
fixing
mistercrunch Dec 31, 2024
0586223
tweak
mistercrunch Dec 31, 2024
675dbff
add unit tests for Theme
mistercrunch Dec 31, 2024
685de92
100% coverage
mistercrunch Jan 1, 2025
7d55007
working
mistercrunch Jan 1, 2025
382ca83
removing a test
mistercrunch Jan 2, 2025
8384bf3
progress
mistercrunch Jan 2, 2025
fce5d38
Theme improvements
mistercrunch Jan 2, 2025
f9301de
fixed types
mistercrunch Jan 2, 2025
659d1a9
manage/update state
mistercrunch Jan 2, 2025
b9289d2
manage/update state
mistercrunch Jan 2, 2025
9902d85
type and lint
mistercrunch Jan 2, 2025
885dc93
one lint + license
mistercrunch Jan 2, 2025
35b714b
fixing some tests
mistercrunch Jan 3, 2025
5ba9396
fixing more tests
mistercrunch Jan 3, 2025
13fccc6
fixing more tests
mistercrunch Jan 3, 2025
49ddd6b
fixing more tests
mistercrunch Jan 3, 2025
004b12a
last test
mistercrunch Jan 3, 2025
c8f0c3b
add feature flag
mistercrunch Jan 3, 2025
887781e
import expect from chai
mistercrunch Jan 4, 2025
79a479c
skip eslint when pre-commit
mistercrunch Jan 5, 2025
0f0df94
fix eslint
mistercrunch Jan 5, 2025
99a138a
progress
mistercrunch Jan 5, 2025
a15b8c5
commit
mistercrunch Jan 7, 2025
74d92d2
rebased
mistercrunch Jan 9, 2025
6fefacd
add chai
mistercrunch Jan 9, 2025
3777355
fixing
mistercrunch Jan 9, 2025
1652452
fix npm
mistercrunch Jan 9, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
- name: pre-commit
run: |
set +e # Don't exit immediately on failure
# Skip eslint as it requires `npm ci` and is executed in another job
export SKIP=eslint
pre-commit run --all-files
if [ $? -ne 0 ] || ! git diff --quiet --exit-code; then
echo "❌ Pre-commit check failed."
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ repos:
- id: trailing-whitespace
exclude: ^.*\.(snap)
args: ["--markdown-linebreak-ext=md"]
- repo: local
hooks:
- id: eslint
name: eslint
entry: bash -c 'cd superset-frontend && npm run eslint -- $(echo "$@" | sed "s|superset-frontend/||g")'
language: system
pass_filenames: true
files: \.(js|jsx|ts|tsx)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8 # Use the sha or tag you want to point at
hooks:
Expand Down
3 changes: 2 additions & 1 deletion superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ module.exports = {
'*.test.tsx',
'*.test.js',
'*.test.jsx',
'*src/utils/testUtils*',
'*.stories.tsx',
'*.stories.jsx',
'fixtures.*',
Expand Down Expand Up @@ -274,7 +275,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
2 changes: 2 additions & 0 deletions superset-frontend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ CHANGELOG/
*-topo.json
storybook-static/
*.snap
**/*.less
**/*.less.hbs

/.nx/workspace-data
16 changes: 8 additions & 8 deletions superset-frontend/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 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 } from '@superset-ui/core';
import { theme } from 'src/preamble';
import { combineReducers, createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
Expand All @@ -34,14 +34,14 @@ const store = createStore(
compose(applyMiddleware(thunk)),
);

const themeDecorator = Story => (
<ThemeProvider theme={supersetTheme}>
<AntdThemeProvider>
const themeDecorator = Story => {
return (
<themeObject.SupersetThemeProvider>
<GlobalStyles />
<Story />
</AntdThemeProvider>
</ThemeProvider>
);
</themeObject.SupersetThemeProvider>
);
};

const providerDecorator = Story => (
<Provider store={store}>
Expand Down
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;
}
1 change: 1 addition & 0 deletions superset-frontend/cypress-base/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import '@cypress/code-coverage/support';
import '@applitools/eyes-cypress/commands';
import failOnConsoleError from 'cypress-fail-on-console-error';
import { expect } from 'chai';

/* eslint-disable @typescript-eslint/no-explicit-any */

Expand Down
103 changes: 67 additions & 36 deletions superset-frontend/cypress-base/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions superset-frontend/cypress-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
"@cypress/code-coverage": "^3.10.4",
"@superset-ui/core": "^2.1.0",
"brace": "^0.11.1",
"chai": "^4.5.0",
"cy-verify-downloads": "^0.2.5",
"cypress-fail-on-console-error": "^4.0.3",
"nanoid": "^5.0.9",
"querystringify": "^2.2.0",
"react-dom": "^16.13.0",
"rison": "^0.1.1",
"nanoid": "^5.0.9"
"rison": "^0.1.1"
},
"devDependencies": {
"@types/querystringify": "^2.0.0",
Expand Down
41 changes: 41 additions & 0 deletions superset-frontend/lerna-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
0 silly argv {
0 silly argv _: [ 'exec' ],
0 silly argv stream: true,
0 silly argv concurrency: 10,
0 silly argv scope: '@superset-ui/!(demo|generator-superset)\n',
0 silly argv args: [
0 silly argv '', '', '', '',
0 silly argv '', '', ''
0 silly argv ],
0 silly argv '--': [
0 silly argv 'babel',
0 silly argv '--config-file=../../babel.config.js',
0 silly argv 'src',
0 silly argv '--extensions',
0 silly argv '".ts,.tsx,.js,.jsx"',
0 silly argv '--copy-files',
0 silly argv '--out-dir',
0 silly argv 'lib'
0 silly argv ],
0 silly argv lernaVersion: '8.1.8',
0 silly argv '$0': 'node_modules/.bin/lerna',
0 silly argv cmd: ''
0 silly argv }
1 notice cli v8.1.8
2 verbose packageConfigs Explicit "packages" configuration found in lerna.json. Resolving packages using the configured glob(s): ["packages/*","plugins/*","src/setup/*"]
3 verbose rootPath /Users/max/code/superset/superset-frontend
4 error Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
4 error MultipleProjectsWithSameNameError: The following projects are defined in multiple locations:
4 error - storybook-static:
4 error - packages/superset-ui-demo/storybook-static
4 error - storybook-static
4 error
4 error To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.
4 error at validateAndNormalizeProjectRootMap (/Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:436:15)
4 error at mergeCreateNodesResults (/Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:322:9)
4 error at /Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:267:85
4 error at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
4 error at async buildProjectGraphAndSourceMapsWithoutDaemon (/Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/project-graph.js:80:31)
4 error at async createProjectGraphAndSourceMapsAsync (/Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/project-graph.js:208:25)
4 error at async createProjectGraphAsync (/Users/max/code/superset/superset-frontend/node_modules/nx/src/project-graph/project-graph.js:198:39)
4 error at async detectProjects (/Users/max/code/superset/superset-frontend/node_modules/lerna/dist/index.js:2999:25)
Loading
Loading