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

feat: hide panel by default when not explicit enabled #440

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

antfu
Copy link
Member

@antfu antfu commented Sep 27, 2023

When we ship DevTools by default in Nuxt 3, we want to minimize the distribution for regular development workflow as much as possible. In that case, we don't want all users to get the floating panel in their apps without knowing the existence of Nuxt DevTools.

In this PR, we make the panel hide by default, except when devtools: { enabled: true } or modules: ['@nuxt/devtools'] is presented in the config (indicate that the users are aware of and want to use devtools).

Combining with 97b3e18, we are showing the hint in both the terminal and browser console. For the first time a user opens up DevTools, a welcome page will be displayed and ask to turn on the floating panel.

@antfu antfu mentioned this pull request Sep 27, 2023
7 tasks
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 27, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b643f8
Status: ✅  Deploy successful!
Preview URL: https://4bf60e31.nuxt-devtools.pages.dev
Branch Preview URL: https://feat-hide-panel-by-default.nuxt-devtools.pages.dev

View logs

@antfu antfu merged commit 7c614c9 into main Sep 27, 2023
2 checks passed
@antfu antfu deleted the feat/hide-panel-by-default branch September 27, 2023 22:26
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.

1 participant