Skip to content

Remove external link icons#43937

Closed
mrdarrengriffin wants to merge 4 commits intocurrentfrom
remove-iconify-icon
Closed

Remove external link icons#43937
mrdarrengriffin wants to merge 4 commits intocurrentfrom
remove-iconify-icon

Conversation

@mrdarrengriffin
Copy link
Copy Markdown
Contributor

Proposed change

The external link icons cause too many formatting issues to warrant keeping in. This language is only used on Home Assistant documentation and are not present in any of our other websites.

To improve readability, I propose removing these

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Copilot AI review requested due to automatic review settings March 5, 2026 15:40
@home-assistant home-assistant Bot added the current This PR goes into the current branch label Mar 5, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 5, 2026

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 260d04b
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/69a9a4d757734a0008c7343f
😎 Deploy Preview https://deploy-preview-43937--home-assistant-docs.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.

@mrdarrengriffin mrdarrengriffin marked this pull request as draft March 5, 2026 15:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the external-link icon injection/styling to avoid formatting issues in Home Assistant documentation.

Changes:

  • Removed SCSS rules that positioned/added spacing for external link icons.
  • Removed Nokogiri logic that appended iconify-icon nodes to external links.
  • Left link-handling logic in place to skip certain “own site” URLs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

File Description
sass/homeassistant/_overrides.scss Removes styling/layout rules for appended external-link icons.
plugins/output_modder.rb Stops injecting external-link icons into external anchors.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread plugins/output_modder.rb

# Append an external link icon, if there isn't an icon already
# Skip our own links
next if link.get_attribute('href') =~ /\Ahttps?:\/\/\w*.?home-assistant.io/i
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The regex on line 25 is overly permissive: .? uses an unescaped . (matches any character), and home-assistant.io is not escaped (the . matches any character). This can cause unintended matches/skips. Use a stricter pattern (escape dots, and use an explicit optional subdomain group), or reuse the safer domain allowlist regex already present below.

Suggested change
next if link.get_attribute('href') =~ /\Ahttps?:\/\/\w*.?home-assistant.io/i
next if link.get_attribute('href') =~ /\Ahttps?:\/\/(?:\w+\.)?home-assistant\.io/i

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot can you give me some examples where this might be falsely matched?

Comment thread plugins/output_modder.rb
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

@mrdarrengriffin I've opened a new pull request, #43938, to work on those changes. Once the pull request is ready, I'll request review from you.

@mrdarrengriffin
Copy link
Copy Markdown
Contributor Author

Copilot went AWOL. Opening new, cleaner PR

@frenck frenck deleted the remove-iconify-icon branch March 5, 2026 16:04
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

current This PR goes into the current branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants