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

Update useLinkInterception to fix clickHandler #2493

Merged
merged 3 commits into from
Oct 31, 2022

Conversation

nicolleromero
Copy link
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 mperrotti October 28, 2022 01:23
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2022

🦋 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
Name Type
@primer/react Patch

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 Oct 28, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 78.13 KB (0%)
dist/browser.umd.js 78.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
Contributor Author

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

@joshblack
Copy link
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 main Oct 31, 2022
@joshblack joshblack deleted the md-viewer-link-interception-fix branch October 31, 2022 17:51
@primer-css primer-css mentioned this pull request Oct 31, 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.

None yet

2 participants