feat: add default_state option to popup actions#2010
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e7727f5 to
a22fe24
Compare
a22fe24 to
f6c380e
Compare
aklinker1
left a comment
There was a problem hiding this comment.
Just undo your change to the browser package and add a @ts-expect-error like mentioned in the comemnt. Then I'll approve!
Sorry for the delay, and thanks for opening a PR 😄
|
@kairi003 Are you want to go on? |
|
@kairi003 One more poke :) |
63ceef1 to
b2239f4
Compare
|
@aklinker1 @PatrykKuniczak |
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
|
@kairi003 WAIT, tests issue. |
@PatrykKuniczak |
This reverts commit 02a2134.
737ced9 to
4101aea
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2010 +/- ##
==========================================
+ Coverage 79.58% 79.67% +0.08%
==========================================
Files 130 130
Lines 3802 3804 +2
Branches 860 861 +1
==========================================
+ Hits 3026 3031 +5
+ Misses 691 689 -2
+ Partials 85 84 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for helping make WXT better! |

Overview
This PR adds support for the
default_stateoption in popup actions (browser_action/page_action for MV2, action for MV3). This option controls the initial enabled/disabled state of the extension's action button, as documented in the Chrome Extension Action API.Previously, WXT did not support configuring this property in the manifest, making it impossible to set the action button to a disabled state before any runtime methods are called. This PR allows setting the initial state declaratively in the entrypoint options, following the same pattern as the existing options.
Changes
defaultStateproperty toPopupEntrypointOptionstypedefault_statewhen specifiedManual Testing
Verified in
wxt-demo:default_state: "disabled"towxt.config.tsmanifest configurationdefault_stateproperty is correctly included in the generatedmanifest.jsonRelated Issue
No related issue - this is a standalone enhancement to improve manifest configuration options.