Skip to content

Set up 2 sets of instructions for Local/Remote (SSH) landing page.#682

Merged
rgrunber merged 1 commit intoche-incubator:mainfrom
rgrunber:landing-page-switch
Apr 15, 2026
Merged

Set up 2 sets of instructions for Local/Remote (SSH) landing page.#682
rgrunber merged 1 commit intoche-incubator:mainfrom
rgrunber:landing-page-switch

Conversation

@rgrunber
Copy link
Copy Markdown
Collaborator

@rgrunber rgrunber commented Apr 10, 2026

  • When "Use Extension" is enabled, mention Dev Spaces Remote SSH extension and corresponding instructions
  • When "Use Extension" is disabled use the existing (manual) instructions
che-code-sshd-landing-page-toggle.mp4

Summary by CodeRabbit

  • New Features

    • Added a toggle to switch instantly between extension-based and manual connection instructions; the page now updates immediately when toggled.
    • Documentation is split into two mutually exclusive views for clearer guidance.
  • Style

    • Improved header/table layout, spacing, and list readability.
    • Introduced a custom toggle switch with better keyboard/focus styling.
  • Documentation

    • Updated code examples to clarify home-directory variable formatting and reorganized content for readability.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

Click here to review and test in web IDE: Contribute

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7246e234-03d3-4249-adaa-4d543e6763a0

📥 Commits

Reviewing files that changed from the base of the PR and between e63d1b2 and 7a16e2a.

📒 Files selected for processing (3)
  • build/scripts/code-sshd-page/page-style.css
  • build/scripts/code-sshd-page/page-utils.js
  • build/scripts/code-sshd-page/server.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • build/scripts/code-sshd-page/page-style.css

📝 Walkthrough

Walkthrough

Adds a documentation view toggle to the SSH docs page: new CSS for header/table layout and a custom checkbox "switch"; JS now replaces "${HOME}" (instead of "$HOME"), initializePlatformContent() calls syncDocsContent(), and new functions toggleExtensionSwitch()/syncDocsContent() swap content into #docs-parent based on #use-extension. The HTML body was restructured to include a "Use Extension" checkbox, a visible #docs-parent, and two hidden blocks #docs-extension and #docs-manual with mutually exclusive documentation content. SSH snippet $HOME references were escaped to \${HOME} in rendered HTML.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Rebase Rules For Upstream Changes ❓ Inconclusive Cannot verify if code/ directory files were modified or if rebase rules exist without access to the PR diff or specific branch context. Provide the PR diff or check out the PR branch to verify code/ modifications and corresponding .rebase/ rule updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing two sets of instructions (local/extension-based and remote/manual SSH) for the landing page with a toggle mechanism.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build/scripts/code-sshd-page/page-utils.js`:
- Around line 26-39: The toggle logic reads and infers state from DOM content,
which is brittle; update both the initial render and the toggleExtensionSwitch
function to derive state from the actual control element (e.g., a checkbox or
switch) instead of string matching. Specifically, replace the
innerHTML.includes("Dev Spaces Remote SSH") check in toggleExtensionSwitch with
a read of the control's checked/value
(document.getElementById('extension-switch').checked or similar), and make the
initial render (where docsElem is set from docs-extension) use the same control
state to decide between docs-extension and docs-manual so the UI and control
remain consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f35623da-4363-4c64-babc-c5526db72e6f

📥 Commits

Reviewing files that changed from the base of the PR and between 4a65dc1 and c1ec143.

📒 Files selected for processing (3)
  • build/scripts/code-sshd-page/page-style.css
  • build/scripts/code-sshd-page/page-utils.js
  • build/scripts/code-sshd-page/server.js

Comment thread build/scripts/code-sshd-page/page-utils.js Outdated
@TheChosenMok
Copy link
Copy Markdown

@rgrunber is the extension instructions selected by default?

@rgrunber
Copy link
Copy Markdown
Collaborator Author

@TheChosenMok , yes the intention is to have the "Extension" page enabled by default.

@ericwill
Copy link
Copy Markdown

@rgrunber is this ready to go in?

@rgrunber
Copy link
Copy Markdown
Collaborator Author

Tested out on Windows. Seems to be working the same.

Screencast.From.2026-04-15.10-04-15.mp4

@rgrunber rgrunber force-pushed the landing-page-switch branch from c1ec143 to e63d1b2 Compare April 15, 2026 15:20
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build/scripts/code-sshd-page/page-style.css`:
- Around line 103-107: The custom switch hides the native input (.switch input)
but lacks any keyboard focus indicator; add CSS rules so when the hidden input
receives keyboard focus (use .switch input:focus-visible and/or .switch
input:focus) the visible slider element (e.g., .slider or .switch .slider) shows
a clear, high-contrast focus ring or outline (or box-shadow) via the adjacent
selector (.switch input:focus + .slider) and also support .switch:focus-within
.slider for container focus; ensure the focus style is visible without shifting
layout and meets WCAG contrast requirements.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e9d6b005-c396-4a9d-bc04-9f78977f4b54

📥 Commits

Reviewing files that changed from the base of the PR and between c1ec143 and e63d1b2.

📒 Files selected for processing (3)
  • build/scripts/code-sshd-page/page-style.css
  • build/scripts/code-sshd-page/page-utils.js
  • build/scripts/code-sshd-page/server.js
✅ Files skipped from review due to trivial changes (1)
  • build/scripts/code-sshd-page/page-utils.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • build/scripts/code-sshd-page/server.js

Comment thread build/scripts/code-sshd-page/page-style.css
@rgrunber rgrunber force-pushed the landing-page-switch branch 2 times, most recently from 8346e3b to 644998b Compare April 15, 2026 16:17
@github-actions
Copy link
Copy Markdown

2 similar comments
@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

- When "Use Extension" is enabled, mention Dev Spaces Remote SSH
  extension and corresponding instructions
- When "Use Extension" is disabled use the existing (manual)
  instructions
- Use ${HOME} instead of $HOME for better portability across platforms

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber force-pushed the landing-page-switch branch from 644998b to 7a16e2a Compare April 15, 2026 17:39
@github-actions
Copy link
Copy Markdown

@rgrunber rgrunber merged commit a3f482c into che-incubator:main Apr 15, 2026
14 checks passed
@rgrunber rgrunber deleted the landing-page-switch branch April 15, 2026 20:32
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.

4 participants