feat(docs): add search functionality to documentation#2690
feat(docs): add search functionality to documentation#2690iamomm-hack wants to merge 2 commits intostellar:masterfrom
Conversation
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds local, client-side search to the Freighter documentation site (Docusaurus) so users can quickly find relevant pages without relying on an external search API.
Changes:
- Added
@easyops-cn/docusaurus-search-localto the docs workspace dependencies. - Added a navbar search item and configured the local search plugin in
docusaurus.config.js. - Updated lockfile and the root
packageManagermetadata as part of the dependency change.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
docs/package.json |
Adds the local search plugin dependency to the docs workspace. |
docs/docusaurus.config.js |
Adds navbar search UI and configures the local search plugin. |
package.json |
Updates the Yarn packageManager field to include a hash. |
yarn.lock |
Captures the new dependency graph introduced by the search plugin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@docusaurus/core": "3.6.3", | ||
| "@docusaurus/preset-classic": "3.6.3", | ||
| "@easyops-cn/docusaurus-search-local": "^0.55.1", | ||
| "@stellar/freighter-api": "latest", |
There was a problem hiding this comment.
Adding @easyops-cn/docusaurus-search-local introduces a second set of @docusaurus/* packages at 3.10.0 in yarn.lock while the docs site is pinned to 3.6.3. Running multiple Docusaurus minor versions side-by-side can cause plugin/runtime incompatibilities and also bloats the install. Consider aligning versions by either upgrading docs to 3.10.0 or adding a Yarn resolution to force @docusaurus/* (and react-router deps if needed) to the same version used by docs.
| "@docusaurus/core": "3.6.3", | ||
| "@docusaurus/preset-classic": "3.6.3", | ||
| "@easyops-cn/docusaurus-search-local": "^0.55.1", | ||
| "@stellar/freighter-api": "latest", |
There was a problem hiding this comment.
All other docs dependencies are pinned to exact versions, but this new dependency uses a caret range. To keep installs deterministic and avoid unexpected lockfile churn, pin @easyops-cn/docusaurus-search-local to an exact version (and manage updates intentionally).
| "@stellar/freighter-api": "latest", | |
| "@stellar/freighter-api": "4.1.0", |
| ], | ||
| }; | ||
|
|
||
| // SEARCH PLUGIN (FINAL) |
There was a problem hiding this comment.
The comment "SEARCH PLUGIN (FINAL)" isn’t descriptive of behavior and will likely become stale. Prefer either removing it or replacing it with a short, durable description (e.g., "Local doc search") without workflow/status wording like "FINAL".
| // SEARCH PLUGIN (FINAL) | |
| // Local doc search plugin |
| }, | ||
| "packageManager": "yarn@4.10.0" | ||
| "packageManager": "yarn@4.10.0+sha512.8dd111dbb1658cf17089636e5bf490795958158755f36cb75c5a2db0bda6be4d84b95447753627f3330d1457cb6f7e8c1e466eaed959073c82be0242c2cd41e7" | ||
| } |
There was a problem hiding this comment.
PR description says changes are limited to the docs workspace, but this updates the root-level packageManager field. If this hash change is intentional (e.g., standardizing the Yarn binary via Corepack), it would help to note it in the PR description; otherwise consider reverting to keep the scope strictly docs-only.
b6245f2 to
701308b
Compare
iamomm-hack
left a comment
There was a problem hiding this comment.
Cleaned up the PR to limit changes strictly to the docs workspace and removed unrelated root-level changes.
iamomm-hack
left a comment
There was a problem hiding this comment.
Thanks for the review!
I’ve limited the changes strictly to the docs workspace and cleaned up unrelated root-level changes.
Regarding the dependency warnings, I used @easyops-cn/docusaurus-search-local as a common approach for adding local search in Docusaurus. Happy to switch to an alternative if preferred.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
c03233f to
2288357
Compare
|
Rebased on latest master and refreshed the lockfile to resolve merge conflicts. Checks should rerun now. |
Add Search Bar to Freighter Docs
Problem
The documentation currently lacks a search feature, making it difficult for users to quickly find relevant information.
Solution
Features
Notes