Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexzhang1030 opened this issue Nov 1, 2024 · 3 comments
Assignees
Labels
applet Applet package upstream Related to an upstream issue

Comments

@alexzhang1030
Copy link
Member

Reproduction step:

  • goto some page does not include any useStore
  • open devtools pinia page (settings panel does not appear)
  • goto some page include useStore
  • refresh devtools
  • settings panel appears

Record:

Untitled.mp4
@alexzhang1030 alexzhang1030 added the applet Applet package label Nov 1, 2024
@alexzhang1030 alexzhang1030 self-assigned this Nov 1, 2024
@webfansplz
Copy link
Member

webfansplz commented Nov 1, 2024

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
Copy link
Member Author

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
Copy link
Member Author

Upstream issue, related vuejs/pinia#2818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applet Applet package upstream Related to an upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants