Repository navigation
Conversation
petebacondarwin
left a comment
There was a problem hiding this comment.
A few minor suggestions... I never liked that side-by-side thing so thanks for getting rid of that.
There was a problem hiding this comment.
| describe('when side-by-side (wide)', () => { | |
| describe('when view is wide', () => { |
There was a problem hiding this comment.
there is probably an equivalent narrow describe block in this file too.
There was a problem hiding this comment.
| beforeEach(() => resizeTo(dockSideNavWidth + 1)); // side-by-side | |
| beforeEach(() => resizeTo(dockSideNavWidth + 1)); // wide view |
There was a problem hiding this comment.
| describe('when NOT side-by-side (narrow)', () => { | |
| describe('when view is narrow', () => { |
There was a problem hiding this comment.
| beforeEach(() => resizeTo(dockSideNavWidth - 1)); // NOT side-by-side | |
| beforeEach(() => resizeTo(dockSideNavWidth - 1)); // narrow view |
There was a problem hiding this comment.
This describe block could be:
describe('when changing from narrow to wide view', () => {
There was a problem hiding this comment.
Ideally this should have the same name (or as close as possible to the constant in app.component.ts (showTopMenuWidth) and I would argue that it would be better for the previous line to be computed from this line, rather than the other way around so that the same constant value (i.e. 1048) is used in both.
The reasoning is that there is no clear indication that these need to be kept in sync. One could imagine searching for the equivalent name or value and not finding anything.
…show/hide threshold Use a Sass variable for the screen width break-point at which the top-bar hamburger button is hidden/shown. This allows more easily updating the break-point.
…howing the sidenav As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future.
… from showing the sidenav
As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes angular#37937
bfe4764 to
2112df4
Compare
|
You can preview 2112df4 at https://pr37938-2112df4.ngbuilds.io/. |
…howing the sidenav (#37938) As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future. PR Close #37938
As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes #37937 PR Close #37938
…howing the sidenav (#37938) As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future. PR Close #37938
As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes #37937 PR Close #37938
…show/hide threshold (angular#37938) Use a Sass variable for the screen width break-point at which the top-bar hamburger button is hidden/shown. This allows more easily updating the break-point. PR Close angular#37938
…howing the sidenav (angular#37938) As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future. PR Close angular#37938
…ar#37938) As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes angular#37937 PR Close angular#37938

As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items.
Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions.
This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu.
Fixes #37667.
This PR also includes some refactorings in preparation of the fix. See individual commits for details.