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

Merged
merged 1 commit into from Jul 18, 2021

Conversation

kgabryje
Copy link
Member

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

Screen.Recording.2021-07-16.at.13.25.06.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

  • Has associated issue:
  • 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

CC @junlincc

@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

Merging #15740 (3fa14ec) into master (66c28d6) will increase coverage by 0.00%.
The diff coverage is 75.86%.

❗ 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

@@           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%) ⬆️

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

Impacted Files Coverage Δ
...ontrols/DndColumnSelectControl/DndMetricSelect.tsx 44.44% <0.00%> (ø)
...ontrols/DndColumnSelectControl/DndColumnSelect.tsx 64.58% <62.50%> (+0.13%) ⬆️
...d/src/explore/components/DatasourcePanel/index.tsx 80.72% <81.81%> (-0.62%) ⬇️
...ponents/controls/DndColumnSelectControl/Option.tsx 100.00% <100.00%> (ø)
.../controls/DndColumnSelectControl/OptionWrapper.tsx 85.29% <100.00%> (+0.44%) ⬆️

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 66c28d6...6f4761f. Read the comment docs.


// display temporal column first
const columns = useMemo(
() =>
Copy link
Member

Choose a reason for hiding this comment

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

Is this by design?

Copy link
Member

@junlincc junlincc Jul 16, 2021

Choose a reason for hiding this comment

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

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

@junlincc junlincc added the explore:drag&drop Related to drag&drop in Explore label Jul 16, 2021
@junlincc
Copy link
Member

/testenv up ENABLE_EXPLORE_DRAG_AND_DROP=true

@github-actions
Copy link
Contributor

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

@rusackas
Copy link
Member

/testenv up FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true

@github-actions
Copy link
Contributor

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM

@zhaoyongjie zhaoyongjie merged commit 4234031 into apache:master Jul 18, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 explore:drag&drop Related to drag&drop in Explore 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants