Repository navigation
Conversation
9489a5b to
119dcd1
Compare
|
You can preview 119dcd1 at https://pr31390-119dcd1.ngbuilds.io/. |
|
A couple UX/UI recommendations:
|
119dcd1 to
a9b3ede
Compare
|
You can preview a9b3ede at https://pr31390-a9b3ede.ngbuilds.io/. |
|
Thx for taking a look, @sjtrimble. I fixed the image placement. Regarding the "no results" message, I wouldn't be opposed to showing something (although I assume it should rarely come up for the |
|
One more thing @gkalpak .. I'm still seeing the headers showing up a white and thereby transparent. Try seeing here: https://pr31390-119dcd1.ngbuilds.io/ngmodules |
There was a problem hiding this comment.
I normally put a line break here so it's easier to read ... if you feel like it :)
There was a problem hiding this comment.
I was keeping inline with the convention in this file, which seems to be "no line break, if it's targeting the same element". Happy to go either way.
There was a problem hiding this comment.
I added the line breaks (since I agree it is more readable).
…ent with other `.scss` files
Previously, `.search-area` had a default style of `display: flex`, but it was overriden to `display: block` in media queries for `max-width: 480px` and `min-width: 600px`. As a result, it only had `display: flex` between 481px and 599px. Since no flex layout features are necessary inside `.search-area`, this commit changes the style to always be `display: block` (i.e. the default for `div` elements).
Previously, the `search-results` layout was switch from horizontal to vertical at 480px. Yes, since some search queries can yield more than 5 `.search-area`s, even 600px are too narrow to accomodate a horizontal layout. This commit changes the breakpoint at which the layout switches to vertical from 480px to 600px.
The `ScrollService` sets up some global `window` listeners. Previously, these listeners were never unregistered. This was not a problem in the real app, because the `ScrollService` instance exists for the lifetime of a user session. In tests, however, where the `window` instance is among all tests, the listeners would survive the `ScrollService` tests. This, in addition to the fact that we used a mock `ViewportScroller` which did not return the expected type from `getScrollPosition()`, caused errors to be thrown in unrelated tests (i.e. whenever a scroll event was emitted on `window`). See [here][1] for an example failure. This commit fixes it by adding an `ngOnDestroy()` method that unregisters the listeners and ensuring it is called after each `ScrollService` test. [1]: https://circleci.com/gh/angular/angular/381649
The `.sidenav-content` element, [which is also][1] the `#file-not-found` element, [already has][2] the necessary padding. Especially the top padding is important to ensure the element is not obscured by the top-bar. [1]: https://github.com/angular/angular/blob/1d3e22766/aio/src/app/app.component.html#L51 [2]: https://github.com/angular/angular/blob/1d3e22766/aio/src/styles/1-layouts/_content-layout.scss#L10
a9b3ede to
4be1fe9
Compare
Great catch! 😱 😱 😱 |
4be1fe9 to
9967ab9
Compare
9967ab9 to
4fac6dd
Compare
|
You can preview 4be1fe9 at https://pr31390-4be1fe9.ngbuilds.io/. |
|
You can preview 9967ab9 at https://pr31390-9967ab9.ngbuilds.io/. |
|
You can preview 4fac6dd at https://pr31390-4fac6dd.ngbuilds.io/. |
Previously, `.search-area` had a default style of `display: flex`, but it was overriden to `display: block` in media queries for `max-width: 480px` and `min-width: 600px`. As a result, it only had `display: flex` between 481px and 599px. Since no flex layout features are necessary inside `.search-area`, this commit changes the style to always be `display: block` (i.e. the default for `div` elements). PR Close #31390
…31390) Previously, the `search-results` layout was switch from horizontal to vertical at 480px. Yes, since some search queries can yield more than 5 `.search-area`s, even 600px are too narrow to accomodate a horizontal layout. This commit changes the breakpoint at which the layout switches to vertical from 480px to 600px. PR Close #31390
…ts (#31390) The `ScrollService` sets up some global `window` listeners. Previously, these listeners were never unregistered. This was not a problem in the real app, because the `ScrollService` instance exists for the lifetime of a user session. In tests, however, where the `window` instance is among all tests, the listeners would survive the `ScrollService` tests. This, in addition to the fact that we used a mock `ViewportScroller` which did not return the expected type from `getScrollPosition()`, caused errors to be thrown in unrelated tests (i.e. whenever a scroll event was emitted on `window`). See [here][1] for an example failure. This commit fixes it by adding an `ngOnDestroy()` method that unregisters the listeners and ensuring it is called after each `ScrollService` test. [1]: https://circleci.com/gh/angular/angular/381649 PR Close #31390
The `.sidenav-content` element, [which is also][1] the `#file-not-found` element, [already has][2] the necessary padding. Especially the top padding is important to ensure the element is not obscured by the top-bar. [1]: https://github.com/angular/angular/blob/1d3e22766/aio/src/app/app.component.html#L51 [2]: https://github.com/angular/angular/blob/1d3e22766/aio/src/styles/1-layouts/_content-layout.scss#L10 PR Close #31390
Previously, `.search-area` had a default style of `display: flex`, but it was overriden to `display: block` in media queries for `max-width: 480px` and `min-width: 600px`. As a result, it only had `display: flex` between 481px and 599px. Since no flex layout features are necessary inside `.search-area`, this commit changes the style to always be `display: block` (i.e. the default for `div` elements). PR Close #31390
…31390) Previously, the `search-results` layout was switch from horizontal to vertical at 480px. Yes, since some search queries can yield more than 5 `.search-area`s, even 600px are too narrow to accomodate a horizontal layout. This commit changes the breakpoint at which the layout switches to vertical from 480px to 600px. PR Close #31390
…ts (#31390) The `ScrollService` sets up some global `window` listeners. Previously, these listeners were never unregistered. This was not a problem in the real app, because the `ScrollService` instance exists for the lifetime of a user session. In tests, however, where the `window` instance is among all tests, the listeners would survive the `ScrollService` tests. This, in addition to the fact that we used a mock `ViewportScroller` which did not return the expected type from `getScrollPosition()`, caused errors to be thrown in unrelated tests (i.e. whenever a scroll event was emitted on `window`). See [here][1] for an example failure. This commit fixes it by adding an `ngOnDestroy()` method that unregisters the listeners and ensuring it is called after each `ScrollService` test. [1]: https://circleci.com/gh/angular/angular/381649 PR Close #31390
The `.sidenav-content` element, [which is also][1] the `#file-not-found` element, [already has][2] the necessary padding. Especially the top padding is important to ensure the element is not obscured by the top-bar. [1]: https://github.com/angular/angular/blob/1d3e22766/aio/src/app/app.component.html#L51 [2]: https://github.com/angular/angular/blob/1d3e22766/aio/src/styles/1-layouts/_content-layout.scss#L10 PR Close #31390



I started to fix the "No results found" message being hidden, but ended up doing some clean up and other minor fixes (see individual commits for details).
WRT to the main fix ("No results found" being hidden):
BEFORE

AFTER

Both before and after the "No results found" is displayed correctly on the "Page Not Found" page:
UPDATE:
This PR also fixes a bug in
ScrollServicethat caused test flakes (example). No idea why the flakes started appearing on this PR (which was just changing CSS styles 🤷♂).