-
Notifications
You must be signed in to change notification settings - Fork 18
[add] Activity page with Calendar & List #40
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
|
@TechQuery 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
TechQuery
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.
@copilot 所有纯文本都要做 i18n 翻译
Added comprehensive i18n translations for all hardcoded Chinese text in the activity page. All text now uses the t() function with proper translation keys across zh-CN, zh-TW, and en-US language files. |
…on feedback Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
TechQuery
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.
@copilot 接着改
All requested changes have been implemented:
The Activity page now features improved code quality, proper pagination, and better component reusability while maintaining all existing functionality. |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
This PR refactors the Activity page implementation (fix #24) based on comprehensive code review feedback, introducing significant architectural improvements:
Key Changes
Internationalization (i18n)
I18nContextandt()function patternCode Architecture & Reuse
getMarkdownListSortedByDate()utility function inpages/api/core.tsfor global reuse<UpcomingEvents />component<UpcomingEvents />component to support i18n translationsPagination Implementation
getStaticPaths()with[[...page]].tsxroutePackage Management
package-lock.jsonand switched to PNPM as the primary package managerpnpm-lock.yamlHTML Structure & Semantics
<hgroup>and<section>elementsTechnical Implementation
The calendar iframe integration remains unchanged, but the surrounding architecture is significantly improved:
The pagination structure allows for
/activity/,/activity/1,/activity/2, etc., with each page showing 10 activities sorted by date.Benefits
All existing functionality is preserved while significantly improving code quality and maintainability.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.