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

feat: emit change event when toggle task in viewer #2442

Merged

Conversation

jajugoguma
Copy link
Contributor

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

  • Added feature to emit a "change" event when a task's checkbox is toggled in the viewer.
    • This was added as there is no way to notify that the content in the viewer has changed due to a checkbox toggle.

Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

Copy link

@adhrinae adhrinae left a comment

Choose a reason for hiding this comment

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

LGTM.
그런데 실제 토글 시 이벤트가 수신되는지 체크하는 테스트는 작성하는게 어려운가봐요?

@jajugoguma
Copy link
Contributor Author

@adhrinae
이벤트 발생 자체를 확인것은 어렵지는 않은데, 체크박스가 별도의 요소가 아닌 슈도 요소이고, mousedown을 체크박스 요소가 있는 위치에 발생시키는 것을 실패했습니다... 이를 테스트하려면 테스트가 실제 브라우저 상에서 동작해야할 것 같습니다...

Copy link
Contributor

@jwlee1108 jwlee1108 left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다.

@jajugoguma jajugoguma merged commit 3db3595 into master Apr 14, 2022
@jajugoguma jajugoguma deleted the feat/emit-change-event-when-toggle-task-in-viewer branch April 14, 2022 01:38
@TheoBiron
Copy link

Shouldn't this update the value of the markdown editor too ?
Right now, the markdown is not edited, and the data sent through the event emitted doesnt help to re-build the markdown content

@jwlee1108
Copy link
Contributor

jwlee1108 commented May 10, 2022

@TheoBiron

That's a good question. we'll check it. but, the viewer is a light and simple module that uses only toastMark. I don't think there will be a big problem, but we'll do additional work considering the side effects.

ahamelers pushed a commit to ahamelers/tui.editor that referenced this pull request Aug 21, 2023
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.

4 participants