MitchellMarkGeorge / TabButler

A tab manager at your service.
https://tabbutler.netlify.app/
MIT License
43 stars 5 forks source link

Extension does not react to tab creation in another window #43

Closed MitchellMarkGeorge closed 2 years ago

MitchellMarkGeorge commented 2 years ago

Describe the bug Similar to #14. During my testing, I found that if I had another window open and I created a new tab, the currently open tab search modal would not react accordingly. This is a new problem since the inclusion of #12 that we never had to address.

To Reproduce Steps to reproduce the behavior:

  1. Have two browser windows open with tabs in both
  2. Have the tab search component open in one of the windows. Take note of the number of results.
  3. Go to the second window and create a new tab. The number of results on the tab search modal should remain the same.

Expected behavior On tab creation, the tab search modal should update.

Platform Info (please complete the following information):

Additional context This issue should be relatively easy to fix. using an onCreated listener, listen for tab creation. When a new tab is created in another window, send an update to all open tab search modals. This is important to only update the tab search modal in the OTHER window as if a new tab is created in the same window as the current search modal, the modal will be automatically updated when the user returns to that tab. If this issue requires more clarification, please feel free to reach out!

andrei-g-git commented 2 years ago

Hmm I've tested the new build on Chrome, Brave and Firefox and found that I can't replicate the bug on Windows, they look like they work fine, i.e. the tab count updates properly when I open and close new tabs in the other window or close the window outright, and it seems to work both ways, if I open a modal in the new window, it will register changes that happens in the original window even with a modal open in each.

MitchellMarkGeorge commented 2 years ago

Hmm thats odd. @andrei-g-git while you were testing did the active tab of the original window change at any point. The way I tested it was by having one window for each monitor (I run a dual monitor setup)

andrei-g-git commented 2 years ago

No, it always comes back to the same tab, but I only have 1 monitor. If I could get my hands on a second hdmi cable I could hook it up to my tv (I'll see if I can scrounge one up from my nightmarishly tangled bag of wires :P)

MitchellMarkGeorge commented 2 years ago

After some testing I think there is a chance that it could have just been a development error. I will leave the issue open for the time being until I can confirm why this happened

MitchellMarkGeorge commented 2 years ago

Tested this again and it still persists (tested on the production/deployed version). This should be one of the first bugs to be fixed because it is quite noticeable.

MitchellMarkGeorge commented 2 years ago

Closed with #66