refactor: Dialog 레이어 쌓임 문제 해결 - #96
Open
hae-on wants to merge 4 commits into
Open
Conversation
Leejin-Yang
approved these changes
Mar 26, 2024
| const ModalDialog = styled.dialog` | ||
| border: none; | ||
| z-index: 9999; | ||
| z-index: 1000; |
Collaborator
There was a problem hiding this comment.
펀잇 헤더가 1001이라 헤더가 위에 있지 싶네요..?
나중에 z-index도 상수화 얘기해보죠.!
Collaborator
Author
There was a problem hiding this comment.
얘는 아마 z-index가 상관이 없을거에여!
제가 알기로는 dialog가 z-index 상관없이 무조건 최상위라고 알고있거든요?
그래서 저거 지울까하다가 일단 수만 줄여서 나뒀는데 저거 지울까여 아니면 9999로 다시 올릴까여??
| const [isOpen, setIsOpen] = useState(false); | ||
| const [isClosing, setIsClosing] = useState(false); | ||
| const ref = useRef<HTMLDivElement>(null); | ||
| const ref = useRef<HTMLDialogElement>(null); |
Collaborator
There was a problem hiding this comment.
오 dialog 태그로 바꿔서 ref로 핸들링하는거군요 👍
Collaborator
Author
아아 그래서 저랬구나... rollup은 작업하신거에요??? <BottomSheet hasToast ...> 요렇게! 토스트 필요 없는 바텀시트면 안 적어도 되고! |
Collaborator
Author
|
최대 높이 설정하였습니다! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
✨ 구현한 기능
여러분 드디어 고쳤습니다...!
toast id를 따로 상태로 둬서 일반 상황에서는 'toast-container'라는 div에 붙고
dialog 내부에서는 'toast-in-dialog-container' div에 붙도록 하였습니다.
이랬는데

요래 됐슴다

이제 BottomSheet 사용처에서 hasToast라는 props를 주면 상위에 뜹니다!
📢 논의하고 싶은 내용
styled를 module css로 바꾸려고 했는데 다른 곳에서는 문제가 없는데
스토리북에서는 계속 에러가 뜨더라구요.
이게 찾아봤을 때 storybook main.ts webpack 설정 때문에 그렇다는데 있는 코드들도 main.js 밖에 없고 제대로 되는 것도 없더라구요.
어차피 우리 rollupjs로 바꿀거여서 그때 다시 적용해야하니까 스타일은 따로 안 바꿨습니다!
🎸 기타
갑자기 디자인시스템 스토리북에 왜 React를 import를 안해주면 에러가 나죠? 저만 그런가요??