Skip to content

Link the board wizard help to the new boards guide#654

Merged
bdraco merged 1 commit into
mainfrom
wire-board-help-link
Jun 5, 2026
Merged

Link the board wizard help to the new boards guide#654
bdraco merged 1 commit into
mainfrom
wire-board-help-link

Conversation

@bdraco

@bdraco bdraco commented Jun 5, 2026

Copy link
Copy Markdown
Member

What does this implement/fix?

Wires the "I don't know what board I have" link on the board wizard step to the new boards guide; it was a no-op <button> before. It now opens https://esphome.io/guides/understanding_boards/ in a new tab. While here, adds a shared ESPHOME_DOCS_BASE constant and builds the existing api and script doc links from it too, so the docs origin lives in one place.

The guide page itself is esphome/esphome.io#6744; merge that first so the link is not a 404.

Related issue or feature (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — docs
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • npm run lint passes.
  • npm run test passes.
  • Tests have been added to verify that the new code works (where applicable).

@github-actions github-actions Bot added the enhancement Improvement to an existing feature label Jun 5, 2026
@bdraco bdraco marked this pull request as ready for review June 5, 2026 21:48
Copilot AI review requested due to automatic review settings June 5, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the “I don’t know what board I have” helper in the board-selection wizard actually navigate to the new ESPHome “Understanding boards” guide, and centralizes the ESPHome docs origin into a single constant for reuse across the UI.

Changes:

  • Convert the previously no-op helper control in the board wizard into an external docs link to the new boards guide.
  • Introduce ESPHOME_DOCS_BASE and rebuild existing Script/API docs fallback links from it.
  • Add a shared docs URL constant for the new “Understanding boards” guide.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/components/wizard/wizard-step-board.ts Implements the “don’t know board” helper as an external docs link built from the shared docs base.
src/components/device/automation-editor/script-editor.ts Builds the script docs fallback URL from ESPHOME_DOCS_BASE instead of hardcoding the origin.
src/components/device/automation-editor/api-action-editor.ts Builds the API component docs URL from ESPHOME_DOCS_BASE instead of hardcoding the origin.
src/common/docs.ts Adds ESPHOME_DOCS_BASE as a shared constant for constructing docs links.

Comment thread src/components/wizard/wizard-step-board.ts Outdated
@esphbot

esphbot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

PR Review — Link the board wizard help to the new boards guide

Clean, well-scoped enhancement. Merge-ready pending the companion docs PR.

  • The no-op <button> is correctly converted to an <a> with target="_blank"; .helper-link styles (color/underline/cursor/font) apply cleanly to an anchor, and the button-only resets (border/background/padding) are harmless no-ops.
  • ESPHOME_DOCS_BASE centralization is correct — both rebuilt URLs (/components/api.html, /components/script.html) and the new /guides/understanding_boards/ resolve correctly with no double slashes.
  • Re Copilot's rel="noopener noreferrer" note: rel="noreferrer" already implies noopener per the HTML spec (window.opener is nulled), so tabnabbing is prevented as-is, and this matches the sibling more-info / ae-header-docs links in the same files. The change is consistent; adding noopener is optional, not required.
  • As the PR description notes, Add Understanding boards in ESPHome guide esphome.io#6744 must merge first or the guide link 404s — coordinate the merge order.


Checklist

  • No hardcoded secrets
  • External link tabnabbing protection
  • URL construction correct (no double slashes)
  • Consistent with existing repo patterns

Automated review by Kōan (Claude) HEAD=0807987

@bdraco

bdraco commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

no harm in merging now the link is already missing

Wire the "I don't know what board I have" link on the board wizard step
to the new Understanding boards guide; it was a no-op button before. Add
a shared ESPHOME_DOCS_BASE constant and build the api and script doc
links from it too.
@bdraco bdraco force-pushed the wire-board-help-link branch from 0807987 to 993dc61 Compare June 5, 2026 22:00
@bdraco bdraco merged commit 76b5718 into main Jun 5, 2026
8 checks passed
@bdraco bdraco deleted the wire-board-help-link branch June 5, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement I don't know what board I have link

3 participants