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 repeatable links #66

Merged
merged 14 commits into from
Dec 5, 2024
Merged

feat: support repeatable links #66

merged 14 commits into from
Dec 5, 2024

Conversation

dani-mp
Copy link
Collaborator

@dani-mp dani-mp commented Nov 11, 2024

Resolves:
https://linear.app/prismic/issue/DT-2426/aauser-in-slice-machine-when-i-create-a-new-link-with-repeat-property

Description

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@dani-mp dani-mp force-pushed the dani/repeatable-links branch from b439e7e to 2c63793 Compare November 11, 2024 14:06
@@ -164,13 +165,19 @@ function buildFieldProperty(
}

case "media": {
code = addLine(`${name}: prismic.LinkToMediaField;`, code);
code = addLine(
`${name}: prismic.LinkToMediaField${repeatableSuffix};`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

❓ Are we supporting this?

@dani-mp dani-mp force-pushed the dani/repeatable-links branch from e5c592f to ff57bc4 Compare November 28, 2024 11:59
break;
}

default: {
code = addLine(`${name}: prismic.LinkField;`, code);
const type = args.field.config?.repeat
? "prismic.Repeatable<LinkField>"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
? "prismic.Repeatable<LinkField>"
? "prismic.Repeatable<prismic.LinkField>"

@dani-mp dani-mp force-pushed the dani/repeatable-links branch from 7dff467 to 467edf7 Compare November 29, 2024 10:18
@dani-mp dani-mp merged commit 1c682dd into main Dec 5, 2024
10 checks passed
@dani-mp dani-mp deleted the dani/repeatable-links branch December 5, 2024 12:20
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