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

[BREAKING] Remove deprecations in anticipation of 3.0.0 #246

Merged
merged 2 commits into from
Mar 3, 2018

Conversation

lukemelia
Copy link
Contributor

  • Direct usage of the tether-dialog component is no longer supported, �in favor of opting into tethering behavior by passing a tetherTarget to modal-dialog.
  • Specifying the close action for a modal-dialog component is no longer supported in favor of onClose
  • Specifying the container-class attribute for a modal-dialog component is no longer supported in favor of the camelCase containerClass
  • Specifying the overlay-class attribute for a modal-dialog component is no longer supported in favor of the camelCase overlayClass
  • Specifying the wrapper-class attribute for a modal-dialog component is no longer supported in favor of the camelCase wrapperClass
  • Specifying the target attribute for a modal-dialog component is no longer supported in favor of the tetherTarget
  • Direct usage of the modal-dialog-overlay component is no longer supported. Internally, we just use a div now.

These were all deprecated with warnings during 2.x, so if you are deprecation-free in 2.4.3, you can safely upgrade to 3.0.0

- Direct usage of the `tether-dialog` component is no longer supported, �in favor of opting into tethering behavior by passing a `tetherTarget` to `modal-dialog`.
- Specifying the `close` action for a `modal-dialog` component is no longer supported in favor of `onClose`
- Specifying the `container-class` attribute for a `modal-dialog` component is no longer supported in favor of the camelCase `containerClass`
- Specifying the `overlay-class` attribute for a `modal-dialog` component is no longer supported in favor of the camelCase `overlayClass`
- Specifying the `wrapper-class` attribute for a `modal-dialog` component is no longer supported in favor of the camelCase `wrapperClass`
- Specifying the `target` attribute for a `modal-dialog` component is no longer supported in favor of the `tetherTarget`
- Direct usage of the `modal-dialog-overlay` component is no longer supported. Internally, we just use a div now.

These were all deprecated with warnings during 2.x, so if you are deprecation-free in 2.4.3, you can safely upgrade to 3.0.0
@lukemelia lukemelia merged commit 0ddca7e into master Mar 3, 2018
@lukemelia lukemelia deleted the chore/remove-deprecations branch March 3, 2018 06:28
@@ -70,7 +70,8 @@ export default Component.extend({
}

// if the click is within the dialog, do nothing
if (document.querySelector(modalSelector).contains(target)) {
let modalEl = document.querySelector(modalSelector);
if (modalEl && modalEl.contains(target)) {

Choose a reason for hiding this comment

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

This is safer, but I'm not sure it's quite correct. If there's no modalEl, it still runs onClose. My impression is that it should be

let modalEl = document.querySelector(modalSelector);
if (!modelEl || modelEl.contains(target)) {
  return;
}

this.sendAction('onClose');

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.

2 participants