Skip to content

feat(aio): close sidenav in narrow (mobile) mode when select a new doc#16617

Merged
mhevery merged 1 commit into
angular:masterfrom
IdeaBlade:aio-close-sidenav-on-select
May 8, 2017
Merged

feat(aio): close sidenav in narrow (mobile) mode when select a new doc#16617
mhevery merged 1 commit into
angular:masterfrom
IdeaBlade:aio-close-sidenav-on-select

Conversation

@wardbell

@wardbell wardbell commented May 6, 2017

Copy link
Copy Markdown
Contributor

closes #16603

This PR affects narrow (mobile) only. Now the sidenav closes when the current node (the current doc) changes.

Unchanged: when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

@wardbell wardbell added comp: aio action: review The PR is still awaiting reviews from at least one requested reviewer labels May 6, 2017
@wardbell wardbell self-assigned this May 6, 2017
@mary-poppins

Copy link
Copy Markdown

The angular.io preview for 54da337864f37e30e6c97eceb788518c5170b34a is available here.

@wardbell wardbell force-pushed the aio-close-sidenav-on-select branch from 54da337 to fcaecd2 Compare May 7, 2017 01:04
…cument

closes angular#16603
As before this PR, when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.
@wardbell wardbell force-pushed the aio-close-sidenav-on-select branch from fcaecd2 to cdae565 Compare May 7, 2017 01:07
@mary-poppins

Copy link
Copy Markdown

The angular.io preview for cdae565 is available here.

@mary-poppins

Copy link
Copy Markdown

The angular.io preview for fcaecd29f2c5bf410c9d9dff15344d42bebeb7ed is available here.


this.navigationService.currentNode.subscribe(currentNode => {
this.currentNode = currentNode;
this.updateHostClasses();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is unrelated to this PR, but it fixes another issue with styling applied prematurely (before the document is fetched). Maybe worth putting into a separate commit and test.

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.

@gkalpak do you mean this issue? #16635

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes.

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.

We agreed to let this request go and merge.

@gkalpak gkalpak added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 7, 2017

@petebacondarwin petebacondarwin left a comment

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.

Good stuff @wardbell - can you respond to @gkalpak's comment about updateHostClasses and then add the merge label?

@wardbell wardbell added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 8, 2017
@mhevery mhevery merged commit 3887d8a into angular:master May 8, 2017
@wardbell wardbell deleted the aio-close-sidenav-on-select branch May 9, 2017 00:12
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
…cument (angular#16617)

closes angular#16603
As before this PR, when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
…cument (angular#16617)

closes angular#16603
As before this PR, when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 11, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aio: make sidenav close in mobile mode when a doc is selected

6 participants