Skip to content

Fix Build the automation list mangled by CloudCannon edit#865

Open
bharvey88 wants to merge 1 commit into
devfrom
fix/button-controlled-leds-cloudcannon-yaml
Open

Fix Build the automation list mangled by CloudCannon edit#865
bharvey88 wants to merge 1 commit into
devfrom
fix/button-controlled-leds-cloudcannon-yaml

Conversation

@bharvey88
Copy link
Copy Markdown
Contributor

@bharvey88 bharvey88 commented May 22, 2026

What does this implement/fix?

A previous CloudCannon edit (d3e17f8) on docs/products/ESPHome-Starter-Kit/automations/button-controlled-leds.md mangled the Build the automation section:

  • The single 1-5 numbered list was split into two short lists because CloudCannon inserted the new add-automation.gif at the top level, between steps 2 and 3.
  • The bullets inside both <div class="annotate" markdown> blocks were reindented to 10 spaces, which python-markdown then rendered as a single paragraph. The result on the live page is bullets joined inline with literal - characters instead of rendering as a list.
  • The trailing newline on the file was dropped.

This PR restores the original structure:

  • Continuous 1-5 numbered list.
  • The new add-automation.gif lives inside step 2 with 4-space continuation indent, so it doesn't break list numbering.
  • Annotate blocks back to <div class="annotate" markdown> with 4-space bullet indent.
  • Trailing newline restored.

The two new images CloudCannon added (add-automation.gif and example-rgb-button-automation.webp, plus the existing install-button-component.gif) are kept where they belong.

Types of changes

  • Typo / wording fix
  • Content update (correcting outdated info, adding missing steps, clarifications)
  • New page or new product section
  • Page move / rename (redirect added in mkdocs.yml)
  • Image / screenshot update
  • Nav / structure change
  • Site config or theme change
  • CI / workflows / dependencies — Does not publish

Checklist:

  • This PR targets the dev branch (not main)
  • Changes previewed locally with mkdocs serve
  • If pages were moved or renamed, redirects were added to mkdocs.yml
  • If new pages were added, nav was updated in mkdocs.yml

Summary by CodeRabbit

  • Documentation
    • Improved the automation setup instructions in the ESPHome Starter Kit button-controlled LEDs guide with clearer step-by-step formatting for configuring trigger and action selections.

Review Change Stack

CloudCannon's d3e17f8 inserted the new add-automation.gif at the top
level, which split the 1-5 numbered list into two short lists and
restarted numbering at "Set up the trigger". It also reindented the
bullets inside both <div class="annotate" markdown> blocks to 10
spaces, which python-markdown then rendered as a single paragraph,
so the bullets came out joined inline with literal dashes.

Restore the original continuous 1-5 list, move the new gif inside
step 2 with 4-space continuation indent, fix the annotate block
indentation back to 4 spaces, and restore the trailing newline.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Walkthrough

Documentation for the ESPHome button-controlled LEDs automation tutorial is restructured with a cleaner HTML annotate block layout. The trigger and action setup steps are reformatted with updated step numbering and content organization, while the functional guidance (Button "On Click" → RGB LEDs "Toggle") and light ID dropdown note are preserved. A formatting adjustment is also made to the concluding paragraph.

Changes

Tutorial Layout Restructuring

Layer / File(s) Summary
Build the automation steps and formatting
docs/products/ESPHome-Starter-Kit/automations/button-controlled-leds.md
The "Build the automation" instructions are reworked into <div class="annotate" markdown> blocks with updated step numbering and bullet/arrow content for trigger and action selection guidance, preserving the same functional selections and supplementary notes. A formatting adjustment is also applied to the concluding paragraph.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • ApolloAutomation/docs#852: Originally added the button-controlled-leds tutorial page with annotate markup structure; this PR refines the layout of that same annotate markup.

Poem

🐰 A clearer path through steps we show,
With markup fresh and layout clean,
The Button clicks the lights aglow,
In neat HTML space between.
Instructions bright, now better seen!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 fix: restoring a numbered list in the 'Build the automation' section that was corrupted by a CloudCannon edit, which directly matches the core objective and changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/button-controlled-leds-cloudcannon-yaml

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/products/ESPHome-Starter-Kit/automations/button-controlled-leds.md`:
- Line 26: The image markdown has no alt text; update the image tag that
references esphome-device-builder-add-automation.gif to include a concise,
descriptive alt string (e.g., "ESPhome device builder: add automation GIF") by
changing the markup from ![](…esphome-device-builder-add-automation.gif) to
something like ![ESPhome device builder: add automation
GIF](…esphome-device-builder-add-automation.gif) so screen readers can describe
the image.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43d80cc5-c2ac-4446-a3f3-da40b588cbc2

📥 Commits

Reviewing files that changed from the base of the PR and between d3e17f8 and 466262d.

📒 Files selected for processing (1)
  • docs/products/ESPHome-Starter-Kit/automations/button-controlled-leds.md

2. In the editor's left pane, expand the **Automations** dropdown and click **Add Automation**.

![](../../../assets/esphome-device-builder-add-automation.gif)
![](../../../assets/esphome-device-builder-add-automation.gif)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add alt text to the image for accessibility.

The image is missing alternative text, which is required for screen readers and accessibility compliance.

♿ Proposed fix to add descriptive alt text
-    ![](../../../assets/esphome-device-builder-add-automation.gif)
+    ![Animation showing how to expand the Automations dropdown and click Add Automation in ESPHome Device Builder](../../../assets/esphome-device-builder-add-automation.gif)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
![](../../../assets/esphome-device-builder-add-automation.gif)
![Animation showing how to expand the Automations dropdown and click Add Automation in ESPHome Device Builder](../../../assets/esphome-device-builder-add-automation.gif)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 26-26: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/products/ESPHome-Starter-Kit/automations/button-controlled-leds.md` at
line 26, The image markdown has no alt text; update the image tag that
references esphome-device-builder-add-automation.gif to include a concise,
descriptive alt string (e.g., "ESPhome device builder: add automation GIF") by
changing the markup from ![](…esphome-device-builder-add-automation.gif) to
something like ![ESPhome device builder: add automation
GIF](…esphome-device-builder-add-automation.gif) so screen readers can describe
the image.

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.

1 participant