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: add support for text property in link fields #348

Merged
merged 21 commits into from
Sep 25, 2024
Merged

Conversation

levimykel
Copy link
Contributor

@levimykel levimykel commented Aug 14, 2024

Resolves: DT-2283
Sub-ticket of: DT-2259

Description

Adds support for the text property in link fields.

Checklist

  • 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

N/A

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.

@levimykel levimykel self-assigned this Aug 22, 2024
@levimykel levimykel marked this pull request as ready for review August 22, 2024 05:55
Copy link
Member

@lihbr lihbr left a comment

Choose a reason for hiding this comment

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

Let's tackle the one above or discuss it, otherwise I'm good with it :)

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.

Just a few small things, mainly surrounding the decision to not add allowText on content relationship fields.

src/types/value/contentRelationship.ts Show resolved Hide resolved
Comment on lines 99 to 109
/**
* Supports optional `text` property.
*/
expectType<prismic.CustomTypeModelContentRelationshipField>({
type: prismic.CustomTypeModelFieldType.Link,
config: {
label: "string",
select: prismic.CustomTypeModelLinkSelectType.Document,
},
})

Copy link
Member

Choose a reason for hiding this comment

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

⚠️ #issue: This test can be removed since we no longer check for the text property. This test is identical to the file's first expectType test.

…text-in-links

# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
@dani-mp dani-mp merged commit 9b0c72b into master Sep 25, 2024
26 checks passed
@dani-mp dani-mp deleted the lg/text-in-links branch September 25, 2024 16:18
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.

5 participants