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: support link text #95

Merged
merged 12 commits into from
Sep 27, 2024
Merged

feat: support link text #95

merged 12 commits into from
Sep 27, 2024

Conversation

xrutayisire
Copy link
Collaborator

Resolves DT-2272

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

  • Support link text

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

Copy link
Member

@angeloashmore angeloashmore 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 linked to a few suggestions from the @prismicio/react PR (prismicio/prismic-react#205).

Like the @prismicio/react PR, I'm going to mark the PR as "Request changes" because we should publish @prismicio/client first and update the version here before merging. Let me know if you'd like to handle that a different way though.

src/PrismicNextLink.tsx Outdated Show resolved Hide resolved

return (
<Link ref={ref} {...attrs} {...restProps} href={href} rel={rel}>
{children || text}
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Replied there 🙂

Copy link
Member

Choose a reason for hiding this comment

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

Once we resolve the conversation there, I will approve this PR. 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 👍

test/PrismicNextLink.test.tsx Outdated Show resolved Hide resolved
test/PrismicNextLink.test.tsx Outdated Show resolved Hide resolved
test/PrismicNextLink.test.tsx Outdated Show resolved Hide resolved
@angeloashmore
Copy link
Member

@xrutayisire The test was failing because the xru/support-link-text branch was not up to date with main. It was missing a fix @levimykel and I made here: 05510c9

I knew I had seen the error before! 😄

@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.54%. Comparing base (c4e1b7f) to head (63c37db).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/PrismicNextLink.tsx 42.85% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   83.31%   83.54%   +0.22%     
==========================================
  Files          14       14              
  Lines        1019     1021       +2     
  Branches       73       74       +1     
==========================================
+ Hits          849      853       +4     
+ Misses        170      168       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@angeloashmore angeloashmore 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!

Copy link
Member

@angeloashmore angeloashmore 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!

@@ -49,7 +49,7 @@ it("creates a redirect with the request's preferred locale", async () => {

mockGetRepository({
client,
languages: [{ id: "fr-fr", name: "French (France)" }],
languages: [{ id: "fr-fr", name: "French (France)", is_master: true }],
Copy link
Member

Choose a reason for hiding this comment

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

🎉 #nice: Thanks for updating these tests.

@dani-mp dani-mp merged commit 0e4ce07 into main Sep 27, 2024
24 checks passed
@dani-mp dani-mp deleted the xru/support-link-text branch September 27, 2024 12:08
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.

4 participants