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

Move request to collapsed folder by opening on hover #1442

Merged
merged 4 commits into from Apr 22, 2019

Conversation

Projects
None yet
2 participants
@develohpanda
Copy link
Contributor

commented Apr 20, 2019

Closes #1329.

Goals

  • Use existing behavior for moving Request or RequestGroup into an expanded folder.
  • Should support moving Request to collapsed RequestGroup
  • Should support moving RequestGroup to collapsed RequestGroup
  • Should support moving any nested combination of Request and RequestGroup

Investigations

Initial attempt was to expand the collapsed group on drag-hover. Works, but far from ideal because in the case of multiple RequestGroup rows, all would open when dragging something from the top of the list to the bottom.

I investigated a hover delay but there is no built-in functionality to react-dnd to achieve this. Modifying the package feels too clunky and would be another thing to maintain.

I investigated dropping a Request onto the collapsed RequestGroup and have it added to the top of the group by default. A user would then need to click to open the group, and order to the desired location. An unnecessary additional click.

Solution

I settled on showing an unobtrusive open tag when drag-hovering over a request group. While dragging, hovering over a collapsed RequestGroup will show the open tag, and hovering over the tag will expand the group. This tag is only shown on a collapsed RequestGroup.

Collapsed:
image

Expanded:
image

Improvements

Would love some guidance on whether using ref to identify the expand tag in this use case is appropriate or if another solution should be used.

@gschier
Copy link
Collaborator

left a comment

Wow, I love this solution. Very nicely done 😄 💯

@gschier gschier merged commit a9e66f0 into getinsomnia:develop Apr 22, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@develohpanda

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

Wow, I love this solution. Very nicely done 😄 💯

Thanks @gschier! 😄

@develohpanda develohpanda deleted the develohpanda:feature/1329-request-to-collapsed-folder branch Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.