-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
aio: add search to 404 page #19682
aio: add search to 404 page #19682
Conversation
You can preview 95e2bf6 at https://pr19682-95e2bf6.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! (A couple of minor comments, but LGTM anyway 👍)
@@ -8,6 +8,7 @@ | |||
"moduleResolution": "node", | |||
"emitDecoratorMetadata": true, | |||
"experimentalDecorators": true, | |||
"noUnusedLocals": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ 💯 ❤️
service.searchResults.subscribe(results => searchResults = results); | ||
service.search('some query'); | ||
expect(searchResults).toEqual(mockSearchResults); | ||
const $searchResults = service.search('some query'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the $
was supposed to go at the end 😛
|
||
searchResults.next({ query: '', results: results}); | ||
setSearchResults('', getTestResults(3)); | ||
component.ngOnChanges({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary (here and below), since setSearchResults()
calls it anyway?
aio/content/file-not-found.md
Outdated
@@ -5,5 +5,7 @@ | |||
<div class="nf-response l-flex-wrap"> | |||
<h1 class="no-toc">Page Not Found</h1> | |||
<p>We're sorry. The page you are looking for cannot be found.</p> | |||
<p>Perhaps you were looking for something else...</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove that from here and add a heading right above the search results explaining what they are.
Right now it is not exactly obvious what all these words under the main 404 page are (they are search results 😁).
This will allow it to be used by an embedded component.
The 404 page will now run a search based on the given URL to offer suggestions for the page that the user really wanted.
95e2bf6
to
c7696bc
Compare
@petebacondarwin The AIO test failure looks real. It appears aio is now over one of the size limits. |
@petebacondarwin Can you also set the PR target? I assume it is |
c7696bc
to
ee92b40
Compare
Sorry @chuckjaz - I have added the target and bumped the payload limit a bit more. |
You can preview ee92b40 at https://pr19682-ee92b40.ngbuilds.io/. |
@petebacondarwin As this doesn't apply cleanly to 4.4.x, could you create another PR that adds this change to 4.4.x? My guess would be to skip the commit for bumping rxjs, but having another PR also proofs that this will really work on 4.4.x. |
Changed the target to be masteronly for this PR... |
This will allow it to be used by an embedded component. PR Close #19682
The 404 page will now run a search based on the given URL to offer suggestions for the page that the user really wanted. PR Close #19682
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
... and a few other tidy ups; so it is best to review commit by commit.
Closes #16656