"Go to main component in library" behavior with multiple windows

Current behavior:

  • There are two windows open.
  • I have a working file open in window 1.
  • I have a component library open in window 2. This file hosts all components used within my working file in window 1.
  • When I click Go to main component in library or Go to main component in window 1, it opens the component library in window 1 even though I already have it open in window 2.

This behavior creates unnecessary tab management issues and confusion. Especially when using multiple component libraries.

That said, here is the expected behavior:

  • There are two windows open.
  • I have a working file open in window 1.
  • I have a component library open in window 2. This file hosts all components used within my working file in window 1.
  • When I click Go to main component in library or Go to main component in window 1, it should automatically go to the component library that is already open in window 2.

One example of the correct behavior is Google Chrome. When searching in the address bar, a shortcut to Switch to tab will navigate to the specific tab if it’s within a separate window.