Skip to content

DOC-1545 Remove legacy rapidoc support #319

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JakeSCahill
Copy link
Contributor

@JakeSCahill JakeSCahill commented Jul 30, 2025

Do not merge until 20 August 2025. Relies on redpanda-data/docs-site#113

This pull request removes the Swagger and Rapidoc integrations from the project, along with associated files, tasks, and configurations. It also includes minor dependency adjustments and updates to documentation to reflect the changes.

Removal of Swagger and Rapidoc Integrations:

  • README.adoc: Updated to reflect the removal of the swagger.hbs layout, reducing the total number of layouts from six to five.
  • gulpfile.js: Removed references to Rapidoc, including the copyRapidoc task and its associated source and destination paths. Updated build and preview tasks to exclude Rapidoc-related steps. [1] [2] [3] [4] [5]
  • package.json: Removed the rapidoc and marked-highlight dependencies, which were no longer needed after the removal of Rapidoc. [1] [2]
  • src/css/site.css and src/css/swagger.css: Removed references to and the entire swagger.css stylesheet, as it is no longer used. [1] [2]
  • src/helpers/get-api-slots.js: Deleted the helper script used for processing API pages and wrapping content with Rapidoc slots.
  • src/js/06-copy-to-clipboard.js: Removed logic that excluded Swagger/Rapidoc blocks from having duplicate copy buttons.
  • src/layouts/oauth.hbs: Deleted the OAuth layout, which dynamically loaded the rapidoc-min.js file.

Updates to Documentation and Content:

These changes simplify the project by removing unused or deprecated features and dependencies, reducing maintenance overhead.

Copy link

netlify bot commented Jul 30, 2025

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit d764e78
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/688a2424773c6a0008b33f9d
😎 Deploy Preview https://deploy-preview-319--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented Jul 30, 2025

📝 Walkthrough

Walkthrough

This set of changes systematically removes all code, configuration, assets, and documentation related to Rapidoc and Swagger UI from the project. It deletes the swagger.hbs and oauth.hbs layout templates, the swagger.css stylesheet, helper functions for API slot processing, and the cloud-api.adoc preview source. All references to Rapidoc and Swagger are removed from build scripts, CSS imports, the static files manifest, and package dependencies. The documentation is updated to reflect the removal of the Swagger layout, and UI logic for theme handling and copy-to-clipboard is adjusted to eliminate Rapidoc-specific conditions. Links and references to the removed API documentation are also deleted.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant BuildSystem
    participant UI
    participant Rapidoc/Swagger (removed)

    Developer->>BuildSystem: Initiate build
    BuildSystem--xRapidoc/Swagger (removed): No longer copies Rapidoc assets
    BuildSystem->>UI: Build UI without Rapidoc/Swagger layouts or assets
    UI--xRapidoc/Swagger (removed): No longer renders API docs with Rapidoc/Swagger
    UI->>User: Render UI without Rapidoc/Swagger components
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Assessment against linked issues

Objective Addressed Explanation
Remove all Rapidoc code and references from the UI (DOC-1545)

Suggested reviewers

  • kbatuigas

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb3ee6d and d764e78.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • README.adoc (1 hunks)
  • gulpfile.js (2 hunks)
  • package.json (2 hunks)
  • preview-src/cloud-api.adoc (0 hunks)
  • preview-src/index.adoc (0 hunks)
  • src/css/site.css (0 hunks)
  • src/css/swagger.css (0 hunks)
  • src/helpers/get-api-slots.js (0 hunks)
  • src/js/06-copy-to-clipboard.js (0 hunks)
  • src/layouts/oauth.hbs (0 hunks)
  • src/layouts/swagger.hbs (0 hunks)
  • src/partials/head-scripts.hbs (0 hunks)
  • src/ui.yml (0 hunks)
💤 Files with no reviewable changes (10)
  • src/css/site.css
  • src/layouts/oauth.hbs
  • src/partials/head-scripts.hbs
  • src/layouts/swagger.hbs
  • src/ui.yml
  • src/css/swagger.css
  • src/js/06-copy-to-clipboard.js
  • src/helpers/get-api-slots.js
  • preview-src/cloud-api.adoc
  • preview-src/index.adoc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Redirect rules - docs-ui
  • GitHub Check: build
  • GitHub Check: Header rules - docs-ui
  • GitHub Check: Pages changed - docs-ui
🔇 Additional comments (4)
README.adoc (1)

199-199: Layout count updated correctly after Rapidoc removal

The doc now correctly states that only five layouts remain. Matches the codebase after deleting swagger.hbs and oauth.hbs.

package.json (1)

57-60: No lingering Rapidoc references detected
A case-insensitive grep across the repository returned zero matches for “rapidoc,” confirming the cleanup is complete.

gulpfile.js (2)

131-134: copyRapidoc task cleanly removed from bundle pipeline

bundle:build no longer invokes copyRapidoc, which is consistent with dropping Rapidoc assets. No further action needed.


164-168: Preview build pipeline updated accordingly

preview:build also omits the Rapidoc copy step. Flow remains intact and all remaining tasks are still referenced.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-rapidoc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

2 participants