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

Feature/issue 47/create coctail recipe #15

Merged
merged 6 commits into from
May 31, 2023

Conversation

lynn0506
Copy link
Contributor

@lynn0506 lynn0506 commented May 22, 2023

관련 issue [Cocktail-Recipe/issues#47] [Cocktail-Recipe/issues#48]

기획서 상의 조건을 기반으로 작업했으며, 추후 제한조건 API가 구체화 되면 추가적으로 수정할 예정입니다.

ezgif com-video-to-gif (13)

- - -
스크린샷 2023-05-22 오후 9 55 34 스크린샷 2023-05-22 오후 9 56 53 스크린샷 2023-05-22 오후 9 57 59

@lynn0506 lynn0506 self-assigned this May 22, 2023
@lynn0506 lynn0506 marked this pull request as ready for review May 23, 2023 11:52
Copy link
Contributor Author

@lynn0506 lynn0506 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 민재님께서 작성해주신 기획안대로 max, min 등 값이 적용되어 있는데, 기획안 및 디자인 확정되는 대로 세세한 제약 사항들 적용해보겠습니다. 현재는 러프하게 동작 방식만 참고해주세요!!

Comment on lines +17 to +34
<Space direction="vertical" style={{ width: '90%' }}>
<Typography.Text>도수</Typography.Text>
<Space direction="horizontal">
<Button onClick={() => onChangeVolume(0)} style={{ width: '70px' }}>
<div>무알콜</div>
</Button>
<InputNumber
style={{ width: '200px' }}
min={0}
max={40}
placeholder="도수를 입력해 주세요."
value={volume}
onChange={onChangeVolume}
/>
</Space>
</Space>
);
};
Copy link
Contributor Author

@lynn0506 lynn0506 May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디자인 확정되면 변경된 UI로 수정하겠습니닷~~

(현재 - 무알콜 + 도수 입력 input)
(변경 후 - 도수 slider )


import { createGlobalStyle } from 'styled-components';

RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebookexperimental/Recoil#733
next와 recoil을 동시에 사용하면 ssr 환경으로 인해 발생하는 duplicated key error가 존재하여 해당 경우 recoil 레포에 제시된 해결방법으로 수정합니다.

Comment on lines +11 to +23
const debouncedOnChange = debounce((setState: Dispatch<SetStateAction<string | undefined>>, value: string) => {
setState(value);
}, 300);

const onChangeKoreanName = useCallback(
(e: ChangeEvent<HTMLInputElement>) => debouncedOnChange(setKoreanName, e.target.value),
[debouncedOnChange, setKoreanName],
);

const onChangeEnglishName = useCallback(
(e: ChangeEvent<HTMLInputElement>) => debouncedOnChange(setEnglishName, e.target.value),
[debouncedOnChange, setEnglishName],
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lodashdebounce를 적용하여 입력 후 일정 시간(300ms) 이후에 한번만 setState가 발생하도록 함.

debounce, throttle 요약 정리 - https://www.notion.so/Throttle-Debounce-c38489643f9c4e028e03287d2814ff65?pvs=4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아쉽게도 요약정리 링크가 권한이 없어 볼수가 없네여ㅠ
https://dmitripavlutin.com/react-throttle-debounce/ 여기에 설명되어있는 부분이랑 같은거같은데
lodash 오랜만에 봐서 반갑군여ㅋㅋㅋㅋ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://bustling-basin-9fe.notion.site/Throttle-Debounce-c38489643f9c4e028e03287d2814ff65 이겁니다 ㅋㅎ 첨부해주신 내용이랑 같아요!

seasonalStyle,
cocktailStyle,
volume,
koreanName,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

칵테일 이름이 태그로 들어가는 디자인도 나왔었나요? 못본거 같아서,, 혹여나 하는 마음에 코멘트 남김니다

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 부분 디자인이 확정이 아닌거 같아요 ㅠ 그래서 기획 + 디자인 확정되면 다시 수정할게요!

Copy link
Contributor

@IMRaccoon IMRaccoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생많으셨습니다
너무 늦게 본거 같아서 죄송하네여 ㅎ;;

IMRaccoon

This comment was marked as duplicate.

Copy link
Contributor

@vividswan vividswan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! :)

@lynn0506 lynn0506 merged commit cfe6580 into dev May 31, 2023
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.

3 participants