-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add template related in detail (T1389) #2323
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
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.
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.
apps/nextjs-app/src/features/app/components/space/template/TemplateDetail.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/TemplateDetail.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/TemplateDetail.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/RecommendTemplate.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/RecommendTemplate.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/TemplatePreview.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/TemplateModal.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/RecommendTemplate.tsx
Show resolved
Hide resolved
apps/nextjs-app/src/features/app/components/space/template/RecommendTemplate.tsx
Show resolved
Hide resolved
🧹 Preview Environment Cleanup
|
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 |
Related Issues: T1389