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
377 stars 87 forks source link

The json file is not formatted after clicking 'Format JSON' #8283

Closed v-xianya closed 2 weeks ago

v-xianya commented 2 weeks ago

Storage Explorer Version: 1.37.0-dev (102) Build Number: 20241106.1 Branch: main Platform/OS: Windows 11/Windows 11/Linux Ubuntu 22.04/MacOS Sequoia 15.1(Apple M1 Pro) Architecture: arm64/x64/x64/arm64 How Found: From running test cases Regression From: Previous release (1.36.2)

Steps to Reproduce

  1. Expand one storage account -> Blob Containers.
  2. Create a blob container -> Upload one .json file.
  3. Right click the .json file -> Click 'Preview'.
  4. In the preview panel, right-click and choose 'Format JSON'.
  5. Check whether the file is formatted.

Expected Experience

The file is formatted. Image

Actual Experience

The file is not formatted. Image

craxal commented 2 weeks ago

I see the problem. The format action setup for the editor captures the initial props.value ("Loading..."). Although the editor displays the expected data, the action always uses the initial value. So, we need to figure out how to get the editor actions to use the updated props.value.

v-xianya commented 2 weeks ago

Verified this issue on the main build 20241107.5. Fixed.