insomnium icon indicating copy to clipboard operation
insomnium copied to clipboard

dropdown of folders deleting folders with out giving warning, giving Prompt for deleting folders or requests will fix it

Open birukbelay opened this issue 11 months ago • 2 comments

Expected Behavior

  1. when the option button is clicked i dont want any other option clicked automatically from the menu with out me specifically clicking them, specially the delete option
  2. when the delete option is clicked i expect it to create a modal or some kind of prompt before deleting it completly,
  3. if possible to have a trash of deleted items, not deleting it completely but marking as deleted

Actual Behavior

  1. when delete button is clicked it automatically deletes with out any prompt or warning
  2. some times when the dropdown option on folders or request is clicked it automatically click other options, such as settings or delete button, but the problem with the delete one is it permanently deletes folders with many request with out you knowing because it doesn't give any warnings

Reproduction Steps

---------------------- case 1 1.1. go to collections 1.2. create a folders 1.3. click options then delete 1.4. it deletes with out a prompt

---------------- case 2 2.1. go to collections 2.2. create a folders 2.3. click the options of a folder which position is in the middle of the scroll view port 2.4. it clicks other options as well automatically, which is some bug 2.5: this bug combined with the deleting of folders with out a popup or warning is very dangerous as it delete the works you have done

Is there an existing issue for this?

Additional Information

No response

Insomnium Version

0.2.3-a

What operating system are you using?

macOS

Operating System Version

mac os Darwin

Installation method

downloaded form insomnim

Last Known Working Insomnium version

No response

birukbelay avatar Feb 29 '24 07:02 birukbelay

i think this is the issue, it is not showing prompt, when the handle delete is called, so it think this should be a quick fix

on the path packages/insomnia/src/ui/components/dropdowns/request-group-actions-dropdown.tsx

  const handleDeleteFolder = async () => {
    models.stats.incrementDeletedRequestsForDescendents(requestGroup);
    requestFetcher.submit({ id: requestGroup._id },
      {
        action: `/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/debug/request-group/delete`,
        method: 'post',
      });
  };

birukbelay avatar Feb 29 '24 07:02 birukbelay

A confirmation before deleting request/folder or whatever should be nice.

7cio avatar Mar 08 '24 12:03 7cio