-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 드래그 앤 드롭 디테일한 기능 추가 및 디자인 요구사항 반영 #297
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b065a59
feat: dnd-kit/core 라이브러리 설치 #285 #296
rbgksqkr df1aa0a
design: Tooltip 위치 변경 #285 #296
rbgksqkr fee332a
refactor: overlay와 남아있는 요소 구분하여 스타일링 및 컨텐츠에 touch-action:none 추가 #285…
rbgksqkr 37ca79b
design: 툴팁 기준 박스 수정 #285 #296
rbgksqkr 2e02f41
feat: dnd-kit로 드래그 앤 드롭 기능 마이그레이션 #285 #296
rbgksqkr a37a863
refactor: props로 넘겨줬던 touchEvent 모두 제거하고 dndContext로 관리 #285 #296
rbgksqkr f67f17f
refactor: TimeBlockSection 컴포넌트 분리 #285 #296
rbgksqkr 60dabff
refactor: dragAndDrop 커스텀훅 분리 #285 #296
rbgksqkr 2d829d5
feat: PlanHeader sticky 설정 #285 #296
rbgksqkr 49adeb0
feat: 드래그앤드롭 후 0.5초 후 체크상태 반영 #285 #296
rbgksqkr 549adbf
design: 체크박스 업데이트 1초 후 반영 #296
rbgksqkr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
frontend/src/pages/PlanPage/components/PlanHeader/PlanHeader.styled.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const StickyHeader = styled.div` | ||
| position: sticky; | ||
| `; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
frontend/src/pages/PlanPage/components/TimeBlockContent/PlanContent/PlanContent.styled.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,9 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const PlanContent = styled.div` | ||
| position: relative; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 2.4rem; | ||
| padding-bottom: 8rem; | ||
| `; | ||
|
|
||
| export const TimeBlockSection = styled.section` | ||
| display: flex; | ||
| flex-direction: column; | ||
| padding: 0 2.4rem; | ||
| position: relative; | ||
| `; |
7 changes: 7 additions & 0 deletions
7
...nPage/components/TimeBlockContent/PlanContent/TimeBlockSection/TimeBlockSection.styled.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const TimeBlockSection = styled.section` | ||
| display: flex; | ||
| flex-direction: column; | ||
| padding: 0 2.4rem; | ||
| `; |
27 changes: 27 additions & 0 deletions
27
...end/src/pages/PlanPage/components/TimeBlockContent/PlanContent/TimeBlockSection/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { useDroppable } from '@dnd-kit/core'; | ||
|
|
||
| import * as S from './TimeBlockSection.styled'; | ||
|
|
||
| import { Path } from '@/api/plan'; | ||
|
|
||
| interface TimeBlockSectionProps { | ||
| path: Path; | ||
| children: React.ReactNode; | ||
| } | ||
|
|
||
| const TimeBlockSection = ({ path, children }: TimeBlockSectionProps) => { | ||
| const { setNodeRef } = useDroppable({ | ||
| id: path.pathId, | ||
| data: { | ||
| pathId: path.pathId, | ||
| }, | ||
| }); | ||
|
|
||
| return ( | ||
| <S.TimeBlockSection key={path.pathId} ref={setNodeRef}> | ||
| {children} | ||
| </S.TimeBlockSection> | ||
| ); | ||
| }; | ||
|
|
||
| export default TimeBlockSection; |
192 changes: 59 additions & 133 deletions
192
frontend/src/pages/PlanPage/components/TimeBlockContent/PlanContent/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🛠️ Refactor suggestion
Consider consolidating duplicate StickyHeader components.
This StickyHeader component is identical to the one in
frontend/src/pages/PlanPage/PlanPage.styled.ts(lines 10-12). Consider creating a shared styled component to avoid duplication and potential inconsistencies.Consider moving the shared StickyHeader to a common styled components file:
Then import it in both files that need it.
🤖 Prompt for AI Agents