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 2021/07/16 12:44:43 UTC

[GitHub] [superset] kgabryje opened a new pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

kgabryje opened a new pull request #15740:
URL: https://github.com/apache/superset/pull/15740


   ### SUMMARY
   Implements UX improvements for DnD, some of which are prerequisites for drag and dropping time columns.
   Changes include:
   - sorting columns in dataset panel so that temporal columns are displayed first (so that it's easy find them and drag to time column control)
   - making delete button in `DndColumnSelect` configurable - we don't display the delete button for time column control
   - changed logic of `canDrop` on single selection controls. Before in order to change the selection, user had to remove current selection and drop a new column/metric. Now when control field has a value, user can just drop a new value and it will get swapped
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   https://user-images.githubusercontent.com/15073128/125949640-faa0f395-91dd-4cc2-baec-822ac48bbe8d.mov
   
   ### TESTING INSTRUCTIONS
   Instructions for changes related to time column dnd will be described in a PR in superset-ui
   To test the new behaviour of single select controls:
   0. Set `ENABLE_EXPLORE_DRAG_AND_DROP` to True
   1. Open a chart that has controls that accept only a single value, e.g. Chord chart.
   2. Add values to control fields, then swap them without removing first
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] 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
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   CC @junlincc 


-- 
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] junlincc commented on pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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


   /testenv up ENABLE_EXPLORE_DRAG_AND_DROP=true


-- 
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] zhaoyongjie commented on a change in pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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



##########
File path: superset-frontend/src/explore/components/DatasourcePanel/index.tsx
##########
@@ -119,7 +119,23 @@ export default function DataSourcePanel({
   controls: { datasource: datasourceControl },
   actions,
 }: Props) {
-  const { columns, metrics } = datasource;
+  const { columns: _columns, metrics } = datasource;
+
+  // display temporal column first
+  const columns = useMemo(
+    () =>

Review comment:
       Is this by design?




-- 
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] github-actions[bot] commented on pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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


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


-- 
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] junlincc commented on a change in pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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



##########
File path: superset-frontend/src/explore/components/DatasourcePanel/index.tsx
##########
@@ -119,7 +119,23 @@ export default function DataSourcePanel({
   controls: { datasource: datasourceControl },
   actions,
 }: Props) {
-  const { columns, metrics } = datasource;
+  const { columns: _columns, metrics } = datasource;
+
+  // display temporal column first
+  const columns = useMemo(
+    () =>

Review comment:
       yes for now, until we add the generic X axis control. 




-- 
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 #15740: feat(explore): UX improvements for drag'n'dropping time column

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/15740?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 [#15740](https://codecov.io/gh/apache/superset/pull/15740?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3fa14ec) into [master](https://codecov.io/gh/apache/superset/commit/66c28d653f3f9381479ab817e6dba8f6598d8b8d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (66c28d6) will **increase** coverage by `0.00%`.
   > The diff coverage is `75.86%`.
   
   > :exclamation: Current head 3fa14ec differs from pull request most recent head 6f4761f. Consider uploading reports for the commit 6f4761f to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/15740/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/15740?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #15740   +/-   ##
   =======================================
     Coverage   76.92%   76.92%           
   =======================================
     Files         983      983           
     Lines       51609    51624   +15     
     Branches     6988     6994    +6     
   =======================================
   + Hits        39698    39710   +12     
   - Misses      11688    11691    +3     
     Partials      223      223           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.37% <75.86%> (+<0.01%)` | :arrow_up: |
   
   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/15740?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ontrols/DndColumnSelectControl/DndMetricSelect.tsx](https://codecov.io/gh/apache/superset/pull/15740/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZE1ldHJpY1NlbGVjdC50c3g=) | `44.44% <0.00%> (ø)` | |
   | [...ontrols/DndColumnSelectControl/DndColumnSelect.tsx](https://codecov.io/gh/apache/superset/pull/15740/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZENvbHVtblNlbGVjdC50c3g=) | `64.58% <62.50%> (+0.13%)` | :arrow_up: |
   | [...d/src/explore/components/DatasourcePanel/index.tsx](https://codecov.io/gh/apache/superset/pull/15740/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvaW5kZXgudHN4) | `80.72% <81.81%> (-0.62%)` | :arrow_down: |
   | [...ponents/controls/DndColumnSelectControl/Option.tsx](https://codecov.io/gh/apache/superset/pull/15740/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbi50c3g=) | `100.00% <100.00%> (ø)` | |
   | [.../controls/DndColumnSelectControl/OptionWrapper.tsx](https://codecov.io/gh/apache/superset/pull/15740/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbldyYXBwZXIudHN4) | `85.29% <100.00%> (+0.44%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/15740?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/15740?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 [66c28d6...6f4761f](https://codecov.io/gh/apache/superset/pull/15740?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] junlincc commented on a change in pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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



##########
File path: superset-frontend/src/explore/components/DatasourcePanel/index.tsx
##########
@@ -119,7 +119,23 @@ export default function DataSourcePanel({
   controls: { datasource: datasourceControl },
   actions,
 }: Props) {
-  const { columns, metrics } = datasource;
+  const { columns: _columns, metrics } = datasource;
+
+  // display temporal column first
+  const columns = useMemo(
+    () =>

Review comment:
       yes




-- 
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] github-actions[bot] commented on pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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


   Ephemeral environment shutdown and build artifacts deleted.


-- 
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] zhaoyongjie merged pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

Posted by GitBox <gi...@apache.org>.
zhaoyongjie merged pull request #15740:
URL: https://github.com/apache/superset/pull/15740


   


-- 
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] rusackas commented on pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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


   /testenv up FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true


-- 
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] github-actions[bot] commented on pull request #15740: feat(explore): UX improvements for drag'n'dropping time column

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


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


-- 
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