You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/26 13:52:43 UTC

[GitHub] [superset] stevetracvc opened a new pull request #19381: feat: add drag and drop column rearrangement for table viz

stevetracvc opened a new pull request #19381:
URL: https://github.com/apache/superset/pull/19381


   Bringing this over from superset-ui
   https://github.com/apache-superset/superset-ui/pull/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](https://user-images.githubusercontent.com/70416691/160242444-fae73b3d-315c-4efd-b225-21f80031e064.gif)
   
   **ON**
   ![dnd_on](https://user-images.githubusercontent.com/70416691/160242449-3666a274-bf06-455c-8908-751d7510f5fb.gif)
   
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: #19380 
   - [x] Fixes #19380 
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079710077


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19381](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9464aa7) into [master](https://codecov.io/gh/apache/superset/commit/2b53578ad7c3c330d76ccf7a5f30826c9efce960?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b53578) will **decrease** coverage by `0.01%`.
   > The diff coverage is `20.83%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19381      +/-   ##
   ==========================================
   - Coverage   66.67%   66.66%   -0.02%     
   ==========================================
     Files        1676     1676              
     Lines       64715    64750      +35     
     Branches     6506     6513       +7     
   ==========================================
   + Hits        43151    43165      +14     
   - Misses      19878    19895      +17     
   - Partials     1686     1690       +4     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.31% <20.83%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ugin-chart-table/src/DataTable/hooks/useSticky.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9ob29rcy91c2VTdGlja3kudHN4) | `4.25% <0.00%> (ø)` | |
   | [...nd/plugins/plugin-chart-table/src/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `16.66% <ø> (ø)` | |
   | [...d/plugins/plugin-chart-table/src/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL3RyYW5zZm9ybVByb3BzLnRz) | `63.63% <ø> (ø)` | |
   | [...ins/plugin-chart-table/src/DataTable/DataTable.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9EYXRhVGFibGUudHN4) | `35.39% <17.64%> (-3.15%)` | :arrow_down: |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.35% <33.33%> (-0.22%)` | :arrow_down: |
   | [...ontend/src/dashboard/components/dnd/DragHandle.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLnRzeA==) | `83.33% <0.00%> (-2.39%)` | :arrow_down: |
   | [...tend/src/components/Datasource/DatasourceModal.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRGF0YXNvdXJjZS9EYXRhc291cmNlTW9kYWwudHN4) | `69.04% <0.00%> (-1.69%)` | :arrow_down: |
   | [...d/src/explore/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwvaW5kZXgudHN4) | `68.85% <0.00%> (-1.15%)` | :arrow_down: |
   | [...atasourcePanel/DatasourcePanelDragOption/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvRGF0YXNvdXJjZVBhbmVsRHJhZ09wdGlvbi9pbmRleC50c3g=) | `88.88% <0.00%> (-1.12%)` | :arrow_down: |
   | [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `63.63% <0.00%> (-0.18%)` | :arrow_down: |
   | ... and [19 more](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b53578...9464aa7](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838545842



##########
File path: superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
##########
@@ -210,6 +218,33 @@ export default function DataTable<D extends object>({
 
   const shouldRenderFooter = columns.some(x => !!x.Footer);
 
+  let columnBeingDragged = -1;
+
+  const onDragStart = (e: React.DragEvent) => {
+    const el = e.target as HTMLTableCellElement;
+    columnBeingDragged = allColumns.findIndex(
+      col => col.id === el.dataset.columnName,
+    );
+    e.dataTransfer.setData('text/plain', `${columnBeingDragged}`);

Review comment:
       From what I remember, it's what allows the preview of the column header as you drag it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079710077


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19381](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (679dde8) into [master](https://codecov.io/gh/apache/superset/commit/2b53578ad7c3c330d76ccf7a5f30826c9efce960?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b53578) will **decrease** coverage by `0.06%`.
   > The diff coverage is `20.83%`.
   
   ```diff
   @@            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%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ugin-chart-table/src/DataTable/hooks/useSticky.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9ob29rcy91c2VTdGlja3kudHN4) | `4.25% <0.00%> (ø)` | |
   | [...nd/plugins/plugin-chart-table/src/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `16.66% <ø> (ø)` | |
   | [...d/plugins/plugin-chart-table/src/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL3RyYW5zZm9ybVByb3BzLnRz) | `63.63% <ø> (ø)` | |
   | [...ins/plugin-chart-table/src/DataTable/DataTable.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9EYXRhVGFibGUudHN4) | `35.39% <17.64%> (-3.15%)` | :arrow_down: |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.35% <33.33%> (-0.22%)` | :arrow_down: |
   | [.../components/Header/HeaderActionsDropdown/index.jsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9IZWFkZXJBY3Rpb25zRHJvcGRvd24vaW5kZXguanN4) | `67.79% <0.00%> (-3.64%)` | :arrow_down: |
   | [...ontend/src/dashboard/components/dnd/DragHandle.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLnRzeA==) | `83.33% <0.00%> (-2.39%)` | :arrow_down: |
   | [...tend/src/components/Datasource/DatasourceModal.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRGF0YXNvdXJjZS9EYXRhc291cmNlTW9kYWwudHN4) | `69.04% <0.00%> (-1.69%)` | :arrow_down: |
   | [...d/src/explore/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwvaW5kZXgudHN4) | `68.85% <0.00%> (-1.15%)` | :arrow_down: |
   | [...atasourcePanel/DatasourcePanelDragOption/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvRGF0YXNvdXJjZVBhbmVsRHJhZ09wdGlvbi9pbmRleC50c3g=) | `88.88% <0.00%> (-1.12%)` | :arrow_down: |
   | ... and [26 more](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b53578...679dde8](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079710077


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19381](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (456c6fc) into [master](https://codecov.io/gh/apache/superset/commit/2b53578ad7c3c330d76ccf7a5f30826c9efce960?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b53578) will **decrease** coverage by `0.01%`.
   > The diff coverage is `20.83%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19381      +/-   ##
   ==========================================
   - Coverage   66.67%   66.66%   -0.02%     
   ==========================================
     Files        1676     1676              
     Lines       64715    64738      +23     
     Branches     6506     6509       +3     
   ==========================================
   + Hits        43151    43156       +5     
   - Misses      19878    19895      +17     
   - Partials     1686     1687       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.30% <20.83%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ugin-chart-table/src/DataTable/hooks/useSticky.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9ob29rcy91c2VTdGlja3kudHN4) | `4.25% <0.00%> (ø)` | |
   | [...nd/plugins/plugin-chart-table/src/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `16.66% <ø> (ø)` | |
   | [...d/plugins/plugin-chart-table/src/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL3RyYW5zZm9ybVByb3BzLnRz) | `63.63% <ø> (ø)` | |
   | [...ins/plugin-chart-table/src/DataTable/DataTable.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9EYXRhVGFibGUudHN4) | `35.39% <17.64%> (-3.15%)` | :arrow_down: |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.35% <33.33%> (-0.22%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `32.90% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b53578...456c6fc](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079718400


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838545842



##########
File path: superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
##########
@@ -210,6 +218,33 @@ export default function DataTable<D extends object>({
 
   const shouldRenderFooter = columns.some(x => !!x.Footer);
 
+  let columnBeingDragged = -1;
+
+  const onDragStart = (e: React.DragEvent) => {
+    const el = e.target as HTMLTableCellElement;
+    columnBeingDragged = allColumns.findIndex(
+      col => col.id === el.dataset.columnName,
+    );
+    e.dataTransfer.setData('text/plain', `${columnBeingDragged}`);

Review comment:
       ~From what I remember, it's what allows the preview of the column header as you drag it~
   absolutely mandatory. I commented it out and dnd stops working. I went back and forth a few times just to be sure :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838545842



##########
File path: superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
##########
@@ -210,6 +218,33 @@ export default function DataTable<D extends object>({
 
   const shouldRenderFooter = columns.some(x => !!x.Footer);
 
+  let columnBeingDragged = -1;
+
+  const onDragStart = (e: React.DragEvent) => {
+    const el = e.target as HTMLTableCellElement;
+    columnBeingDragged = allColumns.findIndex(
+      col => col.id === el.dataset.columnName,
+    );
+    e.dataTransfer.setData('text/plain', `${columnBeingDragged}`);

Review comment:
       ~From what I remember, it's what allows the preview of the column header as you drag it~
   absolutely mandatory. I commented it out and dnd stops working.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079710077


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19381](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9464aa7) into [master](https://codecov.io/gh/apache/superset/commit/2b53578ad7c3c330d76ccf7a5f30826c9efce960?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b53578) will **decrease** coverage by `0.01%`.
   > The diff coverage is `20.83%`.
   
   > :exclamation: Current head 9464aa7 differs from pull request most recent head 679dde8. Consider uploading reports for the commit 679dde8 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19381      +/-   ##
   ==========================================
   - Coverage   66.67%   66.66%   -0.02%     
   ==========================================
     Files        1676     1676              
     Lines       64715    64750      +35     
     Branches     6506     6513       +7     
   ==========================================
   + Hits        43151    43165      +14     
   - Misses      19878    19895      +17     
   - Partials     1686     1690       +4     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.31% <20.83%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ugin-chart-table/src/DataTable/hooks/useSticky.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9ob29rcy91c2VTdGlja3kudHN4) | `4.25% <0.00%> (ø)` | |
   | [...nd/plugins/plugin-chart-table/src/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `16.66% <ø> (ø)` | |
   | [...d/plugins/plugin-chart-table/src/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL3RyYW5zZm9ybVByb3BzLnRz) | `63.63% <ø> (ø)` | |
   | [...ins/plugin-chart-table/src/DataTable/DataTable.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9EYXRhVGFibGUudHN4) | `35.39% <17.64%> (-3.15%)` | :arrow_down: |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.35% <33.33%> (-0.22%)` | :arrow_down: |
   | [...ontend/src/dashboard/components/dnd/DragHandle.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLnRzeA==) | `83.33% <0.00%> (-2.39%)` | :arrow_down: |
   | [...tend/src/components/Datasource/DatasourceModal.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRGF0YXNvdXJjZS9EYXRhc291cmNlTW9kYWwudHN4) | `69.04% <0.00%> (-1.69%)` | :arrow_down: |
   | [...d/src/explore/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwvaW5kZXgudHN4) | `68.85% <0.00%> (-1.15%)` | :arrow_down: |
   | [...atasourcePanel/DatasourcePanelDragOption/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvRGF0YXNvdXJjZVBhbmVsRHJhZ09wdGlvbi9pbmRleC50c3g=) | `88.88% <0.00%> (-1.12%)` | :arrow_down: |
   | [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `63.63% <0.00%> (-0.18%)` | :arrow_down: |
   | ... and [19 more](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b53578...679dde8](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838548170



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -66,6 +66,7 @@ function loadData(
     alignPn = false,
     showCellBars = true,
     includeSearch = true,
+    rearrangeColumns = false,

Review comment:
       OK, I'll go through and rename it everywhere :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ktmud commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838144990



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -66,6 +66,7 @@ function loadData(
     alignPn = false,
     showCellBars = true,
     includeSearch = true,
+    rearrangeColumns = false,

Review comment:
       ```suggestion
       allowRearrangeColumns = false,
   ```
   
   Let's make variable names more explicit.

##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -117,15 +119,17 @@ export const BigTable = ({ width, height }) => {
   const cols = number('Columns', 8, { range: true, min: 1, max: 20 });
   const pageLength = number('Page size', 50, { range: true, min: 0, max: 100 });
   const includeSearch = boolean('Include search', true);
-  const alignPn = boolean('Algin PosNeg', false);
+  const alignPn = boolean('Align PosNeg', false);

Review comment:
       💯 

##########
File path: superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
##########
@@ -445,6 +445,20 @@ const config: ControlPanelConfig = {
             },
           },
         ],
+        [
+          {
+            name: 'rearrange_columns',
+            config: {
+              type: 'CheckboxControl',
+              label: t('Allow columns to be rearranged'),
+              renderTrigger: true,
+              default: false,
+              description: t(
+                'Allow the end user to drag-and-drop the column headers to rearrange them.',

Review comment:
       ```suggestion
                   "Allow end user to drag-and-drop column headers to rearrange them. Note their changes won't persist for the next time they open the chart.",
   ```

##########
File path: superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
##########
@@ -210,6 +218,33 @@ export default function DataTable<D extends object>({
 
   const shouldRenderFooter = columns.some(x => !!x.Footer);
 
+  let columnBeingDragged = -1;
+
+  const onDragStart = (e: React.DragEvent) => {
+    const el = e.target as HTMLTableCellElement;
+    columnBeingDragged = allColumns.findIndex(
+      col => col.id === el.dataset.columnName,
+    );
+    e.dataTransfer.setData('text/plain', `${columnBeingDragged}`);

Review comment:
       I'm not familiar with react-table's DnD but is this dataTransfer required?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838922146



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -86,6 +87,7 @@ function loadData(
       page_length: pageLength,
       show_cell_bars: showCellBars,
       include_search: includeSearch,
+      rearrange_columns: rearrangeColumns,

Review comment:
       omg. I grepped the plugin folder for it :laughing: 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838668427



##########
File path: superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
##########
@@ -445,6 +445,20 @@ const config: ControlPanelConfig = {
             },
           },
         ],
+        [
+          {
+            name: 'rearrange_columns',
+            config: {
+              type: 'CheckboxControl',
+              label: t('Allow columns to be rearranged'),
+              renderTrigger: true,
+              default: false,
+              description: t(
+                'Allow the end user to drag-and-drop the column headers to rearrange them.',

Review comment:
       I included that, thanks!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19381:
URL: https://github.com/apache/superset/pull/19381#issuecomment-1079710077


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19381](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (456c6fc) into [master](https://codecov.io/gh/apache/superset/commit/2b53578ad7c3c330d76ccf7a5f30826c9efce960?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b53578) will **decrease** coverage by `0.01%`.
   > The diff coverage is `20.83%`.
   
   > :exclamation: Current head 456c6fc differs from pull request most recent head 9464aa7. Consider uploading reports for the commit 9464aa7 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19381      +/-   ##
   ==========================================
   - Coverage   66.67%   66.66%   -0.02%     
   ==========================================
     Files        1676     1676              
     Lines       64715    64738      +23     
     Branches     6506     6509       +3     
   ==========================================
   + Hits        43151    43156       +5     
   - Misses      19878    19895      +17     
   - Partials     1686     1687       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.30% <20.83%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ugin-chart-table/src/DataTable/hooks/useSticky.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9ob29rcy91c2VTdGlja3kudHN4) | `4.25% <0.00%> (ø)` | |
   | [...nd/plugins/plugin-chart-table/src/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL2NvbnRyb2xQYW5lbC50c3g=) | `16.66% <ø> (ø)` | |
   | [...d/plugins/plugin-chart-table/src/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL3RyYW5zZm9ybVByb3BzLnRz) | `63.63% <ø> (ø)` | |
   | [...ins/plugin-chart-table/src/DataTable/DataTable.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL0RhdGFUYWJsZS9EYXRhVGFibGUudHN4) | `35.39% <17.64%> (-3.15%)` | :arrow_down: |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.35% <33.33%> (-0.22%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `32.90% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b53578...9464aa7](https://codecov.io/gh/apache/superset/pull/19381?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838549436



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -117,15 +119,17 @@ export const BigTable = ({ width, height }) => {
   const cols = number('Columns', 8, { range: true, min: 1, max: 20 });
   const pageLength = number('Page size', 50, { range: true, min: 0, max: 100 });
   const includeSearch = boolean('Include search', true);
-  const alignPn = boolean('Algin PosNeg', false);
+  const alignPn = boolean('Align PosNeg', false);

Review comment:
       I've looked at that line like 20 times trying to figure out what had changed, and I finally see it. I think maybe it was a typo in an earlier version, and I dragged it back in on accident?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838549436



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -117,15 +119,17 @@ export const BigTable = ({ width, height }) => {
   const cols = number('Columns', 8, { range: true, min: 1, max: 20 });
   const pageLength = number('Page size', 50, { range: true, min: 0, max: 100 });
   const includeSearch = boolean('Include search', true);
-  const alignPn = boolean('Algin PosNeg', false);
+  const alignPn = boolean('Align PosNeg', false);

Review comment:
       I've looked at that line like 20 times trying to figure out what had changed, and I finally see it. I think maybe it was a typo in an earlier version? I don't remember anymore!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ktmud commented on a change in pull request #19381: feat: add drag and drop column rearrangement for table viz

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838892242



##########
File path: superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/TableStories.tsx
##########
@@ -86,6 +87,7 @@ function loadData(
       page_length: pageLength,
       show_cell_bars: showCellBars,
       include_search: includeSearch,
+      rearrange_columns: rearrangeColumns,

Review comment:
       Can you change the variable name in this file as well?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org