Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(mdPanel): Wrapper and Panel elements referenced in the MdPanelRef - #9231

Merged
ThomasBurleson merged 1 commit into
angular:masterfrom
bradrich:feat/panel-element-reference
Aug 21, 2016
Merged

ThomasBurleson merged 1 commit into
angular:masterfrom
bradrich:feat/panel-element-reference

Conversation

@bradrich

@bradrich bradrich commented Aug 4, 2016 •

Copy link
Copy Markdown
Contributor

A JQLite reference of the Container/Wrapper and Panel elements have been added to the MdPanelRef object as public properties. It is now possible to use the standard addClass, removeClass, toggleClass, etc methods on those referenced elements.

Fixes #9109

@EladBezalel

Copy link
Copy Markdown
Member

LGTM

@EladBezalel EladBezalel added the needs: review This PR is waiting on review from the team label Aug 4, 2016
* create.
* - `isAttached` - `{boolean}`: Whether the panel is attached to the DOM.
* Visibility to the user does not factor into isAttached.
* - `panelContainer` - `{angular.JQLite}`: The wrapper element containing the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ErinCoughlan Not sure if you saw these earlier, but just wanted to make sure.

@bradrich

bradrich commented Aug 5, 2016

Copy link
Copy Markdown
Contributor Author

@ErinCoughlan Are you thinking that I should add back in the addClass, removeClass and toggleClass methods, and make them have log errors that direct developers to the new methods? That is a good idea. I will wait on @ThomasBurleson before making that call, unless you give me the go ahead.

@EladBezalel

Copy link
Copy Markdown
Member

@ErinCoughlan that's a good idea.. that way we can make sure it's not breaking anyone

@ErinCoughlan

Copy link
Copy Markdown
Contributor

@bradrich @EladBezalel After some thought, I think we should follow the real deprecation strategy here. We don't want to break people and we want to give them some time to migrate to the new methods.

  1. Keep the methods functional so the apps won't be broken if they are using them, but mark them @deprecated.
  2. Throw a warning, not error, that they are deprecated and give the new line to switch to. Probably also have a timeline for when we will remove them. @ThomasBurleson I don't know the normal deprecation timeline for material, but this should match it.
  3. After the deprecation period, upgrade the warnings to errors, and make the functions not work.
  4. After Y time, remove the methods entirely. Ideally, you would do this Y time after the errors are added. The reason not to remove the methods at first is because the error message says how to migrate to the new versions, so people won't have to think of how to fix their apps.

@bradrich

bradrich commented Aug 5, 2016

Copy link
Copy Markdown
Contributor Author

@ErinCoughlan I agree with this and will move forward with the changes.

A JQLite reference of the Container/Wrapper and Panel elements have been added to the MdPanelRef object as public properties. It is now possible to use the standard `addClass`, `removeClass`, `toggleClass`, etc methods on those referenced elements.

Fixes angular#9109

Ping @ErinCoughlan
@bradrich
bradrich force-pushed the feat/panel-element-reference branch from 3d4876d to a7d6ea6 Compare August 9, 2016 23:52
@bradrich

bradrich commented Aug 9, 2016

Copy link
Copy Markdown
Contributor Author

@ErinCoughlan Please take a look at the newest commit that contains the deprecation notices and warnings.

'The addClass method is in the process of being deprecated. ' +
'Full deprecation is scheduled for the Angular Material 1.2 release. ' +
'To achieve the same results, use the panelContainer or panelEl ' +
'JQLite elements that are referenced in MdPanelRef.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would almost even write the line to replace this one to make it even easier. Not strictly required though.

@ErinCoughlan

Copy link
Copy Markdown
Contributor

LGTM

@EladBezalel

Copy link
Copy Markdown
Member

@bradrich can you open an issue at 1.2 milestone so we can keep track of this deprecation ?

@bradrich

Copy link
Copy Markdown
Contributor Author

@EladBezalel #9310.

@ThomasBurleson ThomasBurleson added this to the 1.1.1 milestone Aug 18, 2016
@ThomasBurleson ThomasBurleson added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Aug 18, 2016
@ThomasBurleson
ThomasBurleson merged commit 87c4b01 into angular:master Aug 21, 2016
Splaktar added a commit that referenced this pull request Jul 26, 2020
…ggleClass

- deprecated in 2016 in favor of using the `panelContainer` or `panelEl`
  JQLite elements that are referenced in the MdPanelRef object.
- more details in #9231 (comment)

Fixes #9310

BREAKING CHANGE: The deprecated `MdPanelRef.addClass()`, `MdPanelRef.removeClass()`, and `MdPanelRef.toggleClass()` functions have been removed. These were deprecated in 2016 in favor of using the `panelContainer` or `panelEl` JQLite elements that are referenced in the [MdPanelRef](https://material.angularjs.org/latest/api/type/MdPanelRef) object.

squash! refactor(tabs): remove deprecated md-no-disconnect
Splaktar added a commit that referenced this pull request Jul 27, 2020
…ggleClass

- deprecated in 2016 in favor of using the `panelContainer` or `panelEl`
  JQLite elements that are referenced in the MdPanelRef object.
- more details in #9231 (comment)

Fixes #9310

BREAKING CHANGE: The deprecated `MdPanelRef.addClass()`, `MdPanelRef.removeClass()`, and `MdPanelRef.toggleClass()` functions have been removed. These were deprecated in 2016 in favor of using the `panelContainer` or `panelEl` JQLite elements that are referenced in the [MdPanelRef](https://material.angularjs.org/latest/api/type/MdPanelRef) object.

squash! refactor(tabs): remove deprecated md-no-disconnect
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr: merge ready This PR is ready for a caretaker to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants