feat(fe): remove sidebar and implement course tabs#3505
feat(fe): remove sidebar and implement course tabs#3505
Conversation
- 코스 상세 페이지 내 사이드바 컴포넌트 제거 - 사이드바 제거에 따른 메인 컨텐츠 레이아웃 조정 - 제거한 사이드바에 있던 컴포넌트를 course 페이지의 tab으로 구현
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the frontend course management interface by removing the secondary course-specific sidebar and introducing a new tab-based navigation system within a dedicated course detail layout. This change aims to provide a more intuitive and consistent user experience for navigating course-related content, centralizing common UI elements and improving the overall visual presentation of the administrative pages. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant UI and structural changes across the admin section of the frontend application. Key updates include a complete redesign of the ManagementSidebar with updated animation logic and styling, and the removal of the 'Course Sidebar'. Data table components (DataTablePagination, DataTableRoot, DataTableSearchBar) received extensive styling and layout adjustments. A new course/[courseId]/layout.tsx was added to provide a consistent header and tab navigation for course-specific pages, leading to the removal of redundant titles and 'Create' buttons from assignment/page.tsx, exercise/page.tsx, and user/page.tsx. The GroupTable and AssignmentTable components were refactored to integrate search and action buttons more effectively. Additionally, the DuplicateCourseButton was updated to use an inline GraphQL mutation definition. Review feedback points out a Tailwind CSS syntax error, suggests optimizing a GraphQL query for efficiency, recommends simplifying a redundant CSS class condition, raises a maintainability concern about inline GraphQL mutations, and advises against using fractional pixel values in Tailwind CSS for better UI consistency.
| 'mb-6 flex items-center justify-center', | ||
| isMainSidebarExpanded ? 'w-full' : 'w-full' |
There was a problem hiding this comment.
gemini가 잘 써줬네요ㅋㅋ 필요 없는 삼항 연산자는 없애주세요~
| const [duplicateCourse] = useMutation< | ||
| unknown, | ||
| { | ||
| groupId: number | ||
| input: { | ||
| classNum: number | ||
| courseNum: string | ||
| semester: string | ||
| } | ||
| } | ||
| >(gql` | ||
| mutation duplicateCourseRemote( | ||
| $groupId: Int! | ||
| $input: DuplicateCourseInput! | ||
| ) { | ||
| duplicateCourse(groupId: $groupId, input: $input) { | ||
| duplicatedCourse { | ||
| id | ||
| groupName | ||
| } | ||
| } | ||
| } | ||
| `) |
There was a problem hiding this comment.
eslint-disable-next-line no-restricted-imports를 사용하여 gql을 직접 임포트하고 컴포넌트 내에 GraphQL 뮤테이션을 인라인으로 정의하고 있습니다. 이는 중앙에서 관리되는 graphql/course/mutation.ts 파일의 DUPLICATE_COURSE와 로직이 분리되어 코드 중복 및 유지보수의 어려움을 야기할 수 있습니다.
가능하다면 중앙의 DUPLICATE_COURSE 뮤테이션을 사용하거나 필요한 필드를 추가하여 업데이트하는 것을 권장합니다. 만약 이 컴포넌트에서만 특별히 다른 필드셋이 필요하다면, 그 이유를 주석으로 남겨두는 것이 좋겠습니다.
|
✅ Syncing Preview App Succeeded Application: |
| } | ||
| } | ||
| } | ||
| `) |
| { name: 'Exercise', href: `/admin/course/${courseId}/exercise` } | ||
| ] | ||
|
|
||
| const activeTabName = `${tabs.find((tab) => pathname === tab.href)?.name || 'Home'} LIST` |
There was a problem hiding this comment.
Home 은 Home LIST 대신 Home으로만 나오게 하는 게 어떨까요?
| /> | ||
| </Link> | ||
| )} | ||
| </div> |
There was a problem hiding this comment.
사이드바에 구분선 (Seperator) 사라진 거 같아요! 추가 부탁드립니다
|
|
||
| const currentCourse = data?.getCoursesUserLead?.find( | ||
| (course: { id: string | number }) => String(course.id) === String(courseId) | ||
| ) |
There was a problem hiding this comment.
Course Id 만 인자로 받아서 개별 강의의 정보를 가져오는 graphql이 이미 정의되어 있을 거예요~ 한번 찾아보시고 get courses user lead 대신 다른 걸 사용해주세요! 못 찾으시겠으면 콜하셔도 돼여
| 'mb-6 flex items-center justify-center', | ||
| isMainSidebarExpanded ? 'w-full' : 'w-full' |
There was a problem hiding this comment.
gemini가 잘 써줬네요ㅋㅋ 필요 없는 삼항 연산자는 없애주세요~
| <div className="mx-auto w-full pb-[71px] pl-[86px] pr-[106px] pt-[80px]"> | ||
| <div className="w-full"> | ||
| <h1 className="text-[28px] font-bold uppercase leading-[130%] tracking-[-0.84px] text-black"> | ||
| {activeTabName} |
| className={cn( | ||
| 'relative flex h-[40px] w-[285.5px] items-center justify-center pb-4 text-sm font-semibold transition-colors', | ||
| isActive | ||
| ? 'text-blue-500 after:absolute after:bottom-[-1px] after:left-0 after:h-[2px] after:w-full after:bg-blue-500' |
There was a problem hiding this comment.
text-blue-500 은 탭 활성됐을 때 텍스트죠? text-primary나 text-color-primary 둘 중 하나로 바꿔주세요! 둘중 뭐더라,,


closes TAS-2568