Skip to content

Conversation

@julbrs
Copy link
Contributor

@julbrs julbrs commented Feb 23, 2022

Hello!
The goal of this PR is to fix #216 for github.com links only. It's the Preview mode, not the Mention mode (still need to work on it!)

Here is an exemple page that contains this block: https://julb.notion.site/How-it-s-built-4ad0d992a4614b83854eff2fff616de6

It looks like that on notion:
image

It looks like that on react-notion-x with this PR:
image

Dark Mode:
image

Some infos:

  • I have not included the github user avatar (the picture was too big :) )
  • the last update date is grabbed from the Github API
  • If the repo is private then it show only the repo name (owner/name) and no update date.
  • It will be needed later to handle Jira, Slack, Trello, and Asana links too!

Let me know if you need additional input!

Thanks!

@julbrs
Copy link
Contributor Author

julbrs commented Feb 25, 2022

Adding a commit to handle Mention 🎉:

image

I have worked with a single component (like Equation) maybe not the best idea 😅

Let me know,

Thanks!

Copy link
Member

@transitive-bullshit transitive-bullshit left a comment

Choose a reason for hiding this comment

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

This is an awesome set of changes @julbrs. Really great work.

Just a few minor nits and it's good-to-go.

@julbrs
Copy link
Contributor Author

julbrs commented Mar 17, 2022

Hi @transitive-bullshit 👋

Thanks for the review, I have added a commit with the suggested modification: e514502

I have also found some additional places to use ?. in text.tsx

Let me know if you find anything else,

const blockId = decorator[1]
const externalObjectInstance = recordMap.block[blockId]
?.value as ExternalObjectInstance
switch (externalObjectInstance.format?.domain) {

Choose a reason for hiding this comment

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

externalObjectInstance may be undefined here

@transitive-bullshit transitive-bullshit merged commit f5e3d8d into NotionX:master Mar 17, 2022
@transitive-bullshit
Copy link
Member

Awesome work; thanks @julbrs 🙏

Hoping to get a maintenance update out soon which should include this change.

@transitive-bullshit
Copy link
Member

Published in 4.17.0

julbrs added a commit to julbrs/julbrs-portfolio that referenced this pull request Mar 17, 2022
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.

Support for external_object_instance / eoi

2 participants