Skip to content

Return visible errors for unsupported Notion content#133

Open
cwjcwj95 wants to merge 1 commit into
splitbee:masterfrom
cwjcwj95:fix/unsupported-content-error
Open

Return visible errors for unsupported Notion content#133
cwjcwj95 wants to merge 1 commit into
splitbee:masterfrom
cwjcwj95:fix/unsupported-content-error

Conversation

@cwjcwj95

Copy link
Copy Markdown

Summary

  • Render a visible .notion-error message for unsupported Notion block types instead of silently returning an empty <div />.
  • Show a specific Database unsupported message when a collection_view block is present but no collection data is available.
  • Add styling for the error block so unsupported content is visible without breaking the surrounding page layout.

Why

Fixes #87.

Before this change, unsupported content such as a Notion database could make the page appear to not load, especially in production where the existing unsupported-type log is not visible to users. The renderer now explains which unsupported content should be removed.

Verification

  • Compared patched tsc output with a baseline copy of current master; both show the same existing TypeScript environment errors:
    • missing process type under the constrained --types react,react-dom check
    • existing customBlockComponents never narrowing error
  • The diff did not introduce new TypeScript errors versus baseline.

Note: a full install using the repository's old typescript@3.9 currently resolves newer @types/* packages from npm, which produce dependency syntax errors unrelated to this patch.

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.

Return errors when importing unsupported content types

1 participant