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 previous temporary tab becomes a permanent tab if try to open another temporary tab #7962

Closed v-xianya closed 2 weeks ago

v-xianya commented 1 month ago

Storage Explorer Version: 1.35.0-dev (98) Build Number: 20240526.1 Branch: main Platform/OS: Windows 10/Linux Ubuntu 22.04/MacOS Sonoma 14.5(Apple M1 Pro) Architecture: x64/x64/arm64 How Found: From running test cases Regression From: Previous release (1.34.0)

Steps to Reproduce

  1. Expand one storage account -> Blob Containers.
  2. Select one blob container -> Click it to open a temporary tab.
  3. Expand 'File Shares' node -> Select one file share -> Click it to open a temporary tab.
  4. Check whether the temporary blob container tab is closed and a temporary file share tab is opened.

Expected Experience

The temporary blob container tab is closed and a temporary file share tab is opened. image

Actual Experience

  1. The temporary blob container tab becomes a permanent tab.
  2. Shows file shares editor with a blob container tab title. image

Additional Context

The tab can't be closed by pressing the "x" or clicking 'Close'.

craxal commented 2 weeks ago

So, the visible tab is still technically the temporary tab. What's happening is the view isn't responding to the underlying temporaryTab observable changing. I suspect it's because the tab component's view model itself is not an observable. This means the view is sort of stuck showing the first temporary tab.

There are two ways to approach this:

  1. Make sure the tab component's view model is an observable. Not as clean, because it would require updating the Component base class in ui-component, and I haven't gotten it to work yet.
  2. Use an observable array to hold the temporary tab instead of a simple observable. Perhaps not quite as intuitive, but requires minimal changes and mirrors how permanent tabs are managed.
v-xianya commented 2 weeks ago

The latest build that contains this fix have problems when opening it, will verify on a new build.

v-xianya commented 2 weeks ago

Verified this issue on the main build 20240614.1. Fixed.