NotionX / NotionX/react-notion-x
defaultPageCoverPosition is ignored if the notion page used to have a cover
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
Notion pages seem to keep the page_cover_position in a page format even if the cover was removed.
The Block component from packages/react-notion-x/src/block.tsx uses the page_cover_position from the page format if it's available instead of the defaultPageCoverPosition.
The problem happens when using NotionRenderer with defaultPageCover and defaultPageCoverPosition with a page that used to have a cover.
In this case it uses the page_cover_position from the cover that was removed with the defaultPageCover. defaultPageCoverPosition is ignored.
Notion Test Page ID
This page used to have a cover and has a numeric page_cover_position value as part of its format. It doesn't have page_cover as part of its format.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/react-notion-x/src/block.tsx and inspect how page_cover_position and defaultPageCoverPosition are selected for the Notion Test Page ID in the report. Done means a page with a stale page_cover_position but no page_cover uses defaultPageCoverPosition when rendered with NotionRenderer and defaultPageCover.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100