-
Notifications
You must be signed in to change notification settings - Fork 5
添加配置页卡片拖拽排序 #29
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
添加配置页卡片拖拽排序 #29
Conversation
Deploying cnoi-statement-generator with
|
| Latest commit: |
91b821d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://41006ece.cnoi-statement-generator.pages.dev |
| Branch Preview URL: | https://feats-dragable-problem-card.cnoi-statement-generator.pages.dev |
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 drag-and-drop card movement animations to the configuration page by refactoring problem list management into a separate component and integrating the @dnd-kit library.
Key Changes:
- Extracted problem list rendering into a new
ProblemListcomponent with drag-and-drop support using @dnd-kit - Added new dependencies: @dnd-kit/core, @dnd-kit/sortable, @dnd-kit/modifiers, @dnd-kit/utilities, and @reactuses/core
- Refactored CSS to use top-level class selectors for responsive behavior instead of nested conditional classes
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/contestEditor/configPanel/problemList.tsx | New component implementing draggable problem cards with sort animations using @dnd-kit library |
| src/contestEditor/configPanel/index.tsx | Refactored to extract problem list logic into separate component and update CSS class application |
| src/contestEditor/configPanel/index.css | Restructured responsive styles to use parent-level class selectors for cleaner CSS architecture |
| package.json | Added @dnd-kit packages and @reactuses/core for drag-and-drop functionality |
| package-lock.json | Updated lockfile with new dependencies and their transitive dependencies |
Comments suppressed due to low confidence (1)
src/contestEditor/configPanel/index.tsx:310
- The
panelWidthprop is passed toProblemListbut is not defined in the component's props interface and is not used anywhere in the component. This prop should either be added to the component's type definition and used for responsive styling, or removed from this call.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.