-
Notifications
You must be signed in to change notification settings - Fork 2
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
[REFACTOR]라이온하트 디자인시스템 구축 및 적용(#133) #134
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
추후, 새 코드가 문제 없으면 삭제
변경후 레이어가 문제없어서 기존 레이어 삭제합니다
이미지버튼 컴포넌트
sjk4618
approved these changes
Sep 26, 2023
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.
오오오 감사합니다!! 머지되면 제 뷰컨에 있는 것들 수정하겠습니다!!
정말 수고많으셨어요!!!!
PR 꼼꼼히 읽었습니다 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[#133] REFACTOR : 라이온하트 디자인시스템 구축 및 적용
🌱 라이온하트 UI DesignSystem구축
🌱 PR Point
디자인 시스템 구축 이유
이전 코드를 보면 UI를 선언할때 속성까지 같이 선언해줘야하는 구성이라 UI컴포넌트를 선언해주고 return해주는 코드가 공통적으로 들어가며 lable의 경우 필수적인 font나 color를 선언하는 부분때문에 불필요하게 코드가 길어지는 문제점이 있었습니다
실제 ChallengeView의 경우에 UI적인 요소가 많은 View가 아님에도 사진아래부분까지 포함하면 UI선언부만 60줄이 넘어가게됩니다
공용컴포넌트를 통해 디자인시스템을 구축하고 적용하면 60줄이 넘는 UI선언부가 10줄이하로 줄어들게됩니다
제작한 Component
1.LHLabel
공식문서
에서 default가 left라고 해서 저렇게 설정을 해줬습니다, numberOfLines도 자주사용하는 옵션인데 default가 1이라 같게 설정해줬습니다, 가끔가다가 network를 통한 text값 설정이아닌 기본 text string을 가지고있는 label이 자주보여서 이 경우에는 기본 text를 설정할수있게 initalize에 basicText를 parameter로 넣어줬습니다2.LHUnderLine
3. LHImageView
4. LHCollectionView
collectionview의 flowlayout은 collectionview선언부에서 선언해준다
는 규칙이있었어서 해당 코드의 중복을 최소화하기 위해서 컴포넌트로 뺐습니다5. LHStackView
arrangedSubviews
는 따로 빼는데 axis는 모든 stackview에서 공통이고 distribution도 공통적으로 선언해서 사용하고 있어서 spacing만 필수param으로 받아서 쉽게 구현할수있게 만들었습니다6. LHToggleImageButton
7. LHImageButton
8. LHView
9. LHLottie
🌱 제안 사항
1.Design System 수정
@ffalswo2 @sjk4618 @cchanmi
2.ViewController 선언 순서
네트워크객체
,UI요소
,Data요소
순서로 정리하면 좋을거같습니다initalize
,viewdidload
순으로 정리하면 코드가 통일성 있어보일거같습니다📮 관련 이슈