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: add duplicate document action #194

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

nkgentile
Copy link

@nkgentile nkgentile commented Nov 12, 2024

Adds a custom document action to facilitate duplicating a localized document, its translations, and the underlying metadata document.

duplicate-document-action

Things to review:

  • Naming
  • Whether to include in plugin by default or opt-in
  • handle and using the document store in general
  • Patching metadata document with document store instead of client?

// ...all other config
document: {
actions(prev, { schemaType }) {
return schemaTypes.includes(schemaType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here that schemaTypes would be the same array that you add to the documentInternationalization plugin config. When you copy-paste this snippet it's likely an undefined variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd keep the same Duplicate icon as the default action

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.

2 participants