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

Simplify drag and drop integrations #2126

Merged
merged 3 commits into from
Aug 1, 2022
Merged

Simplify drag and drop integrations #2126

merged 3 commits into from
Aug 1, 2022

Conversation

sroy3
Copy link
Contributor

@sroy3 sroy3 commented Aug 1, 2022

Closes #1743
Would be quite hard to make just one integration after all. I didn't realize that the one for the experiments table does not work as a container since draggable items are deeply nested inside markup. What I was able to do though is to clean up that integration to use only what is necessary and not depend on the other integration (mainly the makeTarget function).

@sroy3 sroy3 self-assigned this Aug 1, 2022
@sroy3 sroy3 marked this pull request as ready for review August 1, 2022 18:01
Copy link
Member

@mattseddon mattseddon 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 close #1743 if this is as far as we are going.

@@ -26,16 +24,14 @@ export const Draggable: React.FC<DraggableProps> = ({
disabled,
dropTarget,
onDrop,
onDragOver,
onDragEnter,
onDragStart
// eslint-disable-next-line sonarjs/cognitive-complexity
Copy link
Member

@mattseddon mattseddon Aug 1, 2022

Choose a reason for hiding this comment

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

[Q] Is this still needed?

Copy link
Member

Choose a reason for hiding this comment

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

from the looks probably but thought I would check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It passes sonar tests but not codeclimate. I checked.

@sroy3 sroy3 enabled auto-merge (squash) August 1, 2022 19:47
@codeclimate
Copy link

codeclimate bot commented Aug 1, 2022

Code Climate has analyzed commit a8c6a36 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 96.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.0% change).

View more on Code Climate.

@sroy3 sroy3 merged commit e5db80f into main Aug 1, 2022
@sroy3 sroy3 deleted the simplify-draggable branch August 1, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate the shared/dragDrop module to fix all the duplicated code
2 participants