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: schema #351

Merged
merged 5 commits into from
Jul 23, 2024
Merged

fix: schema #351

merged 5 commits into from
Jul 23, 2024

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented Jul 23, 2024

Problem

  1. callout has a variant but it shouldn't (i think there's a more general fix going out but just put this here first)
  2. Heading schema needs to accept optional content. Otherwise, pressing # inside Tiptap will crash the editor on validation as this creates an empty heading w/o the content prop.
  3. update prose control testing - we were previously using the uischema and not the schema, which led to the editor not being rendered.

Solution

  1. remove callout.variant in components
  2. set content to be Type.Optional
  3. set prose tester to use schema and not uischema (argument order)

prose control now uses schema to determine whether to render
for complex components, i now export a function to generate prose schema
- this omits id if not specified
make content optinoal
@seaerchin seaerchin requested a review from a team as a code owner July 23, 2024 09:00
Copy link

vercel bot commented Jul 23, 2024

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

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 10:27am

@seaerchin seaerchin requested a review from dcshzj July 23, 2024 10:01
Copy link
Contributor

@dcshzj dcshzj left a comment

Choose a reason for hiding this comment

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

Only nits

add back schemaMatches + lint fixes
@seaerchin seaerchin enabled auto-merge (squash) July 23, 2024 10:23
@seaerchin seaerchin merged commit c0d55f9 into main Jul 23, 2024
19 checks passed
@seaerchin seaerchin deleted the fix/prose-schema branch July 23, 2024 10:27
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