microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
365 stars 85 forks source link

The order of the pasted message text is inconsistent with the sorted messages if select all then sort messages #7909

Closed v-kellyluo closed 2 months ago

v-kellyluo commented 2 months ago

Storage Explorer Version: 1.34.0-dev (98) Build Number: 20240428.1 Branch: main Platform/OS: Windows 10/Linux Ubuntu 22.04/MacOS Sonoma 14.4.1(Apple M1 Pro) Architecture: x64/x64/arm64 How Found: Ad-hoc testing Regression From: Not a regression

Steps to Reproduce

  1. Expand one storage account -> Queues.
  2. Open one queue which contains messages.
  3. Click 'Select All' -> Sort messages by one column.
  4. Right click messages -> Click 'Copy Message Text'.
  5. Paste the message text to notepad.
  6. Check whether the order of pasted message text is consistent with the sorted messages.

Expected Experience

The order of pasted message text is consistent with the sorted messages.

Actual Experience

The order of pasted message text is inconsistent with the sorted messages.

Additional Context

  1. This issue also reproduces when executing 'Copy Cells/Copy Rows' actions for entities.
  2. This issue also reproduces when executing 'Copy URL/Copy Path' actions for blobs and files.
craxal commented 2 months ago

@v-kellyluo This does not repro for me. Can you provide an example? And maybe a test machine?

v-kellyluo commented 2 months ago

Hi @craxal , Here is an example for messages, and I will share the test machine in Teams: The key point to reproduce this issue is that we need to select all first, then sort the messages and copy message text: message

craxal commented 2 months ago

@v-kellyluo Thank for that clarification on selecting first then sorting.

craxal commented 2 months ago

I see the problem now. We track selection as an array of indices. When we convert these indices to items, they aren't in sorted order, and it's this unsorted collection that the commands act on.

v-kellyluo commented 1 month ago

Verified this issue on the build 20240506.3. Fixed.