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

fix: prevent opening form popup through detail popup when it is disabled #1252

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

adhrinae
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

Fixed that the default form popup appears even though the useFormPopup option is disabled. because the EventDetailPopup component is calling it ignoring the option.

Resolves #1249.

AS-IS

Screen.Recording.2022-08-12.at.16.10.26.mov

TO-BE

Screen.Recording.2022-08-12.at.16.11.51.mov

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

Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다.

popupArrowPointPosition,
});
} else {
eventBus.fire('beforeUpdateEvent', { event: event.toEventObject(), changes: {} });
Copy link
Contributor

Choose a reason for hiding this comment

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

beforeUpdateEvent 커스텀이벤트는 뭔가 이벤트를 실제로 수정할 때 일어나야할 것 같은데 Edit 버튼을 누르면 changes 없이 이벤트가 발생하는게 조금 어색하게 느껴집니다. 어떻게 생각하시나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

일단 지금 코드는 v1 동작과 동일한 상태입니다.
제안한대로 수정하려면 저는 인스턴스 이벤트가 새로 추가되어야한다고 봐서, 최대한 변경을 적게 만들었어요.

changes 도 옵셔널로 만들까 했는데 그러면 신경써야할게 너무 많아서 그냥 빈 객체를 전달하는거로 바꿨습니다.

Copy link
Contributor

Choose a reason for hiding this comment

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

넵 알겠습니다!

@adhrinae adhrinae merged commit eb23820 into main Aug 16, 2022
@adhrinae adhrinae deleted the fix/hide-form-popup branch August 16, 2022 03:05
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.

Form Popup is triggered on Update event even if useFormPopup is false
4 participants