Skip to content

Conversation

@Chupaka
Copy link
Contributor

@Chupaka Chupaka commented Sep 24, 2025

Description:

Previously the table was a bit complex:

image

Recent conversion to Markdown broke the table: no newlines, even some text was lost:

image

As there's no possibility to use rowspan in Markdown, converting the table to HTML manually:

image

Related issue (if applicable): fixes

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

@esphome esphome bot added the current label Sep 24, 2025
@netlify
Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 4c87eea
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/68e111d23bd4fc00083d347f
😎 Deploy Preview https://deploy-preview-5395--esphome.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.

@Chupaka
Copy link
Contributor Author

Chupaka commented Sep 24, 2025

Huh... HTML is allowed in Hugo but is forbidden in linter... What's the use case?..

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Reformatted the "Static routes and outgoing connections" subsection in content/components/wireguard.md from an ASCII table to an HTML table, preserving the original data and text without altering semantics or behavior.

Changes

Cohort / File(s) Summary
Docs formatting
content/components/wireguard.md
Converted ASCII table to HTML table in a subsection; no content, logic, or interface changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the primary change — fixing the example table in the Wireguard component documentation; it is concise, specific, and clearly reflects the PR's intent to correct table formatting.
Description Check ✅ Passed The PR description directly explains the problem (Markdown conversion broke a complex table), the corrective action taken (manual HTML table conversion), includes screenshots and branch/merge intent, and therefore is clearly related to the changes in content/components/wireguard.md.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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
Contributor

@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: 0

🧹 Nitpick comments (2)
content/components/wireguard.md (2)

183-184: Optional: use semantic lists inside table cells for readability/accessibility.

Replace manual “- …
” with

lists.

Example diff (apply analogously to each cell):

-      <td>- 172.16.0.0/24<br/>- 192.168.0.0/24<br/>- <em>any other</em></td>
+      <td>
+        <ul>
+          <li>172.16.0.0/24</li>
+          <li>192.168.0.0/24</li>
+          <li><em>any other</em></li>
+        </ul>
+      </td>

Also applies to: 196-197, 206-207


161-168: Optional: add a caption for context (better a11y).

A caption clarifies purpose for screen readers and improves usability.

Apply this diff:

-<table>
+<table>
+  <caption>Examples of netmask/allowed IP combinations and resulting outgoing connections</caption>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1367391 and c27c2dd.

📒 Files selected for processing (1)
  • content/components/wireguard.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/wireguard.md
🪛 GitHub Actions: Lint
content/components/wireguard.md

[error] 161-161: markdownlint MD033/no-inline-html Inline HTML [Element: table].

🔇 Additional comments (2)
content/components/wireguard.md (2)

161-210: Good fix: HTML table restores rowspan layout correctly.

The conversion to an HTML table accurately preserves the intended rowspan semantics and fixes the previously broken Markdown rendering. Use of thead/tbody is appropriate.


161-210: Fix pipeline: silence markdownlint MD033 for this HTML block.

CI fails with MD033 (no-inline-html). Wrap the table with markdownlint disable/enable comments.

+<!-- markdownlint-disable MD033 -->
 <table>
   <thead>
       <tr>
           <th>address</th>
           <th>netmask</th>
           <th>allowed ips</th>
           <th>working outgoing connections</th>
       </tr>
   </thead>
   <tbody>
     ...
   </tbody>
 </table>
+<!-- markdownlint-enable MD033 -->

Re-run the docs lint workflow to confirm MD033 is resolved.

@Chupaka
Copy link
Contributor Author

Chupaka commented Oct 3, 2025

@clydebarrow could you check this as the author of the "breaking change"?

@clydebarrow
Copy link
Contributor

clydebarrow commented Oct 3, 2025

No, we don't want embedded HTML. Since rowspan is not available in markdown, just add blank cells to simulate spanned rows. It's not ideal, but it gets the job done.

Which is what happened in the conversion, just looks like some text got lost which should be restored. Combine the two cells for "omitted" and "176.16..."

@Chupaka
Copy link
Contributor Author

Chupaka commented Oct 3, 2025

looks like some text got lost which should be restored

Not only that. What to do with yaml lists ("allowed ips" column)? We need

- 172.16.0.0/24
- 192.168.0.0/24

Not just - 172.16.0.0/24 - 192.168.0.0/24

I believe, - 172.16.0.0/24 <br/>- 192.168.0.0/24 is forbidden too...

@clydebarrow
Copy link
Contributor

clydebarrow commented Oct 3, 2025

You can insert line breaks inside table cells with <br>

@Chupaka Chupaka force-pushed the fix_wireguard_table branch 2 times, most recently from 453e8c1 to 4c4e771 Compare October 3, 2025 21:07
@Chupaka
Copy link
Contributor Author

Chupaka commented Oct 3, 2025

I updated the PR, but neither <br/> nor <br> tags are allowed...

Also, please pick one - probably blank cells are less informative:

image VS image

@clydebarrow
Copy link
Contributor

I updated the PR, but neither <br/> nor <br> tags are allowed...

I added a break shortcode. There is also the possibility to add a table render hook that could implement row and column spans, but that's a bit more work.

Re the two alternatives, probably repeating the same text is better than a blank cell.

@Chupaka Chupaka force-pushed the fix_wireguard_table branch from 90240e8 to 6aeef1c Compare October 4, 2025 12:21
@Chupaka Chupaka force-pushed the fix_wireguard_table branch from 6aeef1c to 4c87eea Compare October 4, 2025 12:23
@Chupaka
Copy link
Contributor Author

Chupaka commented Oct 4, 2025

probably repeating the same text is better than a blank cell.

I like this better too. So, looks like we're done, thanks for your assistance!

@clydebarrow
Copy link
Contributor

Not a big deal in this case, but force-pushing to a PR after review has started is generally not a Good Idea - it means the reviewer has to start over again since the history is lost. All commits get squashed when merged so there is no problem with having lots of small commits.

@clydebarrow clydebarrow merged commit 513776f into esphome:current Oct 4, 2025
4 checks passed
@Chupaka Chupaka deleted the fix_wireguard_table branch October 4, 2025 20:16
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants