-
Notifications
You must be signed in to change notification settings - Fork 61
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(contentful-apps): Add organization parent subpage to link group link field #17143
feat(contentful-apps): Add organization parent subpage to link group link field #17143
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe pull request introduces significant modifications to the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
libs/cms/src/lib/generated/contentfulTypes.d.ts
is excluded by!**/generated/**
📒 Files selected for processing (2)
apps/contentful-apps/pages/fields/link-group-link-field.tsx
(6 hunks)libs/cms/src/lib/models/linkGroup.model.ts
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
libs/cms/src/lib/models/linkGroup.model.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
apps/contentful-apps/pages/fields/link-group-link-field.tsx (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (8)
apps/contentful-apps/pages/fields/link-group-link-field.tsx (6)
17-21
: Function getSubpageContentTypeIds
updated appropriately
The function now correctly returns an array of content type IDs to handle multiple subpage content types for 'organizationPage' and 'projectPage'.
28-28
: Updated subpageContentType
to support multiple content types
Changing subpageContentType
to an array reflects the need to handle multiple subpage content types, aligning with the updated logic.
165-166
: Conditional logic correctly includes new content type
The condition now checks for both organizationSubpage
and organizationParentSubpage
, ensuring that entries of the new type are handled appropriately.
221-221
: Safely retrieving content type IDs with getSubpageContentTypeIds
Using optional chaining when calling getSubpageContentTypeIds
ensures that the function handles undefined pageAbove
gracefully.
231-232
: Correctly configuring content types for entry selection
The contentTypes
array now includes both subpage content types and 'link'
, allowing users to select from all relevant content types.
250-250
: Combining subpage content types with link content type for selection
The selectableContentTypes
array is properly constructed to include all available content types for selection in the UI.
libs/cms/src/lib/models/linkGroup.model.ts (2)
11-11
: Imported IOrganizationParentSubpage
interface
Including IOrganizationParentSubpage
in the imports ensures that the new content type is recognized within this module.
36-36
: Extended LinkType
to include IOrganizationParentSubpage
Updating the LinkType
union type allows the module to handle entries of the new content type effectively.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17143 +/- ##
==========================================
- Coverage 35.73% 35.71% -0.03%
==========================================
Files 6926 6926
Lines 147689 147624 -65
Branches 42068 42056 -12
==========================================
- Hits 52776 52722 -54
+ Misses 94913 94902 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 31 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 11 Total Test Services: 0 Failed, 10 Passed Test ServicesThis report shows up to 10 services
|
…ent-subpage-to-link-group-link-field
…link field (#17143) * Add organizationParentPage as option for organizationPage menu links * Add organizationParentSubpage to link mapping * Add generated contentful types * Fix subpage type when generating organization subpage link * Minor fix after review --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Add organization parent subpage to link group link field
What
Screenshots / Gifs
Screencast.from.fim.5.des.2024.13.46.46.webm
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation