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

Column/Table Drag & Drop #10702

Merged
merged 22 commits into from
Jun 16, 2020
Merged

Column/Table Drag & Drop #10702

merged 22 commits into from
Jun 16, 2020

Conversation

cssuh
Copy link
Member

@cssuh cssuh commented Jun 3, 2020

This PR introduces the base functionality for drag/drop in ADS. The purpose of this PR is to get some technical feedback on the implementation of this feature and suggestions on how I can improve it (I wanted to do this before I got too far along in the development).

Here is my current TODO list:

  • add parsing for the column label so it is correctly formatted
  • Some fixes in dnd.ts (parameterize)
  • Add SQL Carbon Edit tags in the VS Code changes

Future enhancements (not meant to be included in this PR):

  • Fix the table collapsing/expanding when clicked & dragged
  • Be able to drag the table/column over any part of the text (will only be dropped where your typing cursor is currently)
  • Remove the large blue box highlighting
  • Add more components to be dragged/dropped (also folders)

DragDropDev

This PR fixes #3630

src/vs/base/browser/dnd.ts Outdated Show resolved Hide resolved
@cssuh cssuh requested review from aaomidi and abist June 9, 2020 16:56
@cssuh cssuh requested a review from abist June 9, 2020 23:12
Copy link
Contributor

@abist abist left a comment

Choose a reason for hiding this comment

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

Let's bring all the changes to the sql side of things and change the server explorer tree instead of the whole tree implementation. I left a comment on how you could do this, if you need help, feel free to ping me.

@abist
Copy link
Contributor

abist commented Jun 10, 2020

Sync'd offline and changes might be right, will investigate and get back in day.

@cssuh cssuh requested a review from abist June 12, 2020 18:47
@coveralls
Copy link

coveralls commented Jun 12, 2020

Coverage Status

Coverage increased (+0.1%) to 34.672% when pulling 85d7a07 on feat/dragdrop into 4c82cf0 on main.

Copy link
Contributor

@abist abist 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 much cleaner! :shipit: (wait for all the checks to pass first)

@cssuh
Copy link
Member Author

cssuh commented Jun 12, 2020

agreed, although it looks like I may need to add a test so the code coverage doesn't decrease
thank you for the review it was extremely helpful

@kburtram kburtram changed the base branch from master to main June 15, 2020 06:20
@cssuh cssuh merged commit 0c56e4a into main Jun 16, 2020
@aaomidi aaomidi deleted the feat/dragdrop branch June 16, 2020 04:39
TreeUpdateUtils.isInDragAndDrop = true;
const data = dragAndDropData.getData();
const element = data[0];
if (element.nodeTypeId === 'Column' || element.nodeTypeId === 'Table') {
Copy link
Contributor

Choose a reason for hiding this comment

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

i see you're referencing this in two parts of the code, would it make sense for this to be an enum? Or some sort of helper method

ktech99 pushed a commit that referenced this pull request Aug 23, 2020
* able to drag objects from left pane

* changed scheme from file

* base functionality working

* extended functionality to tables

* added string literals and formatting

* cleanup

* cleanup

* added table/column parsing

* removed bad logic

* updated to use metadata

* cleanup and added sql carbon edit tags

* moved changes from vs into sql code base

* refactoring drag and drop

* cleanup

* cleanup

* cleanup

* added unit tests

* pr changes

* moved treeMock file

* fixed small bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support drag-n-drop columns and tables into Query Editor
4 participants