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

Document.actions & Document.badges not working/showing from a plugin #7687

Open
droplab opened this issue Oct 28, 2024 · 0 comments
Open

Document.actions & Document.badges not working/showing from a plugin #7687

droplab opened this issue Oct 28, 2024 · 0 comments

Comments

@droplab
Copy link

droplab commented Oct 28, 2024

If you find a security vulnerability, do NOT open an issue. Email [email protected] instead.

Returned document.actions and document.badges are not firing when the plugin is running in a sanity studio build.

A clear and concise description of what the bug is.

Returned document.actions and document.badges are not rendering/firing when the plugin is running in a sanity studio build. All of the plugin code was built and tested directly in a studio, before porting over to a plugin using the latest versions of @sanity/plugin-kit package and workflow outlined in the Sanity documentation.

Steps to reproduce the behavior:

  1. Install the plugin
  2. Add the plugin function to the plugins array in sanity.config.ts

Expected behavior

A custom publish action that overrides the default publish action, and a custom badge should be visible in the bottom toolbar when editing a document. Neither are showing when running as a plugin. Both the action and badge show up and function properly when running in the studio codebase.

Screenshots
If applicable, add screenshots to help explain your problem.

Which versions of Sanity are you using?

@sanity/cli (global) 3.20.0 (latest: 3.62.2)
@sanity/asset-utils 2.0.6 (up to date)
@sanity/color-input 4.0.1 (up to date)
@sanity/dashboard 4.1.0 (up to date)
@sanity/eslint-config-studio 4.0.0 (up to date)
@sanity/icons 3.4.0 (up to date)
@sanity/image-url 1.0.2 (up to date)
@sanity/orderable-document-list 1.2.2 (up to date)
@sanity/ui 2.8.9 (latest: 2.8.10)
@sanity/vision 3.60.0 (latest: 3.62.2)
sanity 3.60.0 (latest: 3.62.2)

What operating system are you using?

Mac OS Ventura 13.4.1 (22F82)

Which versions of Node.js / npm are you running?

10.2.4
v20.11.1

Additional context

This plugin is not published yet due to this issue, so you won't be able to install it directly to test. I have an ongoing thread in the Slack Sanity #help channel. All the feedback I've been getting from a Community Engineer at Sanity.io is they are stumped on this as well (https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1729531573916279)

Security issue?

Any security issues should be submitted directly to [email protected]. In order to determine whether you are dealing with a security issue, ask yourself these two questions:

  • Can I access something that's not mine, or something I shouldn't have access to?
  • Can I disable something for other people? If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. Note that even if you answer "no" to both questions, you may still be dealing with a security issue, so if you're unsure, just email us at [[email protected]](mailto:[email protected].
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

No branches or pull requests

1 participant