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

fix: to #736 #737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: to #736 #737

wants to merge 1 commit into from

Conversation

LukerSpringtree
Copy link
Contributor

@LukerSpringtree LukerSpringtree commented Dec 11, 2024

to fix #736

2024-12-11.22.07.58.mov

After this commit, the page behaves as below;

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit e26863a
🔍 Latest deploy log https://app.netlify.com/sites/vue-devtools-docs/deploys/67598ad4929ca700088169f2

@LukerSpringtree
Copy link
Contributor Author

image

There are many code about the useDevToolsColorMode but I don't how to fix them.

Copy link

pkg-pr-new bot commented Dec 11, 2024

Open in Stackblitz

@vue/devtools-applet

npm i https://pkg.pr.new/@vue/devtools-applet@737

@vue/devtools-core

npm i https://pkg.pr.new/@vue/devtools-core@737

@vue/devtools

npm i https://pkg.pr.new/@vue/devtools@737

@vue/devtools-api

npm i https://pkg.pr.new/@vue/devtools-api@737

@vue/devtools-kit

npm i https://pkg.pr.new/@vue/devtools-kit@737

vite-plugin-vue-devtools

npm i https://pkg.pr.new/vite-plugin-vue-devtools@737

commit: e26863a

@alexzhang1030
Copy link
Member

Hi, that's related to #339

The inspect page is hosted as an injected iframe, so the dark/light logic is strictly isolated from devtools page. They "can" work properly because they share the same dark class name in the html tag.

I think this is a vueuse side bug, so I believe the proper solution is to hide the theme toggle button on the inspect page. /cc @webfansplz , WDYT?

@LukerSpringtree
Copy link
Contributor Author

LukerSpringtree commented Dec 11, 2024

WDYT

OK~
See the history issues, I get the background.

For the first time, I want to update the vite-plugin-inspect vite plugin and add an option to hide the Dark Mode button.
But! It's too hard because the plugin client part is a static source. The option can't be passed to the client content.

This is a tricky question.

@alexzhang1030

@LukerSpringtree
Copy link
Contributor Author

@alexzhang1030 @webfansplz

antfu-collective/vite-plugin-inspect#123

I submitted a PR to vite-plugin-inspect. After understanding the background, my current plan is to add a hideDarkMode configuration option to vite-plugin-inspect. This way, the theme toggle button for the inspect module can be disabled in DevTools.
I believe this is the best solution for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Change the theme there will be a bug!
2 participants