Skip to content

Link search results to their package and module#489

Merged
thomashoneyman merged 2 commits into
masterfrom
link-search-result-badges
Jul 6, 2026
Merged

Link search results to their package and module#489
thomashoneyman merged 2 commits into
masterfrom
link-search-result-badges

Conversation

@thomashoneyman

@thomashoneyman thomashoneyman commented Jul 6, 2026

Copy link
Copy Markdown
Member

Supersedes #424 by @joprice, whose commit this branch includes: the package and module badges on search results become links to the corresponding package page and module documentation page. Closes #268.

One fix on top of the original PR: builtin modules such as Prim appear in search results but have no package page, and #424 routed their package badge through a fallback to the home page (the -- this shouldn't happen branch of routeToPackage, which linking the badges made reachable). The package badge is now only rendered as a link when the result actually has a package page; for builtin results it stays plain text. The fixup also reuses packageNameRoute from Foundation and dedupes the badge markup shared by the module and declaration cases.

joprice and others added 2 commits July 6, 2026 09:05
Builtin modules such as Prim appear in search results but have no
package page; the routeToPackage helper from #424 sent their package
badge to the home page. Render the badge as plain text when the result
has no package, reuse packageNameRoute from Foundation, and share the
badge markup between the module and declaration result arms.
@thomashoneyman thomashoneyman merged commit d1c6bfd into master Jul 6, 2026
2 checks passed
@thomashoneyman thomashoneyman deleted the link-search-result-badges branch July 6, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add links for packages and modules on search results

2 participants