NotionX / NotionX/react-notion-x

External object instance (GitHub link) breaks when attributes is absent

Open
#283 1 comment 0 reactions 0 assignees View on GitHub

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:

https://github.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/components/eoi.tsx#L16

external_object_instance object on my page

not working

external_object_instance object on the demo page (https://react-notion-x-demo.transitivebullsh.it/e648a7762fee458bb3b50ae946cb3c86)

working

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.