feat(UI): rebuild new issue page & fix some problems#1172
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors and rebuilds the new issue page, addresses scrolling issues, and updates various UI components including icon colors and list filtering logic.
- Updated new issue page layout with new UI components and styling
- Fixed scrolling bug by restructuring page container and added ThemeProvider support
- Enhanced MR view filtering logic and updated status icon usage
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| moon/apps/web/pages/[org]/issue/new/index.tsx | Wrapped AppLayout in ThemeProvider/BaseStyles for consistent theming |
| moon/apps/web/package.json | Added new dependencies for Primer components and styled-components |
| moon/apps/web/next.config.js | Updated transpile packages to include @primer/react |
| moon/apps/web/components/MrView/index.tsx | Revised icon colors and updated member/assignee filtering in dropdown menus |
| moon/apps/web/components/Issues/utils/pickWithReflectDeep.ts | Added utility to extract specific properties via Reflect.get |
| moon/apps/web/components/Issues/utils/mergeDuplicate.ts | Added merge and deduplication function for action list items |
| moon/apps/web/components/Issues/utils/extractText.ts | Created a helper method to extract text from React nodes |
| moon/apps/web/components/Issues/IssuesContent.tsx | Refactored status icon logic and updated issue item rendering |
| moon/apps/web/components/Issues/IssueNewPage.tsx | Overhauled form layout using Primer’s FormControl and TextInput, and updated reaction picker handling |
Files not reviewed (1)
- moon/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
moon/apps/web/components/MrView/index.tsx:185
- Similar to the 'Author' branch, the filtering for 'Assignees' is based on sort['Assignees'] instead of using the selected member's id. Verify that this behavior is intended and consider filtering with the actual id from the selected item.
setMrList(mrList.filter((i) => i.link === sort['Assignees']))
| Author: '' | ||
| }) | ||
| } else { | ||
| setMrList(mrList.filter((i) => i.link === sort['Author'])) |
There was a problem hiding this comment.
The filtering logic for the 'Author' selection uses sort['Author'] as the filter criterion, which may be incorrect. Consider filtering based on the currently selected member's id (i.e. item.user.id) to ensure accurate results.
| setMrList(mrList.filter((i) => i.link === sort['Author'])) | |
| setMrList(mrList.filter((i) => i.user.id === sort['Author'])) |
| className='bg-[#1a7b36] text-[#fff]' | ||
| type={'submit'} | ||
| loading={loadings[3]} | ||
| // disabled={!title} |
There was a problem hiding this comment.
The submit button's disabled check for an empty title has been commented out. If preventing submissions with an empty title is required, please restore or adjust this validation.
| // disabled={!title} | |
| disabled={!title} |
重构new issue页面
修复new issue页面无法滚动bug
增加close/open列表项icon