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(drawer): drawer container not reacting to drawer removal #7060

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 13, 2017

Fixes the drawer container not reacting if one of the drawers is destroyed.

Fixes #6271.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 13, 2017
@@ -153,6 +155,9 @@ export class MdDrawer implements AfterContentInit, OnDestroy {
/** Event emitted when the drawer's position changes. */
@Output('positionChanged') onPositionChanged = new EventEmitter<void>();

/** Event emitted when the drawer's mode changes. */
@Output('modeChanged') onModeChanged = new EventEmitter<void>();
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is really just for internal coordination, can we make it a Subject with no @Output() and _ name?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I did this to keep it consistent with the positionChanged.

@crisbeto
Copy link
Member Author

Addressed the feedback @mmalerba.

@mmalerba
Copy link
Contributor

@crisbeto I think this was mostly addressed by #6712 although I think there are some small differences in how we implemented it, you're welcome to take a look and see if there's anything you'd change about how I did it.

@crisbeto
Copy link
Member Author

crisbeto commented Sep 26, 2017

@mmalerba I just tried throwing in the unit tests from this PR into master. It looks like your changes fixed one of the issues, but they still don't handle the case where a drawer is destroyed so I'd say it's worth keeping this PR around.

@crisbeto
Copy link
Member Author

crisbeto commented Sep 26, 2017

Rebased and scoped my changes only to the onDestroy behavior, @mmalerba can you take another look?

if (!this._drawers.length ||
this._isDrawerOpen(this._start) ||
this._isDrawerOpen(this._end)
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

style nit: move to end of previous line

@mmalerba mmalerba changed the title fix(drawer): drawer container not reacting to drawer removal and mode change fix(drawer): drawer container not reacting to drawer removal Sep 26, 2017
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Sep 26, 2017
@mmalerba mmalerba added the P2 The issue is important to a large percentage of users, with a workaround label Sep 27, 2017
Fixes the drawer container not reacting if one of the drawers is destroyed.

Fixes angular#6271.
@andrewseguin andrewseguin merged commit b0b91f4 into angular:master Sep 29, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sidenav] container styles not updated after sidenav destroy or mode change
4 participants