Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(html-to-slate-ast): forward link attributes #21

Merged
merged 2 commits into from
Aug 2, 2021

Conversation

notrab
Copy link
Contributor

@notrab notrab commented Jul 26, 2021

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2021

🦋 Changeset detected

Latest commit: c491332

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphcms/html-to-slate-ast Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2021

size-limit report 📦

Path Size
packages/react-renderer/dist/rich-text-react-renderer.cjs.production.min.js 4.37 KB (0%)
packages/react-renderer/dist/rich-text-react-renderer.esm.js 4.31 KB (0%)
packages/types/dist/rich-text-types.cjs.production.min.js 51 B (0%)
packages/types/dist/rich-text-types.esm.js 64 B (0%)

@notrab
Copy link
Contributor Author

notrab commented Jul 26, 2021

@jpedroschmitz I'm not sure if I got the changeset stuff right - I'm used to semantic-release automated the semver for me 😅

Copy link

@ronakganatra ronakganatra left a comment

Choose a reason for hiding this comment

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

🍰

@notrab notrab requested a review from ronakganatra July 26, 2021 20:19
@ronakganatra
Copy link

Let @jpedroschmitz approve as well before merging.

@notrab
Copy link
Contributor Author

notrab commented Jul 26, 2021

@ronakganatra let's let @okjulian & team review 😅

@notrab notrab requested review from feychenie and jpedroschmitz and removed request for ronakganatra July 26, 2021 20:26
Copy link
Member

@jpedroschmitz jpedroschmitz left a comment

Choose a reason for hiding this comment

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

Looks great! Perhaps we also will need to add these conditionals to other elements with custom props, such as the IFrame, video, image...

@notrab
Copy link
Contributor Author

notrab commented Jul 26, 2021

@jpedroschmitz yep I thought as much when adding these. I’ll add these in a separate PR.

@wozzer72
Copy link

@notrab Hey Jamie. This looks beautiful.

@notrab
Copy link
Contributor Author

notrab commented Jul 27, 2021

@wozzer72 I'll add the following for iframe support in another PR (as well as another fix for something):

IFRAME: (el) => ({
    type: 'iframe',
    url: el.getAttribute('src'),
    ...(el.hasAttribute('title') && { title: el.getAttribute('title') }),
    ...(el.hasAttribute('width') && {
      width: parseInt(el.getAttribute('width') as keyof number, 10),
    }),
    ...(el.hasAttribute('height') && {
      height: parseInt(el.getAttribute('height') as keyof number, 10),
    }),
  }),

Copy link
Contributor

@oddtinker oddtinker left a comment

Choose a reason for hiding this comment

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

Looks good! I'd wait for @okjulian 's review before merging.

@jpedroschmitz jpedroschmitz merged commit eea403f into main Aug 2, 2021
@jpedroschmitz jpedroschmitz deleted the feat/forward-link-attributes branch August 2, 2021 14:34
@github-actions github-actions bot mentioned this pull request Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants