-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: use FeatureFlags in @superset-ui/core #13679
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13679 +/- ##
==========================================
- Coverage 77.10% 73.08% -4.02%
==========================================
Files 921 611 -310
Lines 46745 21695 -25050
Branches 5733 5732 -1
==========================================
- Hits 36043 15856 -20187
+ Misses 10567 5704 -4863
Partials 135 135
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
this is a bit inconvenient, but necessary because we moved featureflags into superset-ui and we don't want to change in two places everytime. stamping with one comment
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
declare global { | ||
interface Window { | ||
$: any; | ||
jQuery: any; | ||
} | ||
} |
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.
is this related to the feature flag change? i didn't see how
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.
It's not, but these globals used to be declared in the featureFlags.ts
file. I moved them closer to where they are actually used.
SUMMARY
Feature flag typing has been added to
@superset-ui/core
, since there is now two copies of the same typing, sometimes it leads to TS errors whennpm link
is used or when in Jest.This change means all future feature flags used in the front-end have to be added to
@superset-ui
and go through the npm publish process. This is inconvenient but probably necessary to ensure correctness and consistency. Considering we are mergingsuperset-ui
to this repo soon, this should not be that much of a problem.cc @graceguo-supercat @villebro
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
npm link ../superset-ui/packages/superset-ui-core
npm run type
master
:This PR should fix it.
ADDITIONAL INFORMATION