Skip to content

Conversation

@Skewnart
Copy link
Contributor

@Skewnart Skewnart commented Oct 6, 2025

closes: #5721

Description

This PR implements the process of re-compute the sequential order of requests (queries) / directories (folders) in a directory / collection when an item is deleted.

This fixes the issue that adding a request / directory make the new item going physically between two items or even have the same sequential order as another item in the same folder.

Before / After example below 😄

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Before

  1. Creating 4 requests :
    before 1
  2. Deleting the second and third items. (the fouth keeps its order)
    before 2
    before 3
  3. Inserting a request results in having its order equals to 3 (count 2 + 1).

    It will be added between the two others...
    before 4

After

  1. Creating 4 requests :
    after 1
  2. Deleting the second and third as well. We can see the orders re-computed each time
    after 2
    after 3
  3. Adding a request goes at the good level, after the others.
    after 4

@bijin-bruno bijin-bruno force-pushed the fix/reorder-items-when-deleting branch from 3383fd2 to f50a79c Compare November 4, 2025 10:06
@bijin-bruno bijin-bruno changed the base branch from main to feat/reorder-items-on-delete November 13, 2025 11:38
@bijin-bruno bijin-bruno merged commit f8c30a8 into usebruno:feat/reorder-items-on-delete Nov 13, 2025
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Items do not reorder when deleting request or directory

2 participants