-
Notifications
You must be signed in to change notification settings - Fork 0
Feat(cms)/add home types #47
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
Conversation
WalkthroughThis pull request introduces several new content types and components for the CMS backend, focusing on home page sections such as case studies, get in touch, how Kleros works, learn posts, and start earning. The changes involve creating JSON schema files, controllers, routes, and services for each section using Strapi's framework. Additionally, two new components (LinkCard and Introduction) are added to support the content structure. These modifications enhance the CMS's ability to manage and organize home page content with a consistent and structured approach. Changes
Possibly related PRs
Suggested reviewers
Poem
🪧 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
CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-website-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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: 6
🧹 Nitpick comments (15)
cms-backend/src/api/home-get-in-touch-section/routes/home-get-in-touch-section.ts (1)
1-3: Enhance documentation with usage examplesWhile the documentation is present, consider adding examples of available routes and their purposes to improve developer experience.
Add usage examples like:
/** * home-get-in-touch-section router + * + * Available routes: + * - GET /api/home-get-in-touch-section + * - PUT /api/home-get-in-touch-section + * - DELETE /api/home-get-in-touch-section */cms-backend/src/api/home-get-in-touch-section/services/home-get-in-touch-section.ts (1)
1-3: Enhance service documentation with available operationsWhile the documentation is present, consider adding examples of available service operations to improve maintainability.
Add operation examples like:
/** * home-get-in-touch-section service + * + * Available operations: + * - find: Retrieve the section content + * - update: Update the section content + * - delete: Delete the section content */cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json (2)
31-36: Restrict media types for icon fieldThe icon field allows all media types (images, files, videos, audios) which seems too permissive for what should typically be an image icon.
Consider restricting to images only:
"allowedTypes": [ - "images", - "files", - "videos", - "audios" + "images" ],
14-20: Add string length validation for text fieldsConsider adding max length constraints for the text fields to prevent overly long content that might affect UI layout.
Add maxLength validation:
"title": { "type": "string", - "required": true + "required": true, + "maxLength": 100 }, "subtitle": { - "type": "string" + "type": "string", + "maxLength": 200 }, ... "cta_text": { "type": "string", - "required": true + "required": true, + "maxLength": 50 },Also applies to: 26-29
cms-backend/src/api/home-how-kleros-works-section/routes/home-how-kleros-works-section.ts (1)
1-3: Enhance documentation with endpoint details.Consider adding more detailed documentation that describes the available endpoints and their purposes.
/** * home-how-kleros-works-section router + * + * Available endpoints: + * - GET /api/home-how-kleros-works-section + * - POST /api/home-how-kleros-works-section + * - PUT /api/home-how-kleros-works-section + * - DELETE /api/home-how-kleros-works-section */cms-backend/src/api/home-how-kleros-works-section/controllers/home-how-kleros-works-section.ts (1)
1-3: Enhance documentation with controller functionality.Consider adding more detailed documentation that describes the available controller actions.
/** * home-how-kleros-works-section controller + * + * Standard Strapi controller providing: + * - find: Get the single type entry + * - update: Update the single type entry + * - delete: Delete the single type entry + * - create: Create a single type entry if none exists */cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json (3)
26-36: Consider restricting media types for explainer field.The explainer field currently accepts all media types (images, files, videos, audios). Consider restricting it to only the required types based on the actual use case to prevent incorrect media uploads.
"explainer": { "allowedTypes": [ - "images", - "files", - "videos", - "audios" + "images", + "videos" ], "type": "media", "multiple": false, "required": true }
14-25: Add validation rules and descriptions for text fields.The string fields (label, title, subtitle) would benefit from additional validation rules and descriptions to guide content editors.
"label": { "type": "string", - "required": true + "required": true, + "minLength": 2, + "maxLength": 50, + "description": "Short identifier for the section" }, "title": { "type": "string", - "required": true + "required": true, + "minLength": 5, + "maxLength": 100, + "description": "Main heading of the section" }, "subtitle": { "type": "string", - "required": true + "required": true, + "minLength": 10, + "maxLength": 200, + "description": "Supporting text below the title" },
4-8: Consider adding i18n support.If the website needs to support multiple languages in the future, consider enabling internationalization for this content type.
"info": { "singularName": "home-how-kleros-works-section", "pluralName": "home-how-kleros-works-sections", - "displayName": "HomeHowKlerosWorksSection" + "displayName": "HomeHowKlerosWorksSection", + "description": "Configure the How Kleros Works section of the homepage" }, + "pluginOptions": { + "i18n": { + "localized": true + } + },cms-backend/src/api/home-learn-posts-section/routes/home-learn-posts-section.ts (1)
1-3: Enhance documentation with available routes.Consider expanding the JSDoc comment to document the available routes that Strapi's core router will generate (e.g., GET, POST, PUT, DELETE endpoints).
/** * home-learn-posts-section router + * + * Generated routes: + * - GET /api/home-learn-posts-section + * - POST /api/home-learn-posts-section + * - PUT /api/home-learn-posts-section + * - DELETE /api/home-learn-posts-section */cms-backend/src/api/home-learn-posts-section/services/home-learn-posts-section.ts (1)
1-3: Enhance documentation with available service methods.Consider expanding the JSDoc comment to document the available service methods that Strapi's core service will generate.
/** * home-learn-posts-section service + * + * Available methods: + * - find + * - findOne + * - create + * - update + * - delete */cms-backend/src/api/home-learn-posts-section/controllers/home-learn-posts-section.ts (1)
1-3: Enhance documentation with available controller actions.Consider expanding the JSDoc comment to document the available controller actions that Strapi's core controller will generate.
/** * home-learn-posts-section controller + * + * Available actions: + * - find: GET /api/home-learn-posts-section + * - findOne: GET /api/home-learn-posts-section/:id + * - create: POST /api/home-learn-posts-section + * - update: PUT /api/home-learn-posts-section/:id + * - delete: DELETE /api/home-learn-posts-section/:id */cms-backend/src/api/home-start-earning-section/services/home-start-earning-section.ts (1)
1-3: Enhance documentation with available service methods.Consider expanding the JSDoc comment to document the available service methods that Strapi's core service will generate.
/** * home-start-earning-section service + * + * Available methods: + * - find + * - findOne + * - create + * - update + * - delete */cms-backend/src/components/home-page/card.json (1)
17-26: Consider restricting icon media typesThe icon field currently accepts all media types including files, videos, and audios. Since this is a card component, consider restricting to only images for consistency in UI rendering.
"allowedTypes": [ - "images", - "files", - "videos", - "audios" + "images" ],cms-backend/src/api/home-learn-posts-section/content-types/home-learn-posts-section/schema.json (1)
18-20: Consider using rich text for subtitleFor better content formatting capabilities, consider using
richtexttype instead ofstringfor the subtitle field."subtitle": { - "type": "string" + "type": "richtext" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
cms-backend/types/generated/components.d.tsis excluded by!**/generated/**cms-backend/types/generated/contentTypes.d.tsis excluded by!**/generated/**
📒 Files selected for processing (25)
cms-backend/src/api/blog-post/content-types/blog-post/schema.json(1 hunks)cms-backend/src/api/blog-post/controllers/blog-post.ts(1 hunks)cms-backend/src/api/blog-post/routes/blog-post.ts(1 hunks)cms-backend/src/api/blog-post/services/blog-post.ts(1 hunks)cms-backend/src/api/home-case-studies-section/content-types/home-case-studies-section/schema.json(1 hunks)cms-backend/src/api/home-case-studies-section/controllers/home-case-studies-section.ts(1 hunks)cms-backend/src/api/home-case-studies-section/routes/home-case-studies-section.ts(1 hunks)cms-backend/src/api/home-case-studies-section/services/home-case-studies-section.ts(1 hunks)cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json(1 hunks)cms-backend/src/api/home-get-in-touch-section/controllers/home-get-in-touch-section.ts(1 hunks)cms-backend/src/api/home-get-in-touch-section/routes/home-get-in-touch-section.ts(1 hunks)cms-backend/src/api/home-get-in-touch-section/services/home-get-in-touch-section.ts(1 hunks)cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json(1 hunks)cms-backend/src/api/home-how-kleros-works-section/controllers/home-how-kleros-works-section.ts(1 hunks)cms-backend/src/api/home-how-kleros-works-section/routes/home-how-kleros-works-section.ts(1 hunks)cms-backend/src/api/home-how-kleros-works-section/services/home-how-kleros-works-section.ts(1 hunks)cms-backend/src/api/home-learn-posts-section/content-types/home-learn-posts-section/schema.json(1 hunks)cms-backend/src/api/home-learn-posts-section/controllers/home-learn-posts-section.ts(1 hunks)cms-backend/src/api/home-learn-posts-section/routes/home-learn-posts-section.ts(1 hunks)cms-backend/src/api/home-learn-posts-section/services/home-learn-posts-section.ts(1 hunks)cms-backend/src/api/home-start-earning-section/content-types/home-start-earning-section/schema.json(1 hunks)cms-backend/src/api/home-start-earning-section/controllers/home-start-earning-section.ts(1 hunks)cms-backend/src/api/home-start-earning-section/routes/home-start-earning-section.ts(1 hunks)cms-backend/src/api/home-start-earning-section/services/home-start-earning-section.ts(1 hunks)cms-backend/src/components/home-page/card.json(1 hunks)
✅ Files skipped from review due to trivial changes (10)
- cms-backend/src/api/home-get-in-touch-section/controllers/home-get-in-touch-section.ts
- cms-backend/src/api/blog-post/controllers/blog-post.ts
- cms-backend/src/api/home-case-studies-section/services/home-case-studies-section.ts
- cms-backend/src/api/blog-post/routes/blog-post.ts
- cms-backend/src/api/home-case-studies-section/controllers/home-case-studies-section.ts
- cms-backend/src/api/home-start-earning-section/controllers/home-start-earning-section.ts
- cms-backend/src/api/blog-post/services/blog-post.ts
- cms-backend/src/api/home-case-studies-section/routes/home-case-studies-section.ts
- cms-backend/src/api/home-start-earning-section/routes/home-start-earning-section.ts
- cms-backend/src/api/home-how-kleros-works-section/services/home-how-kleros-works-section.ts
🔇 Additional comments (8)
cms-backend/src/api/home-get-in-touch-section/routes/home-get-in-touch-section.ts (1)
5-7: LGTM! Implementation follows Strapi's best practicesThe router implementation correctly uses Strapi's factory pattern and follows naming conventions.
cms-backend/src/api/home-get-in-touch-section/services/home-get-in-touch-section.ts (1)
5-7: LGTM! Service implementation follows best practicesThe service implementation correctly uses Strapi's factory pattern and aligns with the router implementation.
cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json (1)
1-41: LGTM! Schema structure follows Strapi conventionsThe overall schema structure is well-organized and follows Strapi's content type conventions. The use of
singleTypeis appropriate for a unique section, and the relationships are properly defined.cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json (1)
1-38: LGTM on the overall structure!The schema follows Strapi's best practices for single type content structures. The use of
draftAndPublishis appropriate for managing content updates.cms-backend/src/api/home-learn-posts-section/routes/home-learn-posts-section.ts (1)
5-7: LGTM!The implementation follows Strapi's recommended pattern using the factory method to create core router functionality.
cms-backend/src/api/home-learn-posts-section/services/home-learn-posts-section.ts (1)
5-7: LGTM!The implementation follows Strapi's recommended pattern using the factory method to create core service functionality.
cms-backend/src/api/home-learn-posts-section/controllers/home-learn-posts-section.ts (1)
5-7: LGTM!The implementation follows Strapi's recommended pattern using the factory method to create core controller functionality.
cms-backend/src/api/home-start-earning-section/services/home-start-earning-section.ts (1)
5-7: LGTM!The implementation follows Strapi's recommended pattern using the factory method to create core service functionality.
| "url": { | ||
| "type": "string" | ||
| } |
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.
🛠️ Refactor suggestion
Add URL validation
The URL field should include pattern validation to ensure valid URLs are entered.
"url": {
"type": "string"
+ "regex": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$"
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "url": { | |
| "type": "string" | |
| } | |
| "url": { | |
| "type": "string", | |
| "regex": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$" | |
| } |
| "subtitle": { | ||
| "type": "text", | ||
| "required": false | ||
| }, |
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.
🛠️ Refactor suggestion
Maintain consistency in subtitle field type
The subtitle field uses text type while other sections use string. Consider using the same type across all sections for consistency.
"subtitle": {
- "type": "text",
- "required": false
+ "type": "richtext"
}Committable suggestion skipped: line range outside the PR's diff.
| "Cards": { | ||
| "type": "component", | ||
| "repeatable": true, | ||
| "component": "home-page.card" | ||
| }, |
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.
🛠️ Refactor suggestion
Follow consistent field naming convention
The Cards field name starts with an uppercase letter, which is inconsistent with JavaScript/JSON conventions. Consider renaming to cards.
- "Cards": {
+ "cards": {
"type": "component",
"repeatable": true,
"component": "home-page.card"
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "Cards": { | |
| "type": "component", | |
| "repeatable": true, | |
| "component": "home-page.card" | |
| }, | |
| "cards": { | |
| "type": "component", | |
| "repeatable": true, | |
| "component": "home-page.card" | |
| }, |
| "cta": { | ||
| "type": "component", | ||
| "repeatable": true, | ||
| "component": "content.section" | ||
| } |
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.
💡 Codebase verification
CTA should not be repeatable
The codebase consistently uses single CTAs in sections, and this appears to be the only instance of a repeatable CTA. The suggested change to make it non-repeatable aligns with both the codebase patterns and UI best practices.
🔗 Analysis chain
Verify CTA repeatability requirement
The cta component is marked as repeatable. Typically, a section would have a single call-to-action. Please verify if multiple CTAs are intended.
"cta": {
"type": "component",
- "repeatable": true,
+ "repeatable": false,
"component": "content.section"
}🏁 Scripts executed
The following scripts were executed for the analysis:
Error: No shell scripts found
Script:
#!/bin/bash
# Find all schema files in the cms-backend
fd schema.json --type f
# Look for other occurrences of CTA fields
rg -A 3 '"cta":\s*{' --type json
# Find the component definition for content.section
fd section.json --type f
Length of output: 4935
Script:
#!/bin/bash
# Check the content.section component definition
cat cms-backend/src/components/content/section.json
# Search for CTA fields with fixed regex
rg -A 3 '"cta"' --type json
# Look for similar section schemas
cat cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json
Length of output: 1829
| "type": "string", | ||
| "required": false | ||
| } | ||
| } |
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.
🛠️ Refactor suggestion
Add essential blog post fields
The schema is missing common blog post fields. Consider adding:
content(richtext): The main blog contentauthor(relation): Link to user/authorpublishDate(datetime): Explicit publish datetags(relation): Blog post categories/tags
+ "content": {
+ "type": "richtext",
+ "required": true
+ },
+ "author": {
+ "type": "relation",
+ "relation": "manyToOne",
+ "target": "plugin::users-permissions.user"
+ },
+ "publishDate": {
+ "type": "datetime"
+ },
+ "tags": {
+ "type": "relation",
+ "relation": "manyToMany",
+ "target": "api::tag.tag"
+ }Committable suggestion skipped: line range outside the PR's diff.
| "url": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "urlName": { | ||
| "type": "string", | ||
| "required": false | ||
| } |
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.
🛠️ Refactor suggestion
Clarify URL field strategy
The schema has both url and urlName fields which seem redundant. Consider:
- Using a single field for the URL
- Generating the URL from the title using a slug transform
- "url": {
- "type": "string",
- "required": true
- },
- "urlName": {
- "type": "string",
- "required": false
- }
+ "slug": {
+ "type": "uid",
+ "targetField": "title"
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "url": { | |
| "type": "string", | |
| "required": true | |
| }, | |
| "urlName": { | |
| "type": "string", | |
| "required": false | |
| } | |
| "slug": { | |
| "type": "uid", | |
| "targetField": "title" | |
| } |
| "subtitle": { | ||
| "type": "string" | ||
| }, | ||
| "link": { |
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.
the Button/ArrowLink component combines both link and text , maybe use that here 🤔
so, combine "link" and "cta_text" to button/arrowLink, single component
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "explainer": { |
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.
I think we would require, two explainer Icons , one for Desktop and one for Mobile
| "subtitle": { | ||
| "type": "string" | ||
| }, | ||
| "blog_posts": { |
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.
If this is for the Decentralised Justice section 🤔
I would recommend making a LearnCard (or some other name) component instead of using BlogPost collection type, and use Button/ArrowLink component in that component. For example, the Yellow Paper link is already available in Link types, we would not want to re-specify it in blog post 🤔
wdyt
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.
Also , I think we are missing type for this component 🤔
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.
makes sense 🤔
| "subtitle": { | ||
| "type": "string" | ||
| }, | ||
| "Cards": { |
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.
like this for above, we are doing something similar with other pages too, which have these cards
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: 1
♻️ Duplicate comments (1)
cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json (1)
27-37: 🛠️ Refactor suggestionRename fields and make desktop version required
Based on the previous review comment about requiring two explainer icons, consider these improvements:
- Rename fields to be more explicit about their purpose:
explainer→explainer_mobileexplainer_desktop→ (keep as is)- Make
explainer_desktoprequired since it's a necessary companion to the mobile versionApply this diff:
- "explainer": { + "explainer_mobile": { "type": "media", "multiple": false, "required": true, "allowedTypes": [ "images", "files", "videos", "audios" ] }, "explainer_desktop": { "allowedTypes": [ "images", "files", "videos", "audios" ], "type": "media", - "multiple": false + "multiple": false, + "required": true }Also applies to: 38-47
🧹 Nitpick comments (5)
cms-backend/src/api/home-learn-posts-section/content-types/home-learn-posts-section/schema.json (2)
4-9: Add a descriptive summary in the description field.Consider adding a clear description that explains the purpose and usage of this section (e.g., "Manages the learn posts section content displayed on the home page").
"info": { "singularName": "home-learn-posts-section", "pluralName": "home-learn-posts-sections", "displayName": "HomeLearnPostsSection", - "description": "" + "description": "Manages the learn posts section content displayed on the home page, including title, subtitle, and associated cards." },
14-33: Consider adding field validation constraints.To ensure data integrity and consistent content structure, consider adding validation constraints:
"title": { "type": "string", - "required": true + "required": true, + "minLength": 1, + "maxLength": 100 }, "subtitle": { - "type": "string" + "type": "string", + "maxLength": 200 },Additionally, consider adding a minimum items constraint for the cards to ensure at least one card is present:
"cards": { "type": "component", "repeatable": true, - "component": "content.link-card" + "component": "content.link-card", + "min": 1 },cms-backend/src/components/content/link-card.json (3)
3-6: Add a description for better documentation.The empty description field should be populated to help content editors and developers understand the purpose and usage of this component.
"info": { "displayName": "LinkCard", - "description": "" + "description": "A card component with an icon, title, subtitle, and a clickable link, used for displaying interactive content in sections like home-learn-posts." },
9-19: Restrict media types and consider making icon required.For a LinkCard component:
- Consider restricting media types to only images for consistent UI
- Consider making the icon required if it's essential for the card's visual identity
"icon": { "type": "media", "multiple": false, - "required": false, + "required": true, "allowedTypes": [ - "images", - "files", - "videos", - "audios" + "images" ] },
20-26: Add max length validation for text fields.Consider adding maximum length constraints to prevent overly long text that could break the UI layout.
"title": { "type": "string", - "required": true + "required": true, + "maxLength": 100 }, "subtitle": { - "type": "string" + "type": "string", + "maxLength": 200 },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
cms-backend/types/generated/components.d.tsis excluded by!**/generated/**cms-backend/types/generated/contentTypes.d.tsis excluded by!**/generated/**
📒 Files selected for processing (7)
cms-backend/src/api/home-case-studies-section/content-types/home-case-studies-section/schema.json(1 hunks)cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json(1 hunks)cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json(1 hunks)cms-backend/src/api/home-learn-posts-section/content-types/home-learn-posts-section/schema.json(1 hunks)cms-backend/src/api/home-start-earning-section/content-types/home-start-earning-section/schema.json(1 hunks)cms-backend/src/components/content/link-card.json(1 hunks)cms-backend/src/components/home/introduction.json(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- cms-backend/src/components/home/introduction.json
🚧 Files skipped from review as they are similar to previous changes (3)
- cms-backend/src/api/home-get-in-touch-section/content-types/home-get-in-touch-section/schema.json
- cms-backend/src/api/home-case-studies-section/content-types/home-case-studies-section/schema.json
- cms-backend/src/api/home-start-earning-section/content-types/home-start-earning-section/schema.json
🔇 Additional comments (3)
cms-backend/src/api/home-learn-posts-section/content-types/home-learn-posts-section/schema.json (1)
27-32: Verify if this addresses the missing Figma component.Based on the previous review comments, there was a missing component from the Figma design. Please verify if the
home.introductioncomponent addresses this requirement.cms-backend/src/api/home-how-kleros-works-section/content-types/home-how-kleros-works-section/schema.json (1)
1-13: Content type configuration looks good!The schema follows Strapi's best practices with appropriate naming conventions and content management options.
cms-backend/src/components/content/link-card.json (1)
27-31: Verify the button-link component dependency.The link field references
content.button-linkcomponent. Let's verify this dependency exists.✅ Verification successful
Dependency verification successful
The referenced
content.button-linkcomponent exists at the expected location.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the referenced button-link component exists fd --type f "button-link.json" cms-backend/src/components/content/Length of output: 118
| "allowedTypes": [ | ||
| "images", | ||
| "files", | ||
| "videos", | ||
| "audios" | ||
| ] |
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.
🛠️ Refactor suggestion
Restrict media types to images only
Since these fields are intended for explainer icons, they should only accept image files. The current configuration allows unnecessary media types like files, videos, and audios.
Apply this diff to both media fields:
"allowedTypes": [
- "images",
- "files",
- "videos",
- "audios"
+ "images"
]Also applies to: 39-44
tractorss
left a comment
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.
lgtm
Summary by CodeRabbit
New Content Types
New Components
LinkCardcomponentIntroductioncomponent with heading, link, and closing textBackend Infrastructure