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(chart): ensure samples data is displayed #16900

Merged
merged 6 commits into from
Nov 12, 2021

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Sep 29, 2021

SUMMARY

This pr fixes an issue where the view samples tab does not show the sample data. This problem was seen because the column names weren't updated for the samples tab since the old legacy endpoint does not return columns.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after
https://user-images.githubusercontent.com/17326228/135015945-ba291b18-3526-4d94-866f-9b980af24f3d.mov

TESTING INSTRUCTIONS

Open up charts that use both legacy and new /chart enpoints and ensure that the VIEW SAMPLES show up in the datatables pane.

ADDITIONAL INFORMATION

@pkdotson pkdotson marked this pull request as ready for review November 5, 2021 22:27
@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #16900 (e7ea74a) into master (1fbce88) will decrease coverage by 0.12%.
The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16900      +/-   ##
==========================================
- Coverage   77.13%   77.01%   -0.13%     
==========================================
  Files        1036     1038       +2     
  Lines       55729    56001     +272     
  Branches     7627     7742     +115     
==========================================
+ Hits        42989    43131     +142     
- Misses      12484    12612     +128     
- Partials      256      258       +2     
Flag Coverage Δ
javascript 71.22% <77.27%> (-0.20%) ⬇️

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

Impacted Files Coverage Δ
.../src/explore/components/DataTableControl/index.tsx 98.21% <ø> (ø)
...nd/src/explore/components/DataTablesPane/index.tsx 85.58% <77.27%> (-0.13%) ⬇️
...rset-frontend/src/components/DeleteModal/index.tsx 92.00% <0.00%> (-8.00%) ⬇️
...hboard/components/nativeFilters/FilterBar/state.ts 82.81% <0.00%> (-4.69%) ⬇️
...ols/FilterControl/AdhocFilterEditPopover/index.jsx 66.10% <0.00%> (-3.35%) ⬇️
superset-frontend/src/chart/Chart.jsx 40.29% <0.00%> (-3.04%) ⬇️
...frontend/src/components/TimezoneSelector/index.tsx 95.45% <0.00%> (-2.28%) ⬇️
...tend/src/common/hooks/apiResources/apiResources.ts 92.50% <0.00%> (-2.24%) ⬇️
.../src/dashboard/components/gridComponents/Chart.jsx 78.37% <0.00%> (-2.00%) ⬇️
superset-frontend/src/explore/constants.ts 95.74% <0.00%> (-1.63%) ⬇️
... and 31 more

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 1fbce88...e7ea74a. Read the comment docs.

@kgabryje
Copy link
Member

kgabryje commented Nov 8, 2021

/testenv up

@kgabryje
Copy link
Member

kgabryje commented Nov 8, 2021

Can we add some unit tests?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2021

@kgabryje Ephemeral environment spinning up at http://52.12.82.82:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM
Screen Shot 2021-11-08 at 2 24 10 PM

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.

Looks nice! I left a comment with a suggestion how to simplify the logic of setting column names

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

@pkdotson pkdotson merged commit e6ff25c into apache:master Nov 12, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
* initial fix

* use data keys for cols

* add e2e test

* remove code

* trim logic
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 preset-io size/L 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explore][sample table] Sample table show ' no data' when there are rows retrieved
4 participants