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

Add change event #12399

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Add change event #12399

merged 3 commits into from
Mar 28, 2023

Conversation

alattalatta
Copy link
Member

Description

change 이벤트를 추가합니다.

Motivation

Additional details

Related issues and pull requests

@alattalatta alattalatta requested a review from a team as a code owner March 26, 2023 07:41
@alattalatta alattalatta requested review from hochan222 and removed request for a team March 26, 2023 07:41
@github-actions github-actions bot added the l10n-ko Issues related to Korean content. label Mar 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2023

Preview URLs

Flaws (7)

URL: /ko/docs/Web/API/HTMLElement/change_event
Title: HTMLElement: change 이벤트
Flaw count: 7

  • macros:
    • /ko/docs/Web/HTML/Element/input/text does not exist but fell back to /en-US/docs/Web/HTML/Element/input/text
    • /ko/docs/Web/HTML/Element/input/search does not exist but fell back to /en-US/docs/Web/HTML/Element/input/search
    • /ko/docs/Web/HTML/Element/input/url does not exist but fell back to /en-US/docs/Web/HTML/Element/input/url
    • /ko/docs/Web/HTML/Element/input/tel does not exist but fell back to /en-US/docs/Web/HTML/Element/input/tel
    • /ko/docs/Web/HTML/Element/input/email does not exist but fell back to /en-US/docs/Web/HTML/Element/input/email
    • and 1 more flaws omitted
  • translation_differences:
    • Differences in the important macros (3 in common of 7 possible)
External URLs (2)

URL: /ko/docs/Web/API/HTMLElement/change_event
Title: HTMLElement: change 이벤트

(comment last updated: 2023-03-28 10:30:51)

Copy link
Member

@hochan222 hochan222 left a comment

Choose a reason for hiding this comment

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

@alattalatta 님 안녕하세요.

sourceCommit에 대한 한가지 리뷰사항 남겨두었습니다!

고생 많으셨습니다. 좋은 하루 보내세요 :)

slug: Web/API/HTMLElement/change_event
original_slug: Web/API/GlobalEventHandlers/onchange
l10n:
sourceCommit: 4a4dc12d552b6da5fc320369001434cdb46f9f59
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sourceCommit: 4a4dc12d552b6da5fc320369001434cdb46f9f59
sourceCommit: 0230ecc4418a1e52bca6b4d03c4eb794f90d04f1

페이지 갱신 표시 안내서에 따라 content repo의 동일한 파일(페이지)의 가장 최신 hash 값을 명시해야합니다.

안내서가 조금 모호한 부분이 있네요! 수정하겠습니다.

Copy link
Member

@hochan222 hochan222 Mar 27, 2023

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.

그런데 sourceCommit이 원본 마지막 커밋보다 앞서나가는 경우에는 괜찮지 않을까요..? 4a4dc12d552b6da5fc320369001434cdb46f9f59로 조회하나 0230ecc4418a1e52bca6b4d03c4eb794f90d04f1로 조회하나 2월 28일인 건 같으니까요

Copy link
Member

@hochan222 hochan222 Mar 28, 2023

Choose a reason for hiding this comment

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

우선, https://github.com/orgs/mdn/discussions/129 에서 현재 방식으로 결정되어서 다른 locale은 파일 기준으로 기록하고 있습니다.

image

위 이미지의 Source Commit 부분을 현재 mdn/yari#8338 에서 개발하고 있습니다.

그런데 sourceCommit이 원본 마지막 커밋보다 앞서나가는 경우에는 괜찮지 않을까요..?

현재 고민중인 부분인데요. 답변을 드리기 위해 조금 자세히 설명을 드리겠습니다.

구현 방법에 따라서 괜찮고 안괜찮고가 달라져서 우선은 안전하게 변경 요청 드렸습니다. (회사 업무가 많아서.. 문제 해결에 시간이 조금 걸릴것같습니다.)

고민 사항은 아래와 같습니다.

(1) git rev-list --count ${commitHash}..HEAD -- ${filename}을 통해 해당 파일에서 차이나는 commit 개수를 구할 수 있습니다. 이때 파일의 history에 포함된 hash만 유효합니다.

  • 장점
    • 확실하고 안전하게 결과 값을 도출 할 수 있습니다.
  • 단점
    • 시간이 오래 걸립니다. (2000개 파일, 약 3분 20초)

(2) git log --pretty=format:'%H' --name-only ${commitHash}..${memCommitStoreOldest}에서 git hash 변경에 포함된 파일 목록을 불러오고, 최근 hash에서 기록된 memCommitStoreOldest까지 순회하며 해당되는 파일 이름과 일치하면 count를 증가시켜 차이나는 commit 개수를 구하는 방식입니다.

  • 장점
    • 빠릅니다. (2000개 파일, 약 22초)
  • 단점
    • git log 출력 값을 자료구조 Map에 확장해나가며 저장하고 있는데, commit이 많이 뒤쳐지게 된다면 메모리가 터질 위험이 있습니다. 현재 content repo의 커밋 개수는 17000개이고, 커밋이 증가되는 속도를 보면 충분히 고려되어야합니다. 이때, 확장을 멈출 기준을 정하는데 어려움을 겪고있습니다. (content repo에 대해 hash가 100개 뒤쳐져 있다고 해도 실제 해당 파일에서는 hash가 2개만 뒤쳐져있을 수 있습니다.)

따라서 링크드린 PR이 병합되기전까지는 우선 현재와같이 안내드리려고합니다 ㅜㅜ

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

@hochan222 hochan222 left a comment

Choose a reason for hiding this comment

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

바로 머지하면 comment 알림이 안갈 수 있어서 확인 답변 주시면 머지하겠습니다!

@hochan222 hochan222 merged commit 303631e into mdn:main Mar 28, 2023
@alattalatta alattalatta deleted the api/change_event branch March 28, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-ko Issues related to Korean content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants