-
Notifications
You must be signed in to change notification settings - Fork 3
calendar modifiacation #98
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
base: dev
Are you sure you want to change the base?
Conversation
월별선택기능 및 이동 기능 막힘
|
Warning CodeRabbit GitHub Action DetectedThe repository is using both CodeRabbit Pro and CodeRabbit Open Source (via GitHub Actions), which is not recommended as it may lead to duplicate comments and extra noise. Please remove the CodeRabbit GitHub Action. The provided content is already well-structured and aligns with the given instructions. Therefore, I will repeat it verbatim without additional text or codeblocks. WalkthroughThe recent updates to the application involve user interface and experience improvements. The calendar component now closes upon date selection, potentially resetting its state. The navigation component has been simplified by removing search-related features and adding user image management. Styling updates have been made to the calendar for better responsiveness and aesthetics. The main page for non-logged-in users now emphasizes emotional journaling, with updated links and images to enhance user engagement. Changes
Poem
TipsChat with CodeRabbit Bot (
|
Uplevel your code reviews with CodeRabbit ProCodeRabbit ProIf you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 8
Configuration used: CodeRabbit UI
Files selected for processing (3)
- src/app/components/Calendar.tsx (1 hunks)
- src/app/components/Nav.tsx (3 hunks)
- src/app/components/cal.css (3 hunks)
Files skipped from review due to trivial changes (1)
- src/app/components/Calendar.tsx
Additional comments: 3
src/app/components/cal.css (3)
70-70: The
z-indexproperty is set to100without context. Ensure that this value is consistent with the z-index scale used throughout the application to maintain stacking order.111-111: The
border-radiusis set to14pxfor.react-calendar__tile:enabled:hover, .react-calendar__tile:enabled:focus, .react-calendar__tile--active. Ensure that this value is consistent with the design system or UI guidelines of the project.170-175: The dark mode styles for
.react-calendaronly change thebackground-colorandcolor. Ensure that all necessary elements are styled for dark mode to maintain consistency and readability.
| const [inputValue, setInputValue] = useState<string>('') // 일기검색 | ||
| const [user, setUser] = useRecoilState(userInfo) | ||
| const [isCalendarOpen, setIsCalendarOpen] = useState(false) //달력모달 | ||
| const [searchBlur, setSearchBlur] = useState(false) // 검색창 선 색상 변경 용도 | ||
|
|
||
| const [userImg, setUserImg] = useState<any>('') // 유저 이미지 | ||
| const [snowTheme, setSnowTheme] = useState<boolean>(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state userImg is initialized with an empty string, but later it is checked for values like 'no image' or undefined. It's important to ensure consistency in the default value and the checks performed later in the code.
| setIsCalendarOpen(!isCalendarOpen) | ||
| } | ||
|
|
||
| const handleBlur = () => { | ||
| setSearchBlur(!searchBlur) | ||
| } | ||
|
|
||
| useEffect(() => { | ||
| // 초기 렌더링 시 테마를 라이트 모드로 설정 | ||
| if (currentTheme !== 'light') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useEffect hook is set to change the theme to 'light' on the initial render. This could potentially override user preferences if they have set a different theme. Consider checking for user preferences before setting a default theme.
| priority | ||
| onClick={onClickSearch} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The onClick handler onClickSearch is attached to the Image component, which is not a button or input. This could lead to accessibility issues. Consider wrapping the Image in a button or another interactive element.
| min-width: 550px; | ||
| border-radius: 20px; | ||
| border: 3px solid #afa4ce; | ||
| display: flex; | ||
| flex-direction: column; | ||
| margin: auto; /* 수평 중앙 정렬 */ | ||
| margin-top: 75px; /* 상단에서의 마진 */ | ||
| /*max-height: 700px; /* 부모 요소의 높이를 따르도록 설정 */ | ||
| margin: auto; | ||
| margin-top: 75px; | ||
| height: 760px; | ||
| overflow-y: auto !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .react-calendar class has a fixed min-width and height, which may not be responsive on smaller devices or screens with lower resolutions. Consider using relative units like percentages or viewport units for better responsiveness.
| margin: auto; | ||
| margin-top: 75px; | ||
| height: 760px; | ||
| overflow-y: auto !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using !important to override overflow-y can lead to difficulties in maintaining the CSS, as it breaks the natural cascade. If this is necessary due to specificity issues, ensure that it's documented why the override is needed.
| align-items: center; | ||
| padding: 0; | ||
| margin-top: 10px !important; /* 수정된 부분: 날짜 간의 간격을 조절합니다. */ | ||
| margin-top: 10px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of !important to override margin-top should be avoided if possible. Check if there's a more specific selector that can be used to apply this style without !important.
| justify-content: center; | ||
| align-items: center; | ||
| pointer-events: auto; /* 클릭 이벤트 활성화 */ | ||
| pointer-events: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pointer-events property is set to auto for .dot and .dot-img, which is the default value. If there's no specific reason to declare this, it could be removed to clean up the CSS.
| @media screen and (min-width: 768px) { | ||
| .react-calendar { | ||
| min-width: 62%; | ||
| max-width: 900px; | ||
| } | ||
| .react-calendar__navigation { | ||
| height: 100px !important; | ||
| } | ||
| .react-calendar__navigation span { | ||
| font-size: 32px; | ||
| } | ||
| .react-calendar__navigation__next-button, | ||
| .react-calendar__navigation__prev-button { | ||
| font-size: 40px; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The media query for screens with a minimum width of 768px sets specific pixel values for font sizes and dimensions. Consider using relative units like em or rem for font sizes to maintain scalability and accessibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (3)
- src/app/components/Calendar.tsx (1)
- src/app/components/Nav.tsx (3)
- src/app/components/cal.css (3)
Files not summarized due to errors (3)
- src/app/components/cal.css (diff tokens exceeds limit)
- src/app/components/Calendar.tsx (nothing obtained from openai)
- src/app/components/Nav.tsx (nothing obtained from openai)
Files not reviewed due to errors (3)
- src/app/components/Calendar.tsx (no response)
- src/app/components/Nav.tsx (no response)
- src/app/components/cal.css (no response)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with
CodeRabbit Bot (@coderabbitai)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitaiin a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignoreanywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (3)
- src/app/components/Calendar.tsx (1)
- src/app/components/Nav.tsx (3)
- src/app/components/cal.css (3)
Files not summarized due to errors (3)
- src/app/components/cal.css (diff tokens exceeds limit)
- src/app/components/Calendar.tsx (nothing obtained from openai)
- src/app/components/Nav.tsx (nothing obtained from openai)
Files not reviewed due to errors (3)
- src/app/components/Calendar.tsx (no response)
- src/app/components/Nav.tsx (no response)
- src/app/components/cal.css (no response)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with
CodeRabbit Bot (@coderabbitai)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitaiin a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignoreanywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (3)
- src/app/components/Calendar.tsx (1)
- src/app/components/Nav.tsx (3)
- src/app/components/cal.css (3)
Files not summarized due to errors (3)
- src/app/components/cal.css (diff tokens exceeds limit)
- src/app/components/Calendar.tsx (nothing obtained from openai)
- src/app/components/Nav.tsx (nothing obtained from openai)
Files not reviewed due to errors (3)
- src/app/components/Calendar.tsx (no response)
- src/app/components/Nav.tsx (no response)
- src/app/components/cal.css (no response)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with
CodeRabbit Bot (@coderabbitai)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitaiin a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignoreanywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (3)
- src/app/components/Calendar.tsx (1)
- src/app/components/Nav.tsx (3)
- src/app/components/cal.css (3)
Files not summarized due to errors (3)
- src/app/components/cal.css (diff tokens exceeds limit)
- src/app/components/Calendar.tsx (nothing obtained from openai)
- src/app/components/Nav.tsx (nothing obtained from openai)
Files not reviewed due to errors (3)
- src/app/components/Calendar.tsx (no response)
- src/app/components/Nav.tsx (no response)
- src/app/components/cal.css (no response)
Review comments generated (0)
- Review: 0
- LGTM: 0
Tips
Chat with
CodeRabbit Bot (@coderabbitai)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitaiin a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignoreanywhere in the PR description to pause further reviews from the bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 5
Configuration used: CodeRabbit UI
Files ignored due to filter (4)
- public/write.png
- public/감정그래프.png
- public/달력.png
- public/한마디.png
Files selected for processing (1)
- src/app/components/NotLoginMain.tsx (5 hunks)
src/app/components/NotLoginMain.tsx
Outdated
| import Link from 'next/link'; | ||
| import { useRouter } from 'next/navigation' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import from 'next/navigation' seems incorrect as the correct module for useRouter is 'next/router'.
- import { useRouter } from 'next/navigation'
+ import { useRouter } from 'next/router'Commitable suggestion
❗ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
| import Link from 'next/link'; | |
| import { useRouter } from 'next/navigation' | |
| import Link from 'next/link'; | |
| import { useRouter } from 'next/router' |
src/app/components/NotLoginMain.tsx
Outdated
| {shouldRenderImage('first') && renderImage("/write.png")} | ||
| {shouldRenderImage('second') && renderImage("/한마디.png")} | ||
| {shouldRenderImage('third') && renderImage("/달력.png")} | ||
| {shouldRenderImage('fourth') && renderImage("/cat1.png")} | ||
| {shouldRenderImage('fourth') && renderImage("/감정그래프.png")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image file names should follow a consistent naming convention. The file name /한마디.png uses non-ASCII characters, which might cause issues with systems that do not support such characters or when accessed via URLs. Consider renaming it to use ASCII characters only.
src/app/components/NotLoginMain.tsx
Outdated
| {/* 로그인 페이지로 이동하는 Link */} | ||
| <Link href="/api/auth/signin"> | ||
|
|
||
| <span className="mt-[0px] text-[30px] px-[24px] py-[12px] border rounded-md text-white bg-[#b2a4d4] cursor-pointer" style={{ marginTop: '100px' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline styles should be avoided when possible for maintainability and to keep styling consistent. Consider adding a class and defining these styles in the corresponding CSS file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| const NotLoginMain = () => { | ||
| const [hover, setHover] = useState<string | null>(null); | ||
| const [hover, setHover] = useState<string | null>('first'); // 초기값 설정 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is still in Korean; it should be translated to English for consistency.
| const handleMouseOut = () => { | ||
|
|
||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handleMouseOut function is still empty and should either be implemented or removed to maintain clean code.
월별선택기능 및 이동 기능 막힘
Issues 번호 : #97
Closes #xx
변경, 추가된 코드(설명 등)
코드 주의점
Summary by CodeRabbit
New Features
Bug Fixes
searchBlurstate and related functions to streamline navigation component.Style
Documentation