-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 오류 해결 및 추가 요구사항 반영 (토스트, 툴팁, 경로별 할일 제한) #287
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
586a909
feat: 즐겨찾기, 추천, 모든 추천에서도 할 일 추가 제한 #285
rbgksqkr 412f1cf
refactor: 경로별 할 일 개수는 10개 제한 #285
rbgksqkr 83a4b66
refactor: 경로별 토스트 메세지 맵핑 수정 #285
rbgksqkr e5f1e61
fix: 즐겨찾기 탭 모든 추천 헤더 타이틀 수정 #285
rbgksqkr 2a83b39
design: Toast shadow 수정 #285
rbgksqkr 32759a1
design: scroll 수정 #285
rbgksqkr 791edc1
fix: 즐겨찾기 수정하기 타이틀 수정 #285
rbgksqkr 27fa0b1
feat: 즐겨찾기 탭이 비었을 경우 UI 추가 및 즐겨찾기페이지 라우팅 추가 #285
rbgksqkr 8a437ab
design: 버튼 margin-top 수정 #285
rbgksqkr 180dbce
feat: localStorage 유틸함수 구현 #285
rbgksqkr 7fcec7f
feat: 이동중 페이지 툴팁 구현 #285
rbgksqkr 7679b7d
design: 드래그 중인 요소 UI 수정 #285
rbgksqkr 18551b6
feat: drag 중일 때 체크 박스 제거 #285
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { useEffect, useState } from 'react'; | ||
|
|
||
| import Tooltip from '../Tooltip'; | ||
|
|
||
| import { getItem, setItem } from '@/utils/localStorage'; | ||
|
|
||
| const TOOLTIP_STORAGE_KEY = 'HAS_SHOWN_PLAN_TOOLTIP'; | ||
|
|
||
| const PlanTooltip = () => { | ||
| const [isVisible, setIsVisible] = useState(false); | ||
|
|
||
| useEffect(() => { | ||
| const hasShown = getItem<boolean>(TOOLTIP_STORAGE_KEY); | ||
|
|
||
| if (!hasShown) { | ||
| setIsVisible(true); | ||
| setItem(TOOLTIP_STORAGE_KEY, true); | ||
| } | ||
| }, []); | ||
|
|
||
| const handleClose = () => { | ||
| setIsVisible(false); | ||
| }; | ||
|
|
||
| if (!isVisible) return null; | ||
|
|
||
| return ( | ||
| <Tooltip onClose={handleClose} title="할 일을 드래그하여 이동해보세요"> | ||
| {`2초간 꼭 누르면 다른 이동경로에서\n할 일을 체크할 수 있어요 !`} | ||
| </Tooltip> | ||
| ); | ||
| }; | ||
|
|
||
| export default PlanTooltip; | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import { styled } from 'styled-components'; | ||
|
|
||
| export const TooltipLayout = styled.div` | ||
| position: absolute; | ||
| top: 0; | ||
| left: 50%; | ||
| transform: translateX(-50%); | ||
|
|
||
| color: ${({ theme }) => theme.colors.gray100}; | ||
| background-color: ${({ theme }) => theme.colors.green800}; | ||
| border-radius: 0.8rem; | ||
|
|
||
| display: flex; | ||
| min-width: 18rem; | ||
| padding: 0.8rem 0.6rem 0.8rem 1.2rem; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: flex-start; | ||
| gap: 0.4rem; | ||
| white-space: nowrap; | ||
|
|
||
| &::after { | ||
| content: ''; | ||
| position: absolute; | ||
| bottom: -6px; | ||
| left: 50%; | ||
| transform: translateX(-50%); | ||
| border-left: 8px solid transparent; | ||
| border-right: 8px solid transparent; | ||
| border-top: 8px solid ${({ theme }) => theme.colors.green800}; | ||
| } | ||
| `; | ||
|
|
||
| export const TooltipTitle = styled.div` | ||
| ${({ theme }) => theme.fonts.body15Med}; | ||
| `; | ||
|
|
||
| export const TooltipContent = styled.div` | ||
| ${({ theme }) => theme.fonts.label14Reg}; | ||
| white-space: pre-wrap; | ||
| `; | ||
|
|
||
| export const TooltipHeader = styled.div` | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| width: 100%; | ||
| gap: 0.4rem; | ||
| `; |
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,31 @@ | ||
| import { PropsWithChildren } from 'react'; | ||
|
|
||
| import * as S from './Tooltip.styled'; | ||
| import IconButton from '../Button/IconButton'; | ||
| import Icon from '../Icon'; | ||
|
|
||
| import { colors } from '@/styles/theme'; | ||
|
|
||
| interface TooltipProps { | ||
| title: string; | ||
| onClose: () => void; | ||
| } | ||
|
|
||
| const Tooltip = ({ onClose, children, title }: PropsWithChildren<TooltipProps>) => { | ||
| return ( | ||
| <S.TooltipLayout> | ||
| <S.TooltipHeader> | ||
| <S.TooltipTitle>{title}</S.TooltipTitle> | ||
| <IconButton | ||
| icon={ | ||
| <Icon icon="Close" width={16} height={16} color={colors.gray200} cursor="pointer" /> | ||
| } | ||
| onClick={onClose} | ||
| /> | ||
| </S.TooltipHeader> | ||
| <S.TooltipContent>{children}</S.TooltipContent> | ||
| </S.TooltipLayout> | ||
| ); | ||
| }; | ||
|
|
||
| export default Tooltip; |
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
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.
Uh oh!
There was an error while loading. Please reload this page.