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

Table of content 기능 추가 #45

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

LittleGiantBaek
Copy link

  • IntersectionObserver를 활용한 요소 감지 및 Scroll 시 우측의 목차 영역의 감지된 section 활성화 기능 추가.

  • showToc ( 표시 여부) prop 추가

  • toc 기본 이미지
    image

  • toc hover시 이미지
    image

- toc 컴포넌트 및 스타일 정의 추가
- payload 인터페이스 sectionId 프로퍼티 추가
- TODO)
  - section에 도달했지만 toc active 상태 변경되지 않는 현상 수정
  - toc a link 영역 확장 처리 ( 현재 텍스트클릭만 가능)
  - toc 닫히는 시간 조절
- section이 여러개 intersect 되는 경우 하나만 목차에 나타나는 버그 수정
- 스타일 global 스타일과 분리
- 문단이 길어질 경우 퍼센티지를 충족하지 못하여 임계값 제거
- animation 효과 위해 opacity style로 처리
- 스크롤 방향에 따른 visible section 처리 로직 변경
  - 아래로 스크롤시 마지막 요소 활성화
  - 위로 스크롤시 첫번째 요소 활성화
  - 이렇게 처리 하지 않을경우 마지막 요소가 짧아 여러 요소가
    visible일경우 toc 활성화가 안되는 현상 발생
- toc 표시 여부 반응형 처리
- todo) footer의 margin top을 주지 않아도 수정할 수 있도록 처리 고민하면
  좋을듯
- toc 클릭시 콜백 동작 방지용 타이머 추가
- toc anchor태그 스타일 block으로 수정
- 너무 좁아보임..
- 새로고침시 해당 section으로 이동 방지
@LittleGiantBaek
Copy link
Author

codeclimate 통과가 어렵네요.. ㅠㅜ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant