feat: add template related in detail (T1389)#2323
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a "related templates" feature to the template detail view, allowing users to discover and navigate to similar templates while viewing template details. The implementation includes new i18n translations, a new RecommendTemplate component, and updates to the template navigation flow.
Key changes:
- Introduces a
RecommendTemplatecomponent that displays 3 featured templates at the bottom of template detail pages - Adds template-to-template navigation capability via
onTemplateClickcallback prop - Improves
TemplatePreviewloading state handling with URL-based effect triggers - Implements smooth scroll-to-top behavior when switching between templates
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/common-i18n/src/locales/en/common.json | Adds English translations for "Related Templates" and "No image" |
| packages/common-i18n/src/locales/zh/common.json | Adds Chinese translations for related templates feature |
| apps/nestjs-backend/src/types/i18n.generated.ts | Updates generated TypeScript types for new translation keys |
| apps/nextjs-app/src/features/app/components/space/template/RecommendTemplate.tsx | New component that fetches and displays 3 featured templates with click handling |
| apps/nextjs-app/src/features/app/components/space/template/TemplateDetail.tsx | Integrates RecommendTemplate component and adds scroll-to-top behavior with refs |
| apps/nextjs-app/src/features/app/components/space/template/TemplatePreview.tsx | Refactors URL computation and adds useEffect to reset loading state on URL changes |
| apps/nextjs-app/src/features/app/components/space/template/TemplateSheet.tsx | Passes onTemplateClick callback to TemplateDetail for navigation |
| apps/nextjs-app/src/features/app/components/space/template/TemplateModal.tsx | Adds animated width transition and passes onTemplateClick callback |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
🧹 Preview Environment Cleanup
|
Collaborator
Pull Request Test Coverage Report for Build 20451049725Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues: T1389