feat: manual sort for query parameters #2289
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2053
Adds sorting capabilities to the request query parameters. It uses react-dnd internally. Sorting happens already while hovering other items, but changes are only permanent if the request object is saved.
I moved the rendering of the individual table rows into a dedicated file for better separation. Let me know if I should revert this and move everything back into the index.js.
I'm not 100% happy with the solution as it requires copy & paste if this kind of sorting should apply to other components. I see a valid use-case adding this to request
headers
,vars
andasserts
as well. It would be possible to move some of the logic into a common utils location, but this increases complexity about the internal workings due to abstraction. If this is the way forward I can refactor here a bit.Handle Icon
See my comment below for alternative icon proposals, feedback is very much appreciated.
Drag & Drop in Action
bruno-pr2289-draft-example.mp4
Looks
Light Theme
Dark Theme
Contribution Checklist: