-
Notifications
You must be signed in to change notification settings - Fork 14k
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
refactor: merge/upgrade superset-ui packages #10790
Conversation
2165a08
to
ab12b53
Compare
@@ -22,6 +22,8 @@ | |||
"prettier-check": "prettier --check '{src,stylesheets}/**/*.{css,less,sass,scss}'", | |||
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx . && npm run clean-css && npm run type", | |||
"clean-css": "prettier --write '{src,stylesheets}/**/*.{css,less,sass,scss}'", | |||
"format": "prettier --write './{src,spec,stylesheets,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'", | |||
"prettier": "npm run format", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a shortcut command to format files with Prettier, to be consistent with superset-ui
@@ -118,6 +108,7 @@ | |||
"dnd-core": "^2.6.0", | |||
"dom-to-image": "^2.6.0", | |||
"geolib": "^2.0.24", | |||
"global-box": "^1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new peerDependency
from the updated encodable
, which is a dependency of preset-chart-xy
.
@@ -149,6 +140,7 @@ | |||
"react-hot-loader": "^4.12.20", | |||
"react-json-tree": "^0.11.2", | |||
"react-jsonschema-form": "^1.2.0", | |||
"react-loadable": "^5.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously a dependency of @superset-ui/chart
, adding it here because it was moved to peerDependencies
of @superset-ui/core
.
c96638c
to
9127442
Compare
Codecov Report
@@ Coverage Diff @@
## master #10790 +/- ##
==========================================
- Coverage 61.30% 61.27% -0.03%
==========================================
Files 802 802
Lines 37870 37845 -25
Branches 3561 3561
==========================================
- Hits 23215 23190 -25
Misses 14469 14469
Partials 186 186
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
9127442
to
389d75a
Compare
import airbnb from '@superset-ui/core/esm/color/colorSchemes/categorical/airbnb'; | ||
import categoricalD3 from '@superset-ui/core/esm/color/colorSchemes/categorical/d3'; | ||
import echarts from '@superset-ui/core/esm/color/colorSchemes/categorical/echarts'; | ||
import google from '@superset-ui/core/esm/color/colorSchemes/categorical/google'; | ||
import lyft from '@superset-ui/core/esm/color/colorSchemes/categorical/lyft'; | ||
import preset from '@superset-ui/core/esm/color/colorSchemes/categorical/preset'; | ||
import sequentialCommon from '@superset-ui/core/esm/color/colorSchemes/sequential/common'; | ||
import sequentialD3 from '@superset-ui/core/esm/color/colorSchemes/sequential/d3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that this behavior is being changed, but is there some reason these have to be pulled in from /esm/
and aren't exported like the other components in superset-ui/core
? It feels like these should be exported as categoricalColorSchemes.*
and sequentialColorSchemes.*
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like doing additional refactor in this already humongous PR. For this specific case, I almost feel these colors should probably be move out of the @superset-ui/core
package and placed under incubator-superset
instead so that adding a new color wouldn't require publishing the package and custom Superset installations can also opt out colors more thoroughly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, moving these to incubator-superset
probably makes more sense. Also not recommending changing this now, this was mostly a question and proposal for future changes post merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could also add the export from index and get rid of deep import later.
Agree not doing it in this humongous PR
@@ -43,7 +43,7 @@ describe('Visualization > Big Number with Trendline', () => { | |||
cy.visitChartByParams(JSON.stringify(formData)); | |||
cy.verifySliceSuccess({ | |||
waitAlias: '@getJson', | |||
chartSelector: '.big_number', | |||
chartSelector: '.superset-legacy-chart-big-number', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SupersetChart
may render before the chart content is rendered, so Cypress will find an empty div.big_number
(the wrapper of the actual chart), breaking the test.
@@ -30,12 +30,12 @@ describe('AdhocFilters', () => { | |||
|
|||
cy.get('[data-test=adhoc_filters]').within(() => { | |||
cy.get('.Select__control').click(); | |||
cy.get('input[type=text]').type('name{enter}'); | |||
cy.get('input[type=text]').focus().type('name{enter}'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing an input is covered by "Choose a metric..." placeholder
error.
a3ce1e4
to
b6bddf8
Compare
b6bddf8
to
b963251
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though an unrelated python test was failing for no reason.
CI is green now. Is it just flaky test?
I think so |
* refactor: merge/upgrade superset-ui packages * Fix flaky big number test * Fix Flaky AdhocFilters test
SUMMARY
Merge core
@superset-ui/*
packages into one single package. For details, see: apache-superset/superset-ui#768This PR does two things and two things only:
@superset-ui/core
,@superset-ui/chart-controls
and all the viz plugins.Any changes not related to this two should be called out. Everything should work exactly like before.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
CI + Manual verification on major visualization related pages.
ADDITIONAL INFORMATION