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(sanity): fix controls for custom block components preview #3722

Merged

Conversation

sjelfull
Copy link
Member

@sjelfull sjelfull commented Oct 5, 2022

Description

When a PTE object block has a custom components.preview, the dot-menu disappears. This fixes the check that adds the wrapper around the preview.

This is reproducible by adding a block to a PTE input with the following schema:

defineField({
  type: 'object',
  name: 'testPreview',
  fields: [
    {
      title: 'Title',
      name: 'title',
      type: 'string',
    },
  ],
  preview: {
    select: {
      title: 'title',
    },
  },
  components: {
    preview: () => <div>Yolo</div>,
  },
})

What to review

  • That the UI looks correct when you have a custom components.preview for a block preview

Notes for release

  • Fixed missing block action menu around custom block object previews

@sjelfull sjelfull self-assigned this Oct 5, 2022
@vercel
Copy link

vercel bot commented Oct 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 5, 2022 at 0:33AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
studio-workshop ⬜️ Ignored (Inspect) Oct 5, 2022 at 0:33AM (UTC)

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

LGTM 😄

@sjelfull sjelfull added the v3 label Oct 6, 2022
@sjelfull sjelfull merged commit 5518b4e into v3 Oct 6, 2022
@sjelfull sjelfull deleted the bug/sc-25127/pte-block-controls-missing-when-components branch October 6, 2022 10:48
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.

None yet

2 participants