Skip to content
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

[시간표] 시간 자동 조정 기능 #494

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

Gwak-Seungju
Copy link
Contributor

@Gwak-Seungju Gwak-Seungju commented Sep 19, 2024

What is this PR? 🔍

Changes 📝

  • 윈도우 환경에서 버튼 내 글자가 깨지는 부분을 수정했습니다.
  • 일부 드롭다운 펼칠 시 downArrow 이미지가 어색한 부분을 수정했습니다.
  • 종료 시간을 24시 00분 까지 선택 가능하게 했습니다.
  • 시작 시간이 12:00인데 종료 시간을 10:00로 선택하는 경우와 같이 올바르지 않은 시간을 선택하는 경우 자동으로 시간 조정이 되도록 했습니다. 올바르지 않은 시간을 선택하는 경우 선택한 시간에서 +1시간 혹은 -1시간을 하여 자동 조정해줍니다.

위의 예시에서는 12:00 ~ 10:00(선택) -> 09:00 ~ 10:00
10:00(선택) ~ 10:00 -> 10:00 ~ 11:00

예외의 경우

  • startTime을 23:30으로 선택했을 때 endTime은 24:00으로 설정
  • endTime을 09:00이나 09:30으로 선택하면 startTime은 09:00로 설정

ScreenShot 📷

  • 버튼 내 글자 깨짐
    image image
    image image

  • 드롭다운 downArrow 이미지 수정
    image image image

  • 시간 자동 조정

-.-.Chrome.2024-09-19.11-44-16.mp4

Test CheckList ✅

Precaution

✔️ Please check if the PR fulfills these requirements

  • It's submitted to the correct branch, not the develop branch unconditionally?
  • If on a hotfix branch, ensure it targets main?
  • There are no warning message when you run yarn lint

@Gwak-Seungju Gwak-Seungju added ✨ Feature 기능 개발 👤 User 유저, 시간표 도메인 labels Sep 19, 2024
@Gwak-Seungju Gwak-Seungju self-assigned this Sep 19, 2024
@Gwak-Seungju Gwak-Seungju changed the title Feat/#493/adjust time correctly [시간표] 시간 자동 조정 기능 Sep 19, 2024
Copy link
Contributor

@dooohun dooohun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

시간이 자동으로 변경되게 하는 로직이 조금 복잡해서 생각하느라 힘들었을 거 같은데 잘 작동되는 것 같네요 👍 수고하셨습니다!

Comment on lines +62 to +63
transform: rotate(180deg);
transition: transform 0.3s ease;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

애니메이션 대박이네요! 엄청 깔끔하고 좋은 것 같아요 👍
gpu 가속을 지원하는 css 속성들을 알고 사용하면 좋을 거 같아요! transform 속성, opacity, will-change(과도한 사용은 성능 저하를 일으킨다고 알려져 있음...)과 같은 css 속성을 사용하는게 성능상에 많은 도움이 된다고 합니다!

Copy link
Contributor Author

@Gwak-Seungju Gwak-Seungju Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오..! 혜준님의 아이디어를 보고 적용해봤습니다. 하하..! 유용한 정보 감사합니당~~!

src/pages/TimetablePage/components/CustomLecture/index.tsx Outdated Show resolved Hide resolved
Comment on lines +367 to +368
<Listbox list={[...HOUR, { label: '24시', value: '24시' }]} value={time.endHour} onChange={handleLectureTimeByTime('endHour', index)} version="addLecture" />
<Listbox list={time.endHour === '24시' ? [{ label: '00분', value: '00분' }] : MINUTE} value={time.endMinute} onChange={handleLectureTimeByTime('endMinute', index)} version="addLecture" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에는 시작하는 시간이라 24시가 포함되지 않은 건가요? (궁금)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞습니다!! 정확하시군요!

@Gwak-Seungju Gwak-Seungju merged commit 7e47678 into develop Sep 23, 2024
2 checks passed
@github-actions github-actions bot deleted the feat/#493/adjust-time-correctly branch September 23, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발 👤 User 유저, 시간표 도메인
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[시간표] 강의 직접 추가 시 시간 조정 메시지 구체화
2 participants