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

fix: columns are lost when dashboard to explore #20699

Merged
merged 7 commits into from
Jul 14, 2022

Conversation

zhaoyongjie
Copy link
Member

SUMMARY

Currently, columns of datasource are lost when switching from Dashboard to the Explore page.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After

dashboard.to.explore.mov

Before

dashboard.to.explore.before.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@@ -55,8 +55,7 @@ export const hydrateExplore =
if (dashboardId) {
initialFormData.dashboardId = dashboardId;
}
const initialDatasource =
datasources?.[initialFormData.datasource] ?? dataset;
const initialDatasource = dataset;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallbackExploreInitialData handle this case. There should be some refactoring going on here, so keep this variable for now.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix

@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #20699 (52ce1bf) into master (558201c) will decrease coverage by 0.00%.
The diff coverage is 7.14%.

@@            Coverage Diff             @@
##           master   #20699      +/-   ##
==========================================
- Coverage   66.84%   66.83%   -0.01%     
==========================================
  Files        1750     1750              
  Lines       65890    65894       +4     
  Branches     7016     7017       +1     
==========================================
  Hits        44041    44041              
- Misses      20063    20067       +4     
  Partials     1786     1786              
Flag Coverage Δ
javascript 51.94% <7.14%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/explore/ExplorePage.tsx 0.00% <0.00%> (ø)
...set-frontend/src/explore/actions/hydrateExplore.ts 61.53% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 558201c...52ce1bf. Read the comment docs.

@kgabryje
Copy link
Member

Pushed a fix - we shouldn't check if slice is null. It is expected that slice is null when user creates a new chart

@@ -28,7 +28,7 @@ import { HEALTH_POP_FORM_DATA_DEFAULTS } from './visualizations/shared.helper';
const apiURL = (endpoint: string, queryObject: Record<string, unknown>) =>
`${endpoint}?q=${rison.encode(queryObject)}`;

describe('Test explore links', () => {
describe.skip('Test explore links', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temporarily skip this test, will reenable after the PR.

@zhaoyongjie zhaoyongjie merged commit 6b0bb80 into apache:master Jul 14, 2022
@codyml codyml mentioned this pull request Jul 29, 2022
9 tasks
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants