Skip to content

Update useLinkInterception to fix clickHandler - #2493

Merged
joshblack merged 3 commits into
mainfrom
md-viewer-link-interception-fix
Oct 31, 2022
Merged

Update useLinkInterception to fix clickHandler#2493
joshblack merged 3 commits into
mainfrom
md-viewer-link-interception-fix

Conversation

@nicolleromero

Copy link
Copy Markdown
Contributor

This PR updates useLinkInterception in the MarkdownViewer to prevent a bug that was causing onLinkClick to not be called when the DOM was updated with new links without the React component rerendering (such as when using custom web components and converting a draft into an issue –– see BEFORE screenshot).

Closes # https://github.com/github/issues-graph/issues/812

Screenshots

BEFORE

Tasklist.link.after.convert.bug.mov

AFTER

Tasklist.links.fix.mov

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@nicolleromero
nicolleromero requested review from a team and mperrottiOctober 28, 2022 01:23
@changeset-bot

changeset-botBot commented Oct 28, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 275189a

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

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

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

github-actionsBot commented Oct 28, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js78.13 KB (0%)
dist/browser.umd.js78.78 KB (0%)

@nicolleromero
nicolleromero temporarily deployed to github-pages October 28, 2022 01:32 Inactive
@joshblack
joshblack temporarily deployed to github-pages October 31, 2022 15:29 Inactive
@nicolleromero

Copy link
Copy Markdown
ContributorAuthor

@joshblack Thanks for the review! Anything I need to do from my side to push the UI Tests along?

@joshblack

Copy link
Copy Markdown
Member

@nicolleromero you should be good! Our Chromatic plan seems to have hit it's limit so it's currently staying as pending 😞

@joshblack
joshblack merged commit 7ea92ab into mainOct 31, 2022
@joshblack
joshblack deleted the md-viewer-link-interception-fix branch October 31, 2022 17:51
@primer-cssprimer-css mentioned this pull request Oct 31, 2022
Sign up for freeto 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.

2 participants

@nicolleromero@joshblack