NotionX / NotionX/react-notion-x
External object instance (GitHub link) breaks when attributes is absent
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
Pasting a GitHub link into Notion by default doesn't have an attributes property which makes the renderer ignore it
Couldn't figure out how to run it locally, so couldn't open a PR for this one (it is also late, and i should sleep)
Here's the line of code that ignores the attributes property:
external_object_instance object on my page
external_object_instance object on the demo page (https://react-notion-x-demo.transitivebullsh.it/e648a7762fee458bb3b50ae946cb3c86)
Notion Test Page ID
Page ID 767f227505f548a28efefbc5da8831ff
Notion Page URL https://grandiose-fireplace-47b.notion.site/eoi-test-767f227505f548a28efefbc5da8831ff
React Notion X Page URL https://react-notion-x-demo.transitivebullsh.it/767f227505f548a28efefbc5da8831ff
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/components/eoi.tsx at the linked line that ignores external_object_instance objects without an attributes property. Reproduce with Notion Page ID 767f227505f548a28efefbc5da8831ff and compare it with the demo page. Done means the GitHub-linked external object renders when attributes is absent.
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
- 45/100