Refactor: Centralize nested description reorder logic from ExperienceSection to useSectionManagement
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 15
- Merge trung bình
- 7 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
The reorder logic for nested description bullet points in ExperienceSection is implemented directly within the component (lines 230-242). This could be centralized in the useSectionManagement hook for cleaner separation of concerns.
Note: Entry-level reordering already uses the clean onReorderEntry callback pattern. This issue is specific to the nested description bullets within each experience entry.
Proposed Improvement
Introduce a specific callback prop for nested description reordering: onDescriptionReorder?: (experienceIndex: number, oldIndex: number, newIndex: number) => void
The parent hook (useSectionManagement) would encapsulate the state update logic, keeping ExperienceSection more presentational.
Scope
- Affected: ExperienceSection.tsx only
- Not affected: EducationSection.tsx (no nested draggables - already uses clean pattern)
Benefits
- Centralizes state management in hooks
- Makes components more presentational
- Creates a reusable pattern if future sections need nested draggables
References
- PR #205 review comment from gemini-code-assist
- File: resume-builder-ui/src/components/ExperienceSection.tsx (lines 230-242)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.