feat: add useQueryString | Image Automation #91
Merged
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.
PR
useQueryString
안드로이드 뒤로가기 동작 대응을 위해 인터랙티브한 UI의 open 상태를 queryString으로 관리해야하는 문제를 원활히 관리하기 위해 설계하였습니다.
사용예시
인터페이스는 다음과 같습니다.
dependencies 필드는 쿼리스트링의 렌더링 최적화가 필요할때 사용하시면 됩니닷
이렇게 넣은 경우 다른 쿼리스트링이 있는 경우에도 a 쿼리스트링이 바뀔때에만 리렌더링
이미지 관리 자동화
저희 개발 과정에서의 병목을 줄이기위해 따로 정적 asset용 cdn을 두는 대신 그냥 로컬로 어셋들을 관리하고 있는데
요것도 매번 png를 webp로 바꿔주고 이름 지어서 넣어주고 그거에 맞게 constants 객체 만들어주는게 시간이 좀 들더라구용..
그래서 저희 요구사항만 간단하게 반영할 수 있는 스크립트를 하나 짰습니다.
대신 시간을 많이 들여 짠게 아니라서 사용할때 약간의 주의사항을 지켜주셔야해요..
규칙
위 디렉토리 구조를 지켜서 넣어주셔야해요
이미지는 png, webp, jpg, jpeg 만 허용해요
최종 결과물 코드에 구분자를 넣고 싶다면 파일명을 이런형태로 지어주세요 group_edit.webp 혹은 hello-edit.webp
_, - 와 같은 약속된 특수문자 기호를 기준으로 구분자를 만듭니다
제공되는 기능
이상이며 현재 저희가 쓰고있던 이미지들은 이 PR에서 모두 마이그레이션하였습니다.