vuejs / devtools

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools.vuejs.org/
MIT License
1.7k stars 121 forks source link

Pinia settings panel is not loaded immediatly when current page does not have any `useStore` #672

Open alexzhang1030 opened 2 weeks ago

alexzhang1030 commented 2 weeks ago

Reproduction step:

Record:

https://github.com/user-attachments/assets/ca32f8aa-fc05-4194-91c2-2020fb07e9fd

webfansplz commented 2 weeks ago

Yes, I noticed this, but I guess it has something to do with the design of the pinia devtools plugin, and maybe devtools v6 as well. But anyway, I think it makes sense to register pinia and let it come out. So if we confirm that it is the design problem of pinia devtools plugin, I think we can submit issue or PR to pinia repo for it.

alexzhang1030 commented 2 weeks ago

Yes, I noticed this, but I guess it has something to do with the design of the pinia devtools plugin, and maybe devtools v6 as well. But anyway, I think it makes sense to register pinia and let it come out. So if we confirm that it is the design problem of pinia devtools plugin, I think we can submit issue or PR to pinia repo for it.

Pinia will register devtools once they have at least one store, see

https://github.com/vuejs/pinia/blob/128f4352d2c18c0992cbab67b1a9261ff8a766ca/packages/pinia/src/store.ts#L731C8-L744

So plugin settings will update when somewhere has useStore calls.

But applet does not subscribe the plugin changes, should we support it?

alexzhang1030 commented 2 weeks ago

Upstream issue, related https://github.com/vuejs/pinia/issues/2818