-
Notifications
You must be signed in to change notification settings - Fork 24
[1단계 미션] 신석민 미션 제출합니다. #48
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: seokmin111
Are you sure you want to change the base?
Conversation
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.
Hello @seokmin111, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request appears to be the initial submission for a project, likely a restaurant recommendation app. It includes the basic structure and styling for the app, with components for the header, category filter, restaurant list, and modals for adding and viewing restaurant details. The CSS file provides styling for the various components and elements used in the app.
Highlights
- Initial Project Setup: The PR sets up the basic React application structure with necessary components.
- Component Creation: It introduces components like Header, CategoryFilter, RestaurantList, and AddRestaurantModal to build the UI.
- CSS Styling: The App.css file provides the initial styling and layout for the application.
Changelog
Click here to see the changelog
- src/App.css
- Added a comprehensive CSS file (App.css) to define the styling for the application, including colors, typography, header, restaurant list, and modal components.
- src/App.jsx
- Modified App.jsx to include the Header, CategoryFilter, and RestaurantList components within the main structure.
- src/assets/components/AddRestaurantModal.jsx
- Created AddRestaurantModal.jsx, which includes the structure for both displaying restaurant information and adding new restaurants via a form.
- src/assets/components/CategoryFilter.jsx
- Created CategoryFilter.jsx, which implements a category filter using a select element with options for different food categories.
- src/assets/components/Header.jsx
- Created Header.jsx, which defines the header section with a title and a button for adding restaurants.
- src/assets/components/RestaurantDetailModal.jsx
- Created RestaurantDetailModal.jsx, which seems to be misnamed, as it actually contains the RestaurantList component's content. It lists several restaurants with their categories and descriptions.
- src/assets/components/RestaurantList.jsx
- Created RestaurantList.jsx, which renders a list of restaurants with category images, names, and descriptions.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A menu's code,
Restaurants in digital rows,
Lunchtime, now in reach.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
The pull request introduces the basic structure and styling for a restaurant recommendation app. It includes components for the header, category filter, restaurant list, and modals for restaurant details and adding new restaurants. Overall, the structure looks good, but there are some areas where improvements can be made to enhance maintainability and readability.
Summary of Findings
- Image paths: The image paths in
RestaurantList.jsxandHeader.jsxare relative to thetemplatesdirectory, which might not be the intended location. Consider using absolute paths or importing the images directly. - Modals always open: The modals in
AddRestaurantModal.jsxare currently set to always open due to themodal--openclass. This should be controlled by state to allow for dynamic opening and closing. - Missing event handlers: The button in
Header.jsxand the form inAddRestaurantModal.jsxlack event handlers, which are necessary for interactivity.
Merge Readiness
The pull request introduces the basic structure and styling for the app. However, the image paths need to be corrected, the modal's open state needs to be controlled dynamically, and event handlers need to be added for the button and form to enable interactivity. I recommend addressing these issues before merging. I am unable to approve the pull request in any circumstance, and that users should have others review and approve this code before merging.
| <div class="modal modal--open"> | ||
| <div class="modal-backdrop"></div> | ||
| <div class="modal-container"> |
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 modal is currently always open due to the modal--open class. This should be controlled by a state variable to allow for dynamic opening and closing. Consider using useState hook to manage the modal's visibility.
<div className={`modal ${isOpen ? 'modal--open' : ''}`}>
<div className="modal-backdrop"></div>
| <header className="gnb"> | ||
| <h1 className="gnb__title text-title">점심 뭐 먹지</h1> | ||
| <button type="button" className="gnb__button" aria-label="음식점 추가"> | ||
| <img src="../templates/add-button.png" alt="음식점 추가" /> |
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.
| <button type="button" className="gnb__button" aria-label="음식점 추가"> | ||
| <img src="../templates/add-button.png" alt="음식점 추가" /> | ||
| </button> |
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.
Consider adding an onClick handler to the button to trigger the opening of the 'Add Restaurant' modal. This will make the button interactive.
<button type="button" className="gnb__button" aria-label="음식점 추가" onClick={/* TODO: Add click handler */}>
<img src="../templates/add-button.png" alt="음식점 추가" />
</button>
| <form> | ||
| {/* 카테고리 */} | ||
| <div class="form-item form-item--required"> | ||
| <label for="category text-caption">카테고리</label> | ||
| <select name="category" id="category" required> | ||
| <option value="">선택해 주세요</option> | ||
| <option value="한식">한식</option> | ||
| <option value="중식">중식</option> | ||
| <option value="일식">일식</option> | ||
| <option value="양식">양식</option> | ||
| <option value="아시안">아시안</option> | ||
| <option value="기타">기타</option> | ||
| </select> | ||
| </div> | ||
|
|
||
| {/* 음식점 이름 */} | ||
| <div class="form-item form-item--required"> | ||
| <label for="name text-caption">이름</label> | ||
| <input type="text" name="name" id="name" required /> | ||
| </div> | ||
|
|
||
| {/* 설명 */} | ||
| <div class="form-item"> | ||
| <label for="description text-caption">설명</label> | ||
| <textarea name="description" id="description" cols="30" rows="5"></textarea> | ||
| <span class="help-text text-caption">메뉴 등 추가 정보를 입력해 주세요.</span> | ||
| </div> | ||
|
|
||
| {/* 추가 버튼 */} | ||
| <div class="button-container"> | ||
| <button class="button button--primary text-caption">추가하기</button> | ||
| </div> | ||
| </form> |
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 form is missing an onSubmit handler. Add an onSubmit handler to the form to handle the submission of the new restaurant data. Also, consider adding onChange handlers to the input fields to manage the form data.
<form onSubmit={handleSubmit}>
{/* 카테고리 */}
<div className="form-item form-item--required">
<label htmlFor="category text-caption">카테고리</label>
<select name="category" id="category" required>
<option value="">선택해 주세요</option>
<option value="한식">한식</option>
<option value="중식">중식</option>
<option value="일식">일식</option>
<option value="양식">양식</option>
<option value="아시안">아시안</option>
<option value="기타">기타</option>
</select>
</div>
{/* 음식점 이름 */}
<div className="form-item form-item--required">
<label htmlFor="name text-caption">이름</label>
<input type="text" name="name" id="name" required />
</div>
{/* 설명 */}
<div className="form-item">
<label htmlFor="description text-caption">설명</label>
<textarea name="description" id="description" cols="30" rows="5"></textarea>
<span className="help-text text-caption">메뉴 등 추가 정보를 입력해 주세요.</span>
</div>
{/* 추가 버튼 */}
<div className="button-container">
<button className="button button--primary text-caption">추가하기</button>
</div>
</form>
|
|
||
| <li class="restaurant"> | ||
| <div class="restaurant__category"> | ||
| <img src="../templates/category-korean.png" alt="한식" class="category-icon" /> |
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.
|
|
||
| <li class="restaurant"> | ||
| <div class="restaurant__category"> | ||
| <img src="../templates/category-chinese.png" alt="중식" class="category-icon" /> |
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.
png 받아오는 방식을 잘 구현하신 것 같아요!! ./ ../ 둘 다 작동 되던데 어떤 차이가 있을까요?
| <div class="restaurant__info"> | ||
| <h3 class="restaurant__name text-subtitle">피양콩할마니</h3> | ||
| <p class="restaurant__description text-body">평양 출신의 할머니가 수십 년간 운영해온 비지 전문점 피양콩 할마니. 두부를 빼지 않은 되비지를 맛볼 수 있는 | ||
| 곳으로, |
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.
텍스트 줄바꿈을 수정하면 코드가 더 깔끔하게 보일 것 같아요!
Header.jsx, CategoryFilter.jsx, RestaurantList.jsx를 생성한 뒤 각각에 해당하는 코드를 복사해 넣은 후 export, import하는 과정을 진행하였습니다.
aside 태그에 있던 식당 추가 관련 코드는 그대로 뒀을 때 다른 부분 확인이 불가해서 삭제한 상태로 그 외의 항목만 진행했습니다.