-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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: Removes the deprecated GENERIC_CHART_AXES feature flag #26372
refactor: Removes the deprecated GENERIC_CHART_AXES feature flag #26372
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #26372 +/- ##
==========================================
+ Coverage 67.29% 69.65% +2.35%
==========================================
Files 1895 1895
Lines 74249 74179 -70
Branches 8257 8205 -52
==========================================
+ Hits 49968 51671 +1703
+ Misses 22206 20461 -1745
+ Partials 2075 2047 -28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
We have some small improvements/fixes that we are planning to work on to help unblock some of our users from being able to enable the GENERIC_CHART_AXES flag. It would be appreciated if we could hold on merging this PR near the end of the breaking change window for Superset 4.0 so that we can get our changes completed first :) Thanks!! |
Cypress Tests LGTM.... I can hit the code owner approval button, but might like to have a more holistic review/approval first. |
e64e0f3
to
3b35c65
Compare
hey @michael-s-molina one concern with the Reported in #26474. Existing charts will still work, but users are no longer able to change the time grain configuration if needed. Also, new legacy charts can't be properly created without this configuration. Given we're not yet automatically migrating all legacy charts to ECharts, the full removal of the FF would introduce these issues to Organizations still using legacy charts. I suspect we can fix this by setting the Unsure if we would want to fix the bug first, and then make sure it's working properly before we move forward with this removal PR, or if you would actually prefer to include the fix here. I'm also further testing that branch to confirm if additional changes would be needed. Let me know your thoughts! Happy to submit a PR from that branch. |
Hi @Vitor-Avila. You're correct, we should solve this in a specific PR and merge it before merging this PR. This problem was reported before and fixed for each chart that does not correctly handle both feature flag states. Check #26439 and #23865 for more context. |
I suggest we introduce two new shared time sections for legacy charts:
Essentially these would be the same as |
@villebro @Vitor-Avila Can any of you open a PR to fix this problem? Maybe we can even ask help from @sivasathyaseeelan. I have many things on my plate right now 😢 |
I feel like @villebro's suggestion seems more granular and scalable, but I'm still ramping up so I might not have the knowledge to implement it. I thought this was mostly related with how we're checking if |
@Vitor-Avila this should be a fairly straight forward change, and I can support you if you wish. But if you prefer I can open a PR and tag you for a review. |
@michael-s-molina I would love to help you if you prefer |
hey @villebro I was checking both the line and bar charts from nvd3 (the charts I reproduced the missing time grain issue), and I believe they both use the export const legacyTimeseriesTime: ControlPanelSectionConfig = {
...baseTimeSection,
controlSetRows: [
['granularity'],
['granularity_sqla'],
['time_grain_sqla'],
['time_range'],
],
}; I suspect the issue here is that the visibility settings for const time_grain_sqla: SharedControlConfig<'SelectControl'> = {
type: 'SelectControl',
label: TIME_FILTER_LABELS.time_grain_sqla,
...
visibility: ({ controls }) => {
if (!hasGenericChartAxes) {
return true;
}
const xAxis = controls?.x_axis;
const xAxisValue = xAxis?.value;
if (isAdhocColumn(xAxisValue)) {
return true;
}
if (isPhysicalColumn(xAxisValue)) {
return !!(xAxis?.options ?? []).find(
(col: ColumnMeta) => col?.column_name === xAxisValue,
)?.is_dttm;
}
return false;
},
}; Is your suggestion to create these two new shared time sections so that legacy nvd3 charts also support X-Axis (categorical) axes? We can also sync tomorrow via Slack. |
name: 'time_grain_sqla', | ||
config: { | ||
...sharedControls.time_grain_sqla, | ||
visibility: ({ controls }) => { |
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 related to this PR. There are bunch of repeated logics between pivot table, chart table, and Box Plot that we could probably centralize at some point
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.
True. I also noticed many repeated code between ECharts plugins. I'm delaying removing this repetition until after the migrations because I think we'll have a better overview of the common patterns.
@@ -401,7 +401,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) { | |||
ref={labelRef} | |||
/> | |||
</Tooltip> | |||
{/* the zIndex value is from trying so that the Modal doesn't overlay the AdhocFilter when GENERIC_CHART_AXES is enabled */} | |||
{/* the zIndex value is from trying so that the Modal doesn't overlay the AdhocFilter */} |
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.
Unrelated: Not sure I get the meaning of the sentence in this comment
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.
@geido The z-index value comes from trying, I'm not sure what's value is an appreciate value when I made this function.
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 think the developer meant that the z-index value was set, after multiple tentative values, to make sure the modal doesn't overlay the filter.
Agree it's confusing 🤷🏼♂️
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.
The problem here is that we don't have a z-index registry which would automatically resolve this type of issue. Maybe we'll have one some day.
3b35c65
to
e04470c
Compare
e04470c
to
6009828
Compare
@mistercrunch It seems the CI step called Label Migration PR is failing. Could you take a look? |
/testenv up |
@michael-s-molina Ephemeral environment spinning up at http://35.89.141.221:8080. Credentials are |
6009828
to
d355f1c
Compare
d355f1c
to
bdd6843
Compare
Ephemeral environment shutdown and build artifacts deleted. |
Woohoo!!!! |
SUMMARY
As part of the 4.0 approved initiatives, this PR removes the deprecated
GENERIC_CHART_AXES
feature flag.The previous value of the feature flag was
True
and now the feature is permanently enabled.TESTING INSTRUCTIONS
CI should be sufficient for merging this PR. We'll do a complete testing of 4.0 after all approved proposals are merged.
ADDITIONAL INFORMATION