microsoft / TypeScript-Website

The Website and web infrastructure for learning TypeScript
https://www.typescriptlang.org
Creative Commons Attribution 4.0 International
2.23k stars 1.37k forks source link

Docs: Include release notes in search results #2489

Closed wbt closed 1 year ago

wbt commented 2 years ago

The release notes pages do not appear to be included in search results. Frequently, when coming across a great answer on StackOverflow or some other site (example here), there's a link to the documentation of some feature as described in the release notes, with a fair amount of detail. Even knowing the exact title of the section, searching for it in the docs' search tool does not turn up that result.

In that specific example, the only search result is a shorter description which is better than nothing, but often there is nothing helpful at all because the only documentation of some feature is in the release notes.

As another example, someone trying to learn about the Awaited utility type might try search, with no results about what they're looking for, and most of the results not even for the same search term: image

If they've already read through the documentation and are somewhat familiar with its structure, they might even figure out how to browse on the left into Handbook through Type Manipulation, looking through the section on Generics or any other subsection and not finding it there. They might eventually figure out these particular generic types are actually under Reference => Utility Types but Awaited isn't on the list. At this point they might think they were just imagining the existence of Awaited the same way they imagined the existence of a valueof keyword which behaved analogously to keyof but which they actually have to create themselves (or use a library) as a generic custom utility type.

To find the actual documentation, you have to close the Reference section on the left and open "What's New" even though this feature isn't new since the time the reader first read through the handbook, and then somehow magically know that this utility type happened to be introduced in TypeScript 4.5, navigating to that particular release and scrolling down to the right section.

It's unreasonable to expect every developer to magically remember which specific version number any particular TypeScript feature was released in, and they shouldn't have to: it shouldn't matter, as long as it's in the past and they're using a current version now! If they read through the documentation and get familiar with whatever version was current when they started learning TypeScript, they should only have to read release notes for breaking-changes versions and should be able to find documentation about other features integrated with the rest of the reference material through search or browse on an as-needed basis, with release notes perhaps linking to the locations where documentation was added or updated. Node.js documentation handles this much better, with integrated documentation allowing views for different versions, and documentation for each feature including a note about when that was introduced.

Finding that this is TypeScript's expectation of new developers really makes the onboarding experience much more painful than it should be and turns folks off of wanting to learn or use TypeScript at all.

By comparison, it is a much more reasonable expectation that using the "Search Docs" feature in the upper right corner would produce results in any section of the documentation where the result may appear. Yet, that expectation repeatedly fails, further reinforcing the message that "Typescript is unintuitive, with behavior that won't match expectations" and discouraging people from thinking they have the abilities to understand what's going on in TypeScript well enough to use it even at a basic level.

orta commented 2 years ago

Yeah, I think the release notes not showing up in search is a bug when algolia moved to their new index format - it was there

typescript-bot commented 1 year ago

Hello! As per #2804, we are automatically closing all open issues. Please see #2804 for a description of what issues and PRs can be accepted going forward.