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

feat: add drag and drop column rearrangement for table viz #19381

Merged
merged 5 commits into from
May 25, 2022

Conversation

stevetracvc
Copy link
Contributor

@stevetracvc stevetracvc commented Mar 26, 2022

Bringing this over from superset-ui (some discussion was on the old PR)
apache-superset/superset-ui#1423

SUMMARY

Add the ability for the end user to drag and drop columns for a table visualization

Table designer can enable column rearrangement in the config options when building the table. Then, user can drag columns around

These are volatile changes, so when the browser is refreshed, the column order goes back to default. Demo is in the chart edit page, which is just for simple demonstration purposes. This is intended for the end user to be allowed to rearrange the columns.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

OFF
dnd_off

ON
dnd_on

ADDITIONAL INFORMATION

@pull-request-size pull-request-size bot added size/M and removed size/L labels Mar 26, 2022
@codecov
Copy link

codecov bot commented Mar 26, 2022

Codecov Report

Merging #19381 (679dde8) into master (2b53578) will decrease coverage by 0.06%.
The diff coverage is 20.83%.

@@            Coverage Diff             @@
##           master   #19381      +/-   ##
==========================================
- Coverage   66.67%   66.61%   -0.07%     
==========================================
  Files        1676     1678       +2     
  Lines       64715    64814      +99     
  Branches     6506     6522      +16     
==========================================
+ Hits        43151    43173      +22     
- Misses      19878    19949      +71     
- Partials     1686     1692       +6     
Flag Coverage Δ
javascript 51.23% <20.83%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
...ugin-chart-table/src/DataTable/hooks/useSticky.tsx 4.25% <0.00%> (ø)
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 16.66% <ø> (ø)
...d/plugins/plugin-chart-table/src/transformProps.ts 63.63% <ø> (ø)
...ins/plugin-chart-table/src/DataTable/DataTable.tsx 35.39% <17.64%> (-3.15%) ⬇️
...tend/plugins/plugin-chart-table/src/TableChart.tsx 38.35% <33.33%> (-0.22%) ⬇️
.../components/Header/HeaderActionsDropdown/index.jsx 67.79% <0.00%> (-3.64%) ⬇️
...ontend/src/dashboard/components/dnd/DragHandle.tsx 83.33% <0.00%> (-2.39%) ⬇️
...tend/src/components/Datasource/DatasourceModal.tsx 69.04% <0.00%> (-1.69%) ⬇️
...d/src/explore/components/PropertiesModal/index.tsx 68.85% <0.00%> (-1.15%) ⬇️
...atasourcePanel/DatasourcePanelDragOption/index.tsx 88.88% <0.00%> (-1.12%) ⬇️
... and 26 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 2b53578...679dde8. Read the comment docs.

@stevetracvc
Copy link
Contributor Author

@rusackas @junlincc I finally got around to merging in the monorepo, so I'm reviving this PR :)

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

This looks great! I have only a couple of nits.

@stevetracvc
Copy link
Contributor Author

@ktmud let me know if there's anything else you think should be changed!

@stevetracvc
Copy link
Contributor Author

@ktmud same with this one. Anything else you think I need to do for this one?

@ktmud ktmud merged commit 7e9b85f into apache:master May 25, 2022
@ktmud
Copy link
Member

ktmud commented May 25, 2022

@ktmud same with this one. Anything else you think I need to do for this one?

This looks good. Thanks for your contribution! And sorry for missing your message earlier.

@stevetracvc
Copy link
Contributor Author

Awesome, no prob, I'm glad you liked it!

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drag and Drop user-reorganizable columns in the Table Viz
3 participants