fix(aio): sidebar folder state after select item
Closes #17245 and #17253 When the user selects a doc item in the side nav: 1) expand folder(s) leading to the selected doc item 2) on a wide display, keep other already expanded folders open 3) on narrow (mobile) display, collapse other expanded folders Used to do (3) when wide. Issue #17245 asks for (2). That logic was bypassed for selected node when we allowed headers to have content because that unintentionally expanded the header’s folder when selected. Because the selected node is no longer a header with content, removing this exclusion also means that folders are expanded/collapsed with above logic even for API pages.
This commit is contained in:

committed by
Pete Bacon Darwin

parent
a0b30e5dfb
commit
2d5623911a
@ -27,9 +27,7 @@ describe('site App', function() {
|
||||
// Show the menu
|
||||
page.docsMenuLink.click();
|
||||
|
||||
// Open the tutorial header
|
||||
page.getNavItem(/tutorial/i).click();
|
||||
|
||||
// Tutorial folder should still be expanded because this test runs in wide mode
|
||||
// Navigate to the tutorial introduction via a link in the sidenav
|
||||
page.getNavItem(/introduction/i).click();
|
||||
expect(page.getDocViewerText()).toMatch(/Tutorial: Tour of Heroes/i);
|
||||
|
Reference in New Issue
Block a user