Skip to content

Conversation

@greatSumini
Copy link
Member

Description

새로운 모듈 구조 길드에서 논의,제시된 구조들을 짬뽕해서 만들어본 구조입니다!

preset을 통해 새로운 AnalyticsClient를 정의하고,
Analytics.click, Analytics.event 등의 함수를 통해 싱글톤스럽게 호출할 수 있습니다~!

Help Wanted 👀

Related Issues

related with #209
resolve #
fix #

Checklist ✋

  • PR 타이틀을 {PR type}: {PR title}로 맞췄습니다. (type 예시: feat | fix | BREAKING CHANGE | chore | ci | docs | style | refactor | perf | test) (참고: conventional commits)
  • 모든 변경점들을 확인했으며 적절히 설명했습니다.
  • 빌드와 테스트가 정상적으로 수행됨을 확인했습니다. (yarn build, yarn test)
  • 깃헙 이슈를 연결하겠습니다. (커밋에 resolve #이슈넘버 적거나 PR생성 후 Linked Issue 추가)

@greatSumini greatSumini self-assigned this Oct 12, 2021
Copy link
Member

@milooy milooy left a comment

Choose a reason for hiding this comment

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

오 PR로 적어주시니 넘 좋네요 ㅎㅎ
test깨져도 무방하니 간단한 demo코드도 적어주실 수 있나요?

@greatSumini
Copy link
Member Author

@milooy 네엡 작성해보겠습니다~!

@greatSumini
Copy link
Member Author

greatSumini commented Oct 14, 2021

추가수정완료) @alledy @hiphapis @milooy
discussion의 '새로 개발해야하는 것' 1,2,3을 작업햇습니다.

사실 재설계는 5, 6번 작업과 많이 겹쳐서 유의미하게는 진행되지 않았구요 ㅎㅎ.. 2, 3번은 확실히 반영해두었습니다.

사용 예시를 보여드리고 싶어서 storybook을 간단하게 설정해보았습니다.
yarn storybook 명령어를 사용해 로컬에서 실행해보실 수 있고, 현재 PR에 올라간 버전은 https://rap-sample.vercel.app 에서 확인하실 수 있습니당 (Analytics가 init 되거나 버튼을 클릭하면 콘솔에 미리 설정해둔 로그가 찍힙니다)

추가1)
yarn berry라서 새로 설치된 패키지 파일들이 Files Changed를 뒤덮어버리네용.. 주요 변경 파일들 링크입니다.

추가2)
core -> mixin 네이밍 변경 빠뜨렸네요 ㅎㅎ;; 내일 해두겠슴다

@milooy
Copy link
Member

milooy commented Oct 17, 2021

file changes에서 .yarn 파일 숨기는 쿼리입니당
개발자 도구 열고 콘솔에 복붙하시면 실제파일만 보기 편할거예요!

[...document.querySelectorAll('.Link--primary')].filter(linkDOM => {
  return linkDOM.title.startsWith('.yarn');
}).map((linkDOM) => {
  linkDOM.closest('.file').style.display = 'none';
})

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2021

Codecov Report

Merging #225 (a41be60) into main (8b4ec81) will decrease coverage by 0.98%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
- Coverage   89.55%   88.57%   -0.99%     
==========================================
  Files          20       21       +1     
  Lines         134      140       +6     
  Branches       12       13       +1     
==========================================
+ Hits          120      124       +4     
- Misses         14       16       +2     
Impacted Files Coverage Δ
src/utils/googleAnalytics/set.ts 100.00% <0.00%> (ø)
src/utils/googleAnalytics/index.ts 100.00% <0.00%> (ø)
src/utils/googleAnalytics/pageView.ts 50.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b4ec81...a41be60. Read the comment docs.

this.client = null;
}

static setUp(params: SetUpParams) {
Copy link
Contributor

Choose a reason for hiding this comment

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

setUp에서 U이 대문자인 이유가 있나요?

Copy link
Member Author

@greatSumini greatSumini Oct 27, 2021

Choose a reason for hiding this comment

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

함수 이름이어서 동사가 좋겠다고 생각했습니다! 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

갠적으론 setup 은 그냥 소문자로 가는게 좋을 것 같아요. setup도 하나의 단어라
U를 대문자로 하는 경우를 못본건 아니지만, 너무 극소수여서..;;

중요한건 아니니, 일단은 머지하고, 담에 다시 얘기 나누는걸로 해요!

Copy link
Member Author

Choose a reason for hiding this comment

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

네 알겠습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

말씀하신대로 네이밍 변경했습니다 ㅎㅎ (setUp -> setup)

@alledy
Copy link
Member

alledy commented Oct 30, 2021

@hiphapis 리뷰 끝나시면 어프룹 부탁드립니당!

@greatSumini greatSumini merged commit 9238f8c into EveryAnalytics:main Oct 30, 2021
@greatSumini greatSumini deleted the enhance/suggest-new-interface branch October 30, 2021 18:50
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.

5 participants