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

[#60] CompositionalLayout Enum 정의 + Note #61

Merged
merged 1 commit into from
May 5, 2024
Merged

[#60] CompositionalLayout Enum 정의 + Note #61

merged 1 commit into from
May 5, 2024

Conversation

jeongju9216
Copy link
Owner

Overview

  • 세로 스크롤, 가로 스크롤을 지원하는 CompositionalLayout Enum을 정의했습니다.
    • configure에서 요소들의 속성을 파라미터로 받으면 파라미터가 너무 많아지고 요소의 속성이 변경되면 메서드 자체가 변하는 문제가 있습니다. (moti 1.0처럼)
    • 이 문제를 해결하기 위해 각 구조체를 정의하고 이를 전달 받도록 구현했습니다.

Note

기존 moti의 CompositionalLayout 생성 코드는 많은 파라미터가 있었습니다. (Overview에 쓴 것처럼!)
이 파라미터들은 모두 CompositionalLayout 요소들(item, group, section)의 각 속성이었습니다.
이를 어떻게 하면 줄일 수 있을까 고민했고 각 요소들을 구조체로 정의하는 방법을 떠올렸습니다.
기존 코드를 보면서 어떤 부분이 어떻게 아쉬운지 느끼고 어떤 방향으로 수정할지 결정할 수 있었던 경험이었습니다.

Issue

closed #60

세로 스크롤, 가로 스크롤을 지원하는 CompositionalLayout Enum을 정의했습니다.
configure에서 요소들의 속성을 파라미터로 받으면 파라미터가 너무 많아지고 요소의 속성이 변경되면 메서드 자체가 변하는 문제가 있습니다. (moti 1.0처럼)
이 문제를 해결하기 위해 각 구조체를 정의하고 이를 전달 받도록 구현했습니다.
@jeongju9216 jeongju9216 merged commit 50dfff9 into develop May 5, 2024
1 check passed
@jeongju9216 jeongju9216 deleted the #60 branch May 5, 2024 04:41
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.

공통으로 사용할 Compositional Layout을 구현한다.
1 participant