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

feat: 메뉴 토글 기능 구현한다 #898

Merged
merged 2 commits into from
Oct 23, 2023
Merged

feat: 메뉴 토글 기능 구현한다 #898

merged 2 commits into from
Oct 23, 2023

Conversation

feb-dain
Copy link
Collaborator

@feb-dain feb-dain commented Oct 22, 2023

[#897]

📄 Summary

원래는 menu 버튼을 누르면 열리기만 하고 닫을 수 없었습니다.
이제 열려있는 base panel과 연결된 menu 버튼을 누르면 닫히도록 합니다. (= 토글 기능)

toggle

🕰️ Actual Time of Completion

5분

🙋🏻 More

close #897

@feb-dain feb-dain added 🌱 기능추가 새로운 기능 요청입니다 FE 프론트엔드 관련 이슈입니다 labels Oct 22, 2023
@feb-dain feb-dain self-assigned this Oct 22, 2023
@feb-dain feb-dain temporarily deployed to test October 22, 2023 06:31 — with GitHub Actions Inactive
@@ -7,10 +7,12 @@ import { navigationBarPanelStore } from '@stores/layout/navigationBarPanelStore'
export const useNavigationBar = () => {
const [navigationBarPanel, setNavigationBarPanel] = useExternalState(navigationBarPanelStore);

const openBasePanel = (basePanel: ReactElement) => {
const toggleBasePanel = (basePanel: ReactElement) => {
const isAlreadyOpen = navigationBarPanel.basePanel?.key === basePanel.key;
Copy link
Member

Choose a reason for hiding this comment

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

isBasePanelOpen와 같이 basePanel이라는 단어가 포함되는건 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

toggleBasePanel 안에 있어서 생략할까 말까 했는데 'isBasePanelAlreadyOpen'으로 변경하겠습니다!

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@gabrielyoon7 gabrielyoon7 left a comment

Choose a reason for hiding this comment

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

좋은 아이디어네요.
미리 어프룹 드립니다.

@feb-dain feb-dain temporarily deployed to test October 23, 2023 05:28 — with GitHub Actions Inactive
@feb-dain feb-dain merged commit 2ca3a44 into develop Oct 23, 2023
2 checks passed
@feb-dain feb-dain deleted the feat/897 branch October 23, 2023 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 관련 이슈입니다 🌱 기능추가 새로운 기능 요청입니다
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

메뉴 토글 기능을 구현한다
3 participants