Fixing styles and documentation accuracy#3
Conversation
Replace the minimal bundled Swagger page with a full read-only API reference page. Import generated metadata, add an intro section with download/source actions and examples for opening Swagger on a local Listenarr instance, and render a read-only Swagger UI by fetching the bundled OpenAPI JSON into memory and stripping the spec description. Hide interactive/authorization/try-out controls and tweak Swagger UI settings (docExpansion, filter, supportedSubmitMethods). Propagate the same initializer change to the static swagger-initializer and the build script. Also update styles for the new layout and components, and change the homepage callout button text (and remove a hero logo image). Includes utility helpers (fetchSwaggerSpec, stripSwaggerDescription, formatTimestamp) and improved error messaging.
Update documentation to clarify the bundled API guide: reword intro, rename the API reference, add a download link for the bundled OpenAPI JSON, and add instructions for opening Swagger on a local Listenarr instance (emphasizing the GitHub Pages site is read-only). Tweak refresh wording for the OpenAPI snapshot. In CSS, make the navbar transparent and embed GitHub/Discord SVG masks as data URIs (removing external image path refs) to improve styling and asset reliability.
Integrate @easyops-cn/docusaurus-search-local (config, dependency and lockfile changes) and add a navbar search item with accompanying UI styles. Introduce mobile navbar sidebar components (PrimaryMenu, SecondaryMenu, MobileSidebar) and responsive CSS for the sidebar/search. Remove product-tour and reference docs (features.md, api.md, development.md) and their sidebar entries. Update the API docs page copy and examples to note Swagger is development-only and default to port 4545. Bump Node engine requirement to >=20.18.1 and refresh audimeta.trending.json generated timestamp. Lockfile updated to include search plugin dependencies.
There was a problem hiding this comment.
Pull request overview
This PR updates the Docusaurus docs site UX (especially mobile navbar/sidebar and local search) and revises the API reference page to more accurately reflect how Swagger/OpenAPI is exposed in typical Listenarr installs.
Changes:
- Added local indexed search via
@easyops-cn/docusaurus-search-localand a navbar search item. - Reworked the API page to present a read-only OpenAPI reference + clearer guidance for development-only Swagger UI.
- Adjusted mobile navbar/sidebar styling and theme overrides to improve drawer/nav behavior at ≤996px.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| static/api-ui/swagger-initializer.js | Loads OpenAPI JSON and injects a modified spec into Swagger UI. |
| src/theme/Navbar/MobileSidebar/index.js | Adds a custom mobile sidebar wrapper/layout for the navbar drawer. |
| src/theme/Navbar/MobileSidebar/SecondaryMenu/index.js | Adds custom secondary menu behavior/error boundary for mobile. |
| src/theme/Navbar/MobileSidebar/PrimaryMenu/index.js | Adds custom primary menu rendering (filters search item). |
| src/pages/index.js | Tweaks homepage hero and API CTA wording. |
| src/pages/api/index.module.css | Overhauls API page layout/styling and hides interactive Swagger UI elements. |
| src/pages/api/index.js | Replaces the old bundled Swagger UI page with a read-only reference + guidance content. |
| src/data/audimeta.trending.json | Refreshes generated trending data timestamp. |
| src/css/custom.css | Adds navbar/search styling and mobile sidebar/drawer overrides; inlines icon SVGs. |
| sidebars.js | Removes sidebar categories referencing deleted docs sections. |
| scripts/sync-listenarr.mjs | Updates Swagger initializer generation to inline spec and strip description. |
| package.json | Adds local search dependency and tightens Node engine requirement. |
| package-lock.json | Locks new dependency tree for local search and transitive deps. |
| docusaurus.config.js | Configures local search theme + adds search navbar item. |
| docs/reference/development.md | Removes outdated “development notes” reference page. |
| docs/reference/api.md | Removes outdated “API UI” reference page. |
| docs/product-tour/features.md | Removes product tour page from docs. |
| docs/intro.md | Updates intro copy and API section link text/target. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f075a48276
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Added
Fixed
Changed
Removed