Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fancy homepage #35945

Open
wants to merge 21 commits into
base: current
Choose a base branch
from
Open

Fancy homepage #35945

wants to merge 21 commits into from

Conversation

Madelena
Copy link
Contributor

@Madelena Madelena commented Nov 23, 2024

Here is an updated fancy new home page.

  • Adjusted font sizes everywhere to look better.
  • Made the Github badge less prominent.
  • Added social proof to hero unit.
  • Redid the top section into 3 column layout.
  • Cleaned up and consolidated HA Cloud block.
  • Replaced all the top section card to be nice photos.
  • Added "Let's get started" section.
  • Cleaned up Features section and added some missing features.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced new feature cards in the documentation, highlighting versatile dashboards, voice assistant capabilities, Home Assistant Cast, and NFC Tags.
    • Added a "Getting Started" section with device overviews and skill level badges.
    • Enhanced the hero section with new buttons and social proof elements.
    • Launched a structured layout for displaying recent blog posts and promotional content.
  • Styling Enhancements

    • Updated styles for various components, including font size adjustments, layout changes, and hover effects for improved visual appeal and responsiveness.
  • Content Updates

    • Rebranded the Home Assistant Connect ZBT-1 with updated FAQs and product information.
    • Revised the welcome page to emphasize local control and community engagement.
    • Enhanced the index page with new promotional sections and community engagement links.
    • Added a new section to showcase media coverage and endorsements.
  • Bug Fixes

    • Removed unused styles and adjusted media queries for better responsiveness across devices.
  • Image Updates

    • Updated frontpage images for the Home Assistant Connect ZBT-1 and Home Assistant Green landing pages to enhance visual representation.

@home-assistant home-assistant bot added the current This PR goes into the current branch label Nov 23, 2024
Copy link

netlify bot commented Nov 23, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 56f653e
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67437c9982fadb000897e3da
😎 Deploy Preview https://deploy-preview-35945--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 site configuration.

Copy link
Contributor

coderabbitai bot commented Nov 23, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request encompass multiple updates across various stylesheets and HTML files, focusing on enhancing the visual presentation and layout of components within the Home Assistant documentation and landing pages. Key updates include adjustments to font sizes, grid layouts, and hover effects in stylesheets, the addition of new feature cards and sections in HTML files, and modifications to existing content for clarity and branding purposes. The overall aim is to improve user experience and responsiveness across different devices.

Changes

File Path Change Summary
sass/homeassistant/_overrides.scss Adjusted font sizes, added new classes (.highlight-detail-post, .getting-started), modified hover effects, and made grid layout changes for various components.
sass/homeassistant/homepage/_features.scss Updated .feature-cards to a three-column grid, adjusted padding and border-radius, and added media queries for responsiveness.
sass/homeassistant/homepage/_hero_unit.scss Increased margins and font sizes, added new classes for buttons and social proof, and adjusted media queries for better layout.
source/_includes/custom/features.html Added four new feature cards detailing Home Assistant capabilities.
source/_includes/custom/getting-started.html Introduced a new section with device entries and skill level badges for Home Assistant devices.
source/_includes/custom/welcome.html Replaced site description, modified hero buttons structure, and added sections for social proof.
source/_includes/site/hero_unit.html Added perspective property for 3D rendering and updated image source path.
source/connectzbt1/index.html Updated product name and branding, modified FAQs, and changed frontpage image.
source/green/index.html Changed frontpage image format from PNG to JPG.
source/index.html Adjusted sidebar width, replaced community section with a link to the Open Home Foundation's blog, and added new promotional sections and content updates.
source/_includes/custom/news.html Introduced a structured layout for recent blog posts and promotional content related to Home Assistant.
source/_includes/custom/press.html Added a new section showcasing media coverage and endorsements of the product.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebApp
    participant Stylesheet
    participant HTML

    User->>WebApp: Access Home Assistant
    WebApp->>Stylesheet: Load styles for layout and components
    Stylesheet-->>WebApp: Apply updated styles
    WebApp->>HTML: Render updated feature cards and sections
    HTML-->>User: Display enhanced Home Assistant interface
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d0f1542 and 56f653e.

📒 Files selected for processing (3)
  • source/_includes/custom/news.html (1 hunks)
  • source/_includes/custom/welcome.html (2 hunks)
  • source/index.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/_includes/custom/news.html
🧰 Additional context used
📓 Path-based instructions (1)
source/index.html (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (8)
source/index.html (3)

Line range hint 23-34: Add width and height attributes to the logo image.

To prevent layout shifts during page load, specify dimensions for the Nabu Casa logo.

-          <img alt="Nabu Casa logo" src="/images/sponsors/nabu_casa.svg"
+          <img alt="Nabu Casa logo" src="/images/sponsors/nabu_casa.svg" width="200" height="45"

Note: A previous review already suggested adding security attributes (target="_blank" and rel="noopener noreferrer") to the external link.


17-21: LGTM! Verify the included template files.

The modular approach using includes supports the PR objectives for cleaning up and reorganizing features.

✅ Verification successful

Both template files exist and contain valid content

The verification confirms that both features.html and press.html template files exist in the source/_includes/custom/ directory with appropriate content:

  • features.html contains feature cards showcasing Home Assistant capabilities
  • press.html contains press mentions and logos with proper markup
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of both template files
for template in features press; do
    if [ -f "source/_includes/custom/${template}.html" ]; then
        echo "${template} template exists"
        cat "source/_includes/custom/${template}.html"
    else
        echo "Missing template: source/_includes/custom/${template}.html"
        exit 1
    fi
done

Length of output: 10415


14-15: LGTM! Verify the included template file.

The modular approach using includes aligns well with the PR objectives for better organization.

✅ Verification successful

The news.html template exists and is well-structured

The included template file exists and implements a three-column layout with appropriate content sections:

  • Left column: Blog posts, OHF notice, voice assistant integrations, and community links
  • Center column: Landing pages
  • Right column: Featured content and merchandise

The implementation aligns with the PR objectives for homepage redesign and content organization.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence and content of the news template
if [ -f "source/_includes/custom/news.html" ]; then
    echo "Template exists"
    cat "source/_includes/custom/news.html"
else
    echo "Missing template: source/_includes/custom/news.html"
    exit 1
fi

Length of output: 5010

source/_includes/custom/welcome.html (5)

3-3: LGTM! Clear and impactful messaging.

The description effectively communicates Home Assistant's core values and unique selling points.


Line range hint 6-16: LGTM! Smart approach to integration counting.

The logic appropriately handles both single and multiple categories, and the rounding to hundreds provides a clean, maintainable number that doesn't need frequent updates.

Also applies to: 21-21


20-20: Add security attributes to external link.

The demo link opens in a new tab but should include security attributes.


34-44: Verify if commented section should be removed or implemented.

The commented "As seen on" section appears to be ready for implementation. Should this be:

  1. Removed if not planned for immediate use, or
  2. Uncommented if ready to go live?

26-42: Enhance security and performance of social proof section.

The external links and images need security and performance improvements.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 6

🧹 Outside diff range and nitpick comments (22)
sass/homeassistant/homepage/_features.scss (2)

28-33: Consider using CSS custom properties for all colors.

While the background color uses a CSS custom property (--Light-primary-container), the icon color uses a hardcoded rgba value. Consider using a custom property for consistency:

-        color: rgba(0, 127, 168, 1);
+        color: var(--primary-icon-color);

58-69: Review use of !important and large font size.

A few suggestions:

  1. The use of !important flags suggests specificity issues. Consider refactoring the selectors to avoid this.
  2. 6rem (96px) is quite large - ensure it scales well across all devices and screen sizes.
source/_includes/custom/welcome.html (1)

17-23: Consider adding aria-label for the arrow icon.

The iconify-icon adds visual enhancement but should be made more accessible.

-<a href='/installation/' class="primary">Get started <iconify-icon inline icon='mdi:arrow-right'></iconify-icon></a>
+<a href='/installation/' class="primary">Get started <iconify-icon inline icon='mdi:arrow-right' aria-label="arrow right"></iconify-icon></a>
source/_includes/custom/getting-started.html (2)

1-6: Enhance accessibility for the header section

While the layout structure is good, consider improving accessibility for screen readers.

Apply these changes:

-<section class="grid getting-started">
+<section class="grid getting-started" aria-labelledby="getting-started-title">
   <div class="grid__item one-whole">
-    <h2 class="sub-title">Let's get started.</h2>
+    <h2 class="sub-title" id="getting-started-title">Let's get started.</h2>
-    <p class="lead">A variety of options for pragmatists and tinkerers alike.</p>
+    <p class="lead" role="doc-subtitle">A variety of options for pragmatists and tinkerers alike.</p>
   </div>

43-48: Improve content structure and button clarity

The "Need more options?" section could benefit from better content organization and clearer call-to-action.

Consider this improved structure:

 <div class="grid__item one-half palm-one-whole">
-  <h2>Need more options?</h2>
+  <h2 id="more-options">Need more options?</h2>
-  <p>Home Assistant can repurpose and be installed on various hardware, such as an Odroid or a generic x86-64 machine.</p>
-  <p>The Home Assistant Operating System allows you to install Home Assistant on these devices even if you have little to no Linux experience.</p>
+  <ul class="features-list" aria-labelledby="more-options">
+    <li>Install on various hardware (Odroid, x86-64 machines)</li>
+    <li>Easy installation with Home Assistant Operating System</li>
+    <li>No Linux experience required</li>
+  </ul>
-  <a class="button" href="/installation#install-on-other-hardware">Get started</a>
+  <a class="button" href="/installation#install-on-other-hardware" aria-label="View installation options for other hardware">
+    View hardware options
+  </a>
 </div>
sass/homeassistant/homepage/_hero_unit.scss (3)

27-35: Consider using clamp() for responsive font sizing.

While the 8rem font size creates an impactful hero heading, consider using clamp() for smoother scaling between breakpoints:

-    font-size: 8rem;
+    font-size: clamp(4.5rem, 8vw, 8rem);

56-82: Consider using CSS custom properties for consistent values.

The button styles could be more maintainable using CSS variables for repeated values like padding, border-radius, and colors.

+  :root {
+    --button-padding: 8px;
+    --button-radius: 32px;
+  }
   .hero-buttons {
     a {
-      padding: 8px 0 8px 0;
-      border-radius: 32px;
+      padding: var(--button-padding) 0;
+      border-radius: var(--button-radius);

Line range hint 186-254: Consider using CSS custom properties for breakpoints.

The media queries could be more maintainable by defining breakpoints as CSS custom properties:

+:root {
+  --breakpoint-desktop: 1280px;
+  --breakpoint-tablet: 1240px;
+  --breakpoint-mobile: 760px;
+}

-@media only screen and (max-width: 1280px) {
+@media only screen and (max-width: var(--breakpoint-desktop)) {
   // ...
}

-@media only screen and (max-width: 1240px) {
+@media only screen and (max-width: var(--breakpoint-tablet)) {
   // ...
}

-@media only screen and (max-width: 760px) {
+@media only screen and (max-width: var(--breakpoint-mobile)) {
   // ...
}
source/_includes/custom/features.html (3)

44-60: Enhance accessibility of the dashboard card.

The implementation looks good and follows the established pattern. Consider adding an aria-label to the button for better accessibility.

-          <a class="button" href="/dashboards">EXPLORE DASHBOARDS</a>
+          <a class="button" href="/dashboards" aria-label="Learn more about Home Assistant dashboards">EXPLORE DASHBOARDS</a>

62-78: Add accessibility attributes to voice assistant card.

The content is well-structured and informative. Consider adding an aria-label to the button for better accessibility.

-          <a class="button" href="/voice_control/">EXPLORE ASSIST</a>
+          <a class="button" href="/voice_control/" aria-label="Learn more about Home Assistant Assist voice control">EXPLORE ASSIST</a>

165-183: Consider expanding the Cast feature description.

While the implementation is technically correct, the content is notably shorter than other feature cards. Consider adding bullet points highlighting key capabilities or use cases, similar to other cards.

Example additions:

           <p>
             Take over all the screens. Home Assistant Cast makes every TV a display for dashboards.
           </p>
+          <ul>
+            <li>Cast your dashboards to any Chromecast-enabled device</li>
+            <li>Monitor your home's status on multiple displays</li>
+          </ul>
source/index.html (4)

40-42: Use bold markdown for UI strings.

According to the coding guidelines, UI strings should be in bold. Apply bold formatting to the following strings:

  • "Supercharge your home with"
  • "Home Assistant Cloud"
  • "Remote access"
  • "Better voice assistant experience"
  • "Amazon Alexa and Google Assistant"

Also applies to: 50-51, 58-59, 69-70


77-83: Add descriptive aria-labels to all links.

While one link has an aria-label, ensure consistency by adding descriptive aria-labels to all links in this section.

 <a
   href="https://nabucasa.com/"
   aria-label="Learn more about Home Assistant Cloud"
   >Learn more</a>
 <a
   href="https://account.nabucasa.com/signup/"
+  aria-label="Try Home Assistant Cloud free for one month"
   >Try 1 month for free</a>

113-134: Enhance accessibility and image handling.

Consider the following improvements:

  1. Add ARIA descriptions for background images.
  2. Provide fallback styles for failed image loads.
 <a
   class="material-card picture-promo"
   href="{{page.url}}"
+  aria-label="{{page.title}} - {{page.description}}"
   style="
       background-image: url({{page.frontpage_image | default:page.og_image}});
       background-size: cover;
       background-color: #41bdf5;
+      background-position: center;
     "
 >

147-172: Standardize promotional card styling.

The padding-top values vary between cards (55% vs others). Consider standardizing these values for consistent visual appearance.

sass/homeassistant/_overrides.scss (3)

667-688: Consider adding focus styles for accessibility

The highlight blog post styling looks good with flex layout and transitions, but consider adding focus states for keyboard navigation.

   &:hover {
     background-color: lighten(#038fc7, 10%);
   }
+  &:focus-visible {
+    outline: 2px solid white;
+    outline-offset: -4px;
+  }

700-763: Optimize animation performance

The box-shadow animation might impact performance. Consider using transform or opacity for better performance, and add will-change hint.

   animation-name: box-shadow-color;
   animation-duration: 5s;
   animation-iteration-count: infinite;
   animation-direction: alternate;
+  will-change: box-shadow;

Line range hint 809-863: Consider using modern aspect-ratio property

Instead of padding-based aspect ratio, consider using the modern aspect-ratio property for better maintainability.

-    padding-top: 33%;
+    aspect-ratio: 3/1;
source/connectzbt1/index.html (4)

Line range hint 1-12: Update og_image path to match new branding.

The og_image still references the old SkyConnect name (/images/connectzbt1/connectzbt1-cover.jpg) while frontpage_image uses the new ZBT-1 naming (/images/frontpage/feature-zbt1.jpg). Consider updating for consistency.

-og_image: /images/connectzbt1/connectzbt1-cover.jpg
+og_image: /images/frontpage/feature-zbt1.jpg

Line range hint 14-108: Consider moving styles to a separate stylesheet.

The inline styles could be moved to a separate CSS file for better maintainability and potential reuse across other product pages. This would also improve the separation of concerns.


Line range hint 109-117: Enhance the unavailability message.

The "Temporarily unavailable" banner could be more informative by including:

  • Reason for unavailability
  • Expected duration or timeline
  • Alternative options if available
-      <div class="banner-overlay-header">Temporarily unavailable</div>
+      <div class="banner-overlay-header">Temporarily unavailable - Restocking Soon</div>
       <div class="banner-overlay-content">
+        <p>We are currently restocking our inventory. Expected availability: December 2024.</p>
         Home Assistant Connect ZBT-1 (previously known as Home Assistant SkyConnect) is the easiest way to add Zigbee support
         to your Home Assistant instance.

Line range hint 451-524: Improve JavaScript code robustness.

Consider these improvements to the JavaScript code:

  1. Use strict mode
  2. Add error boundaries around timezone detection
  3. Use const/let instead of var
  4. Add event listener cleanup
+  'use strict';
   const buyDialog = document.getElementById("buy-dialog");
   const buyFab = document.querySelector(".fab");
+  let windowClickHandler;

   function showBuyDialog() {
     buyDialog.style.display = "flex";
     buyFab.style.display = "none";
   }

   function closeDialog() {
     buyDialog.style.display = "none";
     buyFab.style.display = "flex";
   }

-  window.onclick = function (event) {
+  windowClickHandler = function (event) {
     if (event.target === buyDialog) {
       closeDialog();
     }
   };
+  window.addEventListener('click', windowClickHandler);

   if (document.location.search === "?order") {
     showBuyDialog();
   }

   try {
     const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
     const continent = tz.replace(/^(Asia|America|Australia|Europe)\/.*$/, '$1');

     if (continent !== tz) {
       const continentElement = document.querySelector(`#dist_${continent.toLowerCase()}`);
+      if (continentElement) {
         continentElement.open = true;
+      }
     }
   } catch (error) {
-    // Ignore...
+    console.warn('Failed to detect timezone:', error);
   }

+  // Cleanup
+  window.addEventListener('unload', () => {
+    window.removeEventListener('click', windowClickHandler);
+  });
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between eb722e8 and 694fcd6.

⛔ Files ignored due to path filters (14)
  • source/images/frontpage/feature-githubnnumberone.jpg is excluded by !**/*.jpg
  • source/images/frontpage/feature-sotoh2024.jpg is excluded by !**/*.jpg
  • source/images/frontpage/feature-voice.jpg is excluded by !**/*.jpg
  • source/images/frontpage/feature-zbt1.jpg is excluded by !**/*.jpg
  • source/images/frontpage/green-frontpage.jpg is excluded by !**/*.jpg
  • source/images/frontpage/ha-green.png is excluded by !**/*.png
  • source/images/frontpage/ha-yellow.png is excluded by !**/*.png
  • source/images/frontpage/hero-github-logo.svg is excluded by !**/*.svg
  • source/images/frontpage/hero-socialproof-arstechnica.svg is excluded by !**/*.svg
  • source/images/frontpage/hero-socialproof-theverge.svg is excluded by !**/*.svg
  • source/images/frontpage/hero-trophy.svg is excluded by !**/*.svg
  • source/images/frontpage/hero_screenshot.png is excluded by !**/*.png
  • source/images/frontpage/raspberry-pi.png is excluded by !**/*.png
  • source/images/frontpage/yellow-frontpage.jpg is excluded by !**/*.jpg
📒 Files selected for processing (10)
  • sass/homeassistant/_overrides.scss (8 hunks)
  • sass/homeassistant/homepage/_features.scss (1 hunks)
  • sass/homeassistant/homepage/_hero_unit.scss (6 hunks)
  • source/_includes/custom/features.html (4 hunks)
  • source/_includes/custom/getting-started.html (1 hunks)
  • source/_includes/custom/welcome.html (2 hunks)
  • source/_includes/site/hero_unit.html (1 hunks)
  • source/connectzbt1/index.html (1 hunks)
  • source/green/index.html (1 hunks)
  • source/index.html (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • source/green/index.html
🧰 Additional context used
📓 Path-based instructions (1)
source/index.html (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (17)
source/_includes/site/hero_unit.html (2)

13-13: LGTM! Good structural improvement.

Moving the hero screenshot to a dedicated frontpage directory improves asset organization and maintainability.


7-7: Verify browser compatibility for the 3D perspective effect.

The addition of perspective: 1000px enhances the visual appeal with a subtle 3D effect, which aligns well with the homepage redesign objectives.

Let's verify if the image exists at the new location and check for any other perspective-related styles:

✅ Verification successful

3D perspective effect is well-supported and consistently implemented

The perspective property is already being used throughout the codebase, particularly in source/green/styles.css with proper 3D transform implementations including transform-style: preserve-3d and related properties. The new usage in hero_unit.html aligns with existing patterns and the image exists at the new location.

  • The perspective value of 1000px is consistent with the codebase's 3D styling approach
  • Browser compatibility is addressed through proper transform implementations in the CSS
  • The new image path source/images/frontpage/hero_screenshot.png is confirmed to exist
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify image existence and related styles

# Check if the image exists in the new location
fd "hero_screenshot.png" source/images/frontpage

# Look for other perspective-related styles that might need similar treatment
rg "perspective:" source/ --type css --type scss

Length of output: 170


Script:

#!/bin/bash
# Check for perspective property in all web files, including HTML and CSS
rg "perspective:" source/ --type html --type css

# Check if there are any browser-specific prefixes or related 3D transform properties
rg "transform-style|transform:|preserve-3d" source/ --type html --type css

# Look for any CSS files that might have been missed
fd "\.(css|scss|sass|less)$" source/

Length of output: 4074

sass/homeassistant/homepage/_features.scss (3)

4-5: LGTM! Grid layout changes align with PR objectives.

The switch to a three-column layout and adjusted gap spacing effectively supports the PR's goal of "redesigning the top section into a three-column layout for better organization."


71-81: LGTM! Well-structured responsive design.

The media queries effectively handle the layout changes across different viewport sizes, maintaining readability and usability.


9-11: Verify contrast ratio with white background.

While the styling creates a modern look, please ensure the white background provides sufficient contrast with text colors for accessibility.

✅ Verification successful

Based on the search results, I can see that the text colors used in the codebase are defined in the SCSS variables and there are several relevant color definitions:

  1. The white background is being used with various text colors:
  • Primary text color ($text-color) is defined as $grayDarker
  • Link color ($link-color) is #007fa8
  • Primary color ($primary-color) is $blue

Let me verify the specific color values for these variables:


White background provides sufficient contrast with text colors

The white background is being used with text colors that meet accessibility standards:

  • Main text color is #222 (dark gray)
  • Primary color is #1abcf2 (blue)
  • Link color is #007fa8 (dark blue)

These color combinations provide adequate contrast ratios:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any color variables or text-color definitions that might be used with this white background
rg -g '*.scss' -g '*.css' '\$primary-color|\$text-color|color:|background-color:' 

Length of output: 28638


Script:

#!/bin/bash
# Search for the color variable definitions
rg -g '*.scss' '\$grayDarker|\$blue' 

Length of output: 657

source/_includes/custom/welcome.html (1)

3-3: LGTM! Clear and aligned with core values.

The new description effectively communicates Home Assistant's key differentiators: open source nature, local control focus, and privacy-first approach.

source/_includes/custom/getting-started.html (1)

1-49: Implementation successfully meets PR objectives

The new "getting-started" section effectively implements the desired three-column layout with clear device options and visual hierarchy. The structure is well-organized and maintainable.

sass/homeassistant/homepage/_hero_unit.scss (2)

84-137: LGTM! Well-structured social proof section.

The implementation effectively addresses the PR objective to add social proof to the hero unit. The flex layouts and spacing are well-considered.


10-10: LGTM! Verify margin on mobile devices.

The increased margin improves spacing between sections.

✅ Verification successful

Let me try a different approach to check for any media query overrides for the hero unit:


LGTM! No margin override concerns found.

The increased margin of 48px appears to be the only margin-bottom definition for the hero unit, with no conflicting mobile-specific overrides found in the SCSS files. This spacing should work well across different screen sizes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any conflicting margin overrides in mobile-specific styles
rg -i "margin-bottom.*hero" --type scss

Length of output: 70


Script:

#!/bin/bash
# Search for margin-bottom in all SCSS files
rg -t sass "margin-bottom.*hero|@media.*hero" sass/

Length of output: 53


Script:

#!/bin/bash
# List all SCSS files and check their content
fd -e scss -e sass . sass/ --exec cat {}

Length of output: 113085


Script:

#!/bin/bash
# Check for any media query overrides for margin-bottom in hero unit
fd -e scss . sass/ --exec grep -l "hero.*margin-bottom" {} \; 

# Also check for any mobile-specific styles that might affect the hero unit
fd -e scss . sass/ --exec grep -l "@media.*hero" {} \;

Length of output: 126

source/_includes/custom/features.html (1)

Line range hint 43-203: LGTM with suggestions for improvement.

The new feature cards are well-structured and align with the existing design pattern. The suggested improvements focus on:

  1. Consistent content depth across all cards
  2. Complete accessibility coverage
  3. Comprehensive feature descriptions

Overall, the implementation successfully achieves the PR's objective of enhancing the homepage with new feature highlights.

source/index.html (3)

239-242: LGTM! Follows documentation guidelines.

The heading uses sentence-style capitalization and the lead paragraph is clear and concise.


Line range hint 244-344: LGTM! Good accessibility practices.

The press logos section demonstrates good practices:

  • Descriptive alt text for all images
  • Proper use of target="_blank" with rel="noopener"

15-15: Verify the responsive layout after width adjustment.

The sidebar width change from one-third to one-half could affect the layout on different screen sizes.

sass/homeassistant/_overrides.scss (4)

447-456: LGTM! Font size adjustments improve readability

The font size change to 1.3125rem and icon margin adjustments contribute to better visual hierarchy and spacing.


461-461: LGTM! Consistent text sizing

The 1rem font size for material cards maintains visual consistency with other text elements.


883-960: LGTM! Well-structured responsive styling

The getting started section follows good CSS practices with semantic class names and proper responsive handling.


962-965: LGTM! Simple alignment adjustment

The text alignment change for sponsors and press section is straightforward and appropriate.

sass/homeassistant/homepage/_features.scss Show resolved Hide resolved
source/_includes/custom/welcome.html Outdated Show resolved Hide resolved
source/_includes/custom/getting-started.html Outdated Show resolved Hide resolved
sass/homeassistant/homepage/_hero_unit.scss Show resolved Hide resolved
source/_includes/custom/features.html Show resolved Hide resolved
sass/homeassistant/_overrides.scss Show resolved Hide resolved
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: 2

🧹 Outside diff range and nitpick comments (1)
source/index.html (1)

113-134: Optimize image loading for landing page cards

Add image loading optimizations to improve performance and user experience:

        <a
          class="material-card picture-promo"
          href="{{page.url}}"
          style="
              background-image: url({{page.frontpage_image | default:page.og_image}});
              background-size: cover;
              background-color: #41bdf5;
+             background-position: center;
            "
+         loading="lazy"
+         fetchpriority="high"
        >
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 694fcd6 and 804792c.

📒 Files selected for processing (2)
  • sass/homeassistant/homepage/_hero_unit.scss (6 hunks)
  • source/index.html (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • sass/homeassistant/homepage/_hero_unit.scss
🧰 Additional context used
📓 Path-based instructions (1)
source/index.html (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (2)
source/index.html (2)

239-242: Improve press section heading structure and content

The heading structure and content follow the Microsoft Style Guide recommendations.


15-15: Verify responsive layout behavior across screen sizes

The layout uses different grid widths for different screen sizes:

  • Desktop: one-third
  • Laptop: one-half
  • Mobile: full width

Also applies to: 111-111, 140-140

✅ Verification successful

Responsive layout classes are consistently used across the documentation site

The grid system classes (lap-one-half, palm-one-whole) are part of a well-established responsive layout pattern used throughout the documentation site's templates and components. The search results show:

  • The same responsive classes are used consistently in:
    • Main layout templates (_layouts/default.html)
    • Common components (_includes/site/header.html, _includes/site/footer.html)
    • Sidebar modules (_includes/site/sidebar.html)
    • Content sections (_includes/custom/getting-started.html)

The implementation in source/index.html follows this established pattern and the classes are defined in the SASS framework (sass/inuitcss/generic/_widths.scss).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any responsive layout tests or related documentation
rg -g '!{node_modules,_site}/*' -A 2 'lap-one-half|palm-one-whole' 

Length of output: 12247

source/index.html Outdated Show resolved Hide resolved
source/index.html Outdated Show resolved Hide resolved
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: 1

🧹 Outside diff range and nitpick comments (3)
source/_includes/custom/getting-started.html (3)

3-3: Remove the period from the heading

Headings typically don't end with periods. Consider removing it for consistency with standard heading conventions.

-    <h2 class="sub-title">Let's get started.</h2>
+    <h2 class="sub-title">Let's get started</h2>

9-9: Consider using semantic HTML elements for badges

The difficulty level badges could benefit from using more semantic HTML. Consider using <span> with ARIA roles for better accessibility.

-      <div class="badge">Intermediate</div>
+      <span class="badge" role="status" aria-label="Difficulty level: Intermediate">Intermediate</span>

Apply similar changes to the "Easiest" and "Advanced" badges.

Also applies to: 21-21, 33-33


1-49: Enhance accessibility with landmarks and keyboard navigation

While the current implementation includes good accessibility features like ARIA labels, consider these additional improvements:

  1. Add a descriptive ARIA landmark to the section
  2. Ensure the grid layout is keyboard navigable
  3. Consider adding skip links for keyboard users
-<section class="grid getting-started">
+<section class="grid getting-started" aria-labelledby="getting-started-title" role="region">
   <div class="grid__item one-whole">
-    <h2 class="sub-title">Let's get started</h2>
+    <h2 class="sub-title" id="getting-started-title">Let's get started</h2>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 804792c and c561fe9.

⛔ Files ignored due to path filters (1)
  • source/images/frontpage/hero_screenshot.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • sass/homeassistant/homepage/_hero_unit.scss (6 hunks)
  • source/_includes/custom/getting-started.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • sass/homeassistant/homepage/_hero_unit.scss

source/_includes/custom/getting-started.html Show resolved Hide resolved
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: 4

🧹 Outside diff range and nitpick comments (5)
sass/homeassistant/homepage/_hero_unit.scss (3)

56-82: Add hover and focus states for better accessibility.

The buttons lack hover and focus states, which are important for accessibility and user interaction feedback.

 a {
   // ... existing styles ...
+  transition: background-color 0.3s ease;
+
+  &:hover, &:focus {
+    outline: none;
+    text-decoration: none;
+  }
+
+  &:focus-visible {
+    outline: 2px solid white;
+    outline-offset: 2px;
+  }

   &.primary {
     // ... existing styles ...
+    &:hover {
+      background-color: darken($link-color, 10%);
+    }
   }
 }

84-141: LGTM! Consider adding aria-labels.

The social proof section is well-structured. Consider adding aria-labels to the links for better accessibility.

 a {
   opacity: 0.75;
   transition: .5s opacity;
+  aria-label: "As featured in [publication name]";
 }

Line range hint 186-264: Standardize breakpoint values.

The media queries use various breakpoint values (1280px, 1240px, 760px) that appear arbitrary. Consider:

  1. Using standard breakpoint variables
  2. Documenting the reasoning behind these specific values
  3. Ensuring consistent unit usage (px vs rem)
+// Breakpoint variables at the top of the file
+$breakpoint-large: 1280px;
+$breakpoint-medium: 1240px;
+$breakpoint-small: 760px;
+
-@media only screen and (max-width: 1280px) {
+@media only screen and (max-width: $breakpoint-large) {
   // styles
 }
sass/homeassistant/_overrides.scss (2)

753-765: Consider performance optimization for animation

The infinite box-shadow animation might impact performance on low-end devices. Consider using more performant properties or adding a media query to disable the animation on devices that prefer reduced motion.

+  @media (prefers-reduced-motion: reduce) {
+    animation: none;
+    box-shadow: inset 0 0 64px hsl(197, 97%, 40%);
+  }

954-962: Consider more specific breakpoints for responsive design

The current breakpoint at $palm-end might be too broad. Consider adding intermediate breakpoints for better control over the layout at different screen sizes.

-  @media only screen and (max-width: $palm-end) {
+  @media only screen and (max-width: 480px) {
     .getting-started-device {
       padding-bottom: 48px;
     }
   }
+  @media only screen and (min-width: 481px) and (max-width: $palm-end) {
+    .getting-started-device {
+      padding-bottom: 64px;
+    }
+  }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c561fe9 and a1714b5.

📒 Files selected for processing (3)
  • sass/homeassistant/_overrides.scss (8 hunks)
  • sass/homeassistant/homepage/_hero_unit.scss (6 hunks)
  • source/index.html (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
source/index.html (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (9)
sass/homeassistant/homepage/_hero_unit.scss (1)

10-10: LGTM!

The increased margin provides better vertical spacing between sections.

source/index.html (3)

113-134: LGTM!

The landing page generation logic is well-structured and follows good practices.


Line range hint 140-224: LGTM!

The promotional sections are well-structured with appropriate use of semantic HTML and images.


239-241: LGTM!

The press section heading and lead text changes effectively communicate the project's reach and credibility.

sass/homeassistant/_overrides.scss (5)

447-456: LGTM: Font size and icon margin adjustments

The minor adjustments to the material card heading improve visual consistency.


664-666: LGTM: List margin adjustment

Removing the margin from ordered lists in recent posts helps maintain consistent spacing.


670-684: LGTM: Enhanced blog post highlight styling

The changes improve visual hierarchy and interaction feedback through:

  • Flex layout for better alignment
  • Smooth transitions for hover effects
  • Consistent padding and spacing

853-865: LGTM: Well-implemented picture promo variant

The picture-top variant maintains consistent styling while providing good text contrast through gradients.


965-968: LGTM: Consistent text alignment

The centered text alignment for sponsors and press section maintains visual consistency.

sass/homeassistant/homepage/_hero_unit.scss Show resolved Hide resolved
source/index.html Outdated Show resolved Hide resolved
source/index.html Outdated Show resolved Hide resolved
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

🧹 Outside diff range and nitpick comments (2)
sass/homeassistant/homepage/_hero_unit.scss (2)

84-141: Consider adding hover transitions for buttons

While social proof links have hover transitions, the same isn't implemented for buttons.

 .hero-buttons {
   a {
     // ... existing styles ...
+    transition: opacity 0.5s;
+    
+    &:hover {
+      opacity: 0.9;
+    }
     
     &.primary {
       // ... existing styles ...
+      &:hover {
+        opacity: 0.9;
+      }
     }
   }
 }

186-192: Use consistent breakpoint variables

Consider using SCSS variables for all breakpoints instead of mixing pixel values and variables.

-@media only screen and (max-width: 1280px) {
+@media only screen and (max-width: $desktop-end) {
   // ... existing styles ...
 }

-@media only screen and (max-width: 1240px) {
+@media only screen and (max-width: $desktop-small) {
   // ... existing styles ...
 }

Also applies to: 195-203

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a1714b5 and bdd35aa.

📒 Files selected for processing (1)
  • sass/homeassistant/homepage/_hero_unit.scss (6 hunks)
🔇 Additional comments (4)
sass/homeassistant/homepage/_hero_unit.scss (4)

10-10: LGTM: Improved vertical spacing

The increased margin provides better separation between sections, enhancing readability.


49-52: Remove !important declarations

This is a duplicate of a previous review comment. The use of !important flags indicates specificity issues in the CSS cascade.


56-82: LGTM: Well-structured button component

Clean implementation using flexbox with proper spacing and semantic class names.


27-35: Verify accessibility of gradient text and font sizing

While the gradient text effect enhances visual appeal, consider:

  1. Testing color contrast for accessibility
  2. The 8rem font size might be excessive on some displays

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: 2

🧹 Outside diff range and nitpick comments (5)
sass/homeassistant/homepage/_hero_unit.scss (4)

56-82: Enhance button accessibility and hover states

The hero buttons lack hover/focus states and could benefit from improved accessibility:

.hero-buttons {
  a {
+    transition: opacity 0.3s ease;
+    &:hover, &:focus {
+      opacity: 0.9;
+    }
+    &:focus {
+      outline: 2px solid white;
+      outline-offset: 2px;
+    }
     &.primary {
       font-family: $heading-font;

101-119: Consider semantic HTML structure for the GitHub project card

The GitHub project card could benefit from semantic HTML elements and ARIA attributes:

.hero-github-top-project {
+  role: "complementary";
+  aria-label: "GitHub project statistics";
   p {
+    strong {
+      display: inline-block; // Helps with line breaks
+    }
   }
}

Line range hint 196-274: Consolidate media queries for better maintainability

The media queries could be organized better:

  1. They use different units (px vs variables)
  2. Some breakpoints are very close (1280px vs 1240px)
  3. Duplicate selectors across breakpoints

Consider:

  1. Using CSS custom properties for breakpoints
  2. Combining similar breakpoints
  3. Using a mobile-first approach
+ :root {
+   --breakpoint-mobile: 760px;
+   --breakpoint-tablet: 1024px;
+   --breakpoint-desktop: 1280px;
+ }

- @media only screen and (max-width: 1280px) {
- @media only screen and (max-width: 1240px) {
+ @media only screen and (max-width: var(--breakpoint-desktop)) {
   // Combine styles from both breakpoints
}

159-163: Clean up unused animation code

There are commented-out animation properties and an unused keyframe animation:

Either:

  1. Remove the commented animation properties and unused keyframe, or
  2. Document why they're kept for future reference
-    // animation-name: floaty-demo;
-    // animation-duration: 4s;
-    // animation-iteration-count: infinite;
-    // animation-direction: alternate;
-    // animation-timing-function: linear;

- @keyframes floaty-demo {
-   from {
-     transform: translateY(-25px) rotateY(346deg) skewY(3deg);
-   }
-   to {
-     transform: translateY(0) rotateY(346deg) skewY(3deg);
-   }
- }

Also applies to: 177-184

sass/homeassistant/_overrides.scss (1)

670-684: Consider using more specific transition properties

While the changes improve the layout, consider specifying exact transition properties instead of using the shorthand for better performance.

-    transition: background-color 0.5s, box-shadow 0.5s;
+    transition-property: background-color, box-shadow;
+    transition-duration: 0.5s;
+    transition-timing-function: ease;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7f95162 and d808e3e.

📒 Files selected for processing (3)
  • sass/homeassistant/_overrides.scss (8 hunks)
  • sass/homeassistant/homepage/_hero_unit.scss (7 hunks)
  • source/_includes/custom/getting-started.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/_includes/custom/getting-started.html
🔇 Additional comments (6)
sass/homeassistant/homepage/_hero_unit.scss (1)

7-7: Verify contrast ratios with the new gradient background

The new HSL-based gradient looks clean, but we should ensure it maintains sufficient contrast with text elements for accessibility.

Also applies to: 10-10

✅ Verification successful

The gradient background has sufficient contrast with text elements

The gradient background is used with white text (color: $white) and has adequate contrast. The HSL colors in the gradient (all at 100% saturation and 50% lightness) against white text provide sufficient contrast ratio, meeting WCAG guidelines. The text also includes fallback colors and transparent fills for special effects.

Key text colors used with this gradient:

  • Primary text: white (color: $white)
  • Secondary text: light gray (color: $grayLighter)
  • Special elements: transparent fill for gradient effects
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any existing contrast ratio tests or color utilities
rg -i "contrast-ratio|wcag|a11y|accessibility" --type scss

Length of output: 89


Script:

#!/bin/bash
# Search for any existing contrast ratio tests or color utilities with correct file type
rg -i "contrast-ratio|wcag|a11y|accessibility" -g "*.scss" -g "*.sass" -g "*.css"

# Look for text colors used with this gradient background
rg -A 5 -B 5 "linear-gradient\(340deg" -g "*.scss" -g "*.sass" -g "*.css"

Length of output: 1390


Script:

#!/bin/bash
# Look for text colors and styles within the hero section
rg -A 10 "\.hero\s+" -g "*.scss" -g "*.sass" -g "*.css"

# Look for any color variables or text color definitions that might be used in the hero
rg "color:|color\s*:" -g "*.scss" -g "*.sass" -g "*.css" ./sass/homeassistant/homepage/

Length of output: 5234

sass/homeassistant/_overrides.scss (5)

447-456: LGTM: Material card typography improvements

The adjustments to font sizes and icon spacing enhance readability and visual hierarchy.


664-666: LGTM: List margin reset

Clean removal of default margins for better content alignment.


Line range hint 812-866: LGTM: Improved picture promo styling

Good implementation of gradients for text contrast and the new top variant.


886-975: LGTM: Well-implemented getting started section

Excellent implementation with:

  • Mobile-first approach
  • Semantic class names
  • Proper responsive breakpoints
  • Good use of CSS Grid and Flexbox

977-981: LGTM: Text alignment fix

Simple and effective center alignment for sponsors section.

Comment on lines +27 to +35
font-size: 8rem;
font-style: normal;
font-weight: 800;
line-height: 1;
letter-spacing: -2.56px;
background: linear-gradient(125deg, #FFF 29.3%, #80FFF4 89.99%);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider progressive font scaling for better responsiveness

The 8rem font size (128px) is quite large and might cause layout issues on certain devices. While it scales down in media queries, consider using a more gradual scale:

h1 {
-    font-size: 8rem;
+    font-size: clamp(4rem, 8vw, 8rem);
     font-style: normal;
     font-weight: 800;
     line-height: 1;
     letter-spacing: -2.56px;
📝 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
font-size: 8rem;
font-style: normal;
font-weight: 800;
line-height: 1;
letter-spacing: -2.56px;
background: linear-gradient(125deg, #FFF 29.3%, #80FFF4 89.99%);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: clamp(4rem, 8vw, 8rem);
font-style: normal;
font-weight: 800;
line-height: 1;
letter-spacing: -2.56px;
background: linear-gradient(125deg, #FFF 29.3%, #80FFF4 89.99%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;

sass/homeassistant/_overrides.scss Show resolved Hide resolved
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

🧹 Outside diff range and nitpick comments (1)
source/_includes/custom/getting-started.html (1)

1-5: Consider adding ARIA landmark role for better accessibility

The section structure looks good, but could be enhanced for screen readers.

-<section class="grid getting-started">
+<section class="grid getting-started" role="region" aria-labelledby="getting-started-title">
   <div class="grid__item one-whole">
-    <h2 class="sub-title">Let's get started.</h2>
+    <h2 class="sub-title" id="getting-started-title">Let's get started.</h2>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d808e3e and 3d6f67b.

📒 Files selected for processing (1)
  • source/_includes/custom/getting-started.html (1 hunks)
🔇 Additional comments (4)
source/_includes/custom/getting-started.html (4)

12-12: Optimize image for performance and accessibility

Following the pattern from previous review comments, the image needs optimization for Core Web Vitals.

-<img src="/images/frontpage/raspberry-pi.png" alt="Raspberry Pi"/>
+<img 
+  src="/images/frontpage/raspberry-pi.png" 
+  alt="Raspberry Pi device" 
+  width="300" 
+  height="200" 
+  loading="lazy"
+/>

24-24: Apply consistent image optimizations across device sections

The Green and Yellow device images need the same optimization as the Raspberry Pi section.

Apply the same image attributes pattern to both images:

  • Add width/height attributes
  • Add loading="lazy"
  • Enhance alt text with "device" suffix

Also applies to: 36-36


50-50: Update the anchor link to match existing section

The link to #install-on-other-hardware needs to be updated as the target anchor doesn't exist in the installation page.

#!/bin/bash
# Verify if the anchor exists in the installation page and find potential alternatives
echo "Checking for the exact anchor..."
rg -l 'id="install-on-other-hardware"' source/installation*

echo "Looking for similar section headings..."
rg -i "install.*hardware" source/installation/index.html

1-52: Overall implementation aligns well with PR objectives

The new "Let's get started" section successfully implements the requirements with good semantic structure and accessibility considerations. The three-column layout effectively presents the device options, and the additional section provides clear guidance for users seeking alternatives.

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: 4

🧹 Outside diff range and nitpick comments (6)
source/index.html (2)

14-15: Use consistent HTML comment style

For better maintainability, use consistent multi-line comment style for section comments:

-    <!-- News section -->
+    <!--
+      News section
+    -->

20-21: Add missing section comment

For consistency with other sections, add a comment for the Features section:

+    <!--
+      Features section
+    -->
     {% include custom/features.html %}
source/_includes/custom/press.html (2)

1-5: Consider adding ARIA attributes for better accessibility.

The section structure looks good, but consider adding aria-labelledby to the section and an id to the heading to improve screen reader navigation.

-<section class="grid sponsors-and-press">
+<section class="grid sponsors-and-press" aria-labelledby="press-section-title">
   <div class="grid__item one-whole">
-    <h2 class="sub-title">In the press</h2>
+    <h2 id="press-section-title" class="sub-title">In the press</h2>
     <p class="lead">Trusted by home automation experts and more than a million households.</p>
   </div>

35-49: Standardize image styling classes.

Some images use additional classes (square, round) while others don't. Consider standardizing the image styling approach across all press logos for consistent presentation.

For example, the Linus Tech Tips logo uses only square:

<img alt="Linus Tech Tips logo" class="square" src="/images/press/ltt.svg" />

While the Troy Hunt logo uses both square and round:

<img class="square round" alt="Troy Hunt logo" src="/images/press/troyhunt.jpg" />
source/_includes/custom/news.html (2)

9-16: Consider adding a "View all posts" link for better navigation.

The blog posts section shows only 4 posts without providing a way to access older posts. Consider adding a "View all" link at the bottom of the list for better user experience.

    <ol>
      {% for post in site.posts limit: 4 %}
        <li class="post" style="display: grid; font-size: 16px">
          <a href="{{ post.url }}">{{ post.title }}</a>
          <small class="blog-date">{{ post.date_formatted }}</small>
        </li>
      {% endfor %}
    </ol>
+   <div class="view-all">
+     <a href="/blog/" class="text-link">View all posts {% icon "mdi:chevron-right" %}</a>
+   </div>

146-146: Consider using configuration variables for URLs.

Hardcoded URLs in the template could become outdated. Consider moving them to configuration variables for easier maintenance.

-    href="/blog/2024/04/24/state-of-the-open-home-2024/"
+    href="{{ site.data.promo_links.state_of_home }}"

-    href="/blog/2024/11/18/event-wrapup-github-universe-24/"
+    href="{{ site.data.promo_links.github_achievement }}"

-    href="https://home-assistant-store.creator-spring.com/"
+    href="{{ site.data.promo_links.merchandise_store }}"

Also applies to: 168-168, 214-214

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3d6f67b and 6c84213.

📒 Files selected for processing (3)
  • source/_includes/custom/news.html (1 hunks)
  • source/_includes/custom/press.html (1 hunks)
  • source/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
source/index.html (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (5)
source/index.html (1)

Line range hint 29-32: Add security attributes to Nabu Casa link

Similar to previous external links, add security attributes to protect users:

-          <a href="https://www.nabucasa.com"
+          <a href="https://www.nabucasa.com"
+             target="_blank"
+             rel="noopener noreferrer"
             ><img alt="Nabu Casa logo" src="/images/sponsors/nabu_casa.svg"
          /></a>
source/_includes/custom/press.html (3)

7-7: LGTM!

The grid container structure is appropriate for the layout requirements.


100-101: LGTM!

The section is properly closed with matching tags.


70-71: ⚠️ Potential issue

Use HTTPS for external links.

The Linux.com link uses an insecure HTTP protocol. Consider updating to HTTPS for better security.

-      href="http://www.linux.com/news/home-assistant-python-approach-home-automation-video"
+      href="https://www.linux.com/news/home-assistant-python-approach-home-automation-video"

Likely invalid or redundant comment.

source/_includes/custom/news.html (1)

3-3: Verify responsive grid implementation across the site.

The responsive grid classes look good, but let's verify the implementation is consistent across the site.

Also applies to: 111-111, 142-142

✅ Verification successful

Responsive grid implementation is consistent across the site

The verification results show a consistent implementation of responsive grid classes throughout the codebase:

  • Base grid classes (grid__item, one-third, one-half, one-whole) are used systematically
  • Responsive modifiers (lap-one-half, palm-one-whole) follow a consistent pattern
  • The implementation in news.html matches the site-wide responsive grid system, with proper breakpoints:
    • Desktop: one-third (33.33%)
    • Tablet: lap-one-half (50%)
    • Mobile: palm-one-whole (100%)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for grid class usage patterns across the codebase
echo "Checking grid class implementations..."
rg "grid__item (one-third|one-half|one-whole)" -A 2

# Search for responsive class patterns
echo "Checking responsive class patterns..."
rg "(lap|palm)-(one-half|one-whole)" -A 2

Length of output: 22061

source/_includes/custom/press.html Show resolved Hide resolved
source/_includes/custom/news.html Show resolved Hide resolved
source/_includes/custom/news.html Show resolved Hide resolved
source/_includes/custom/news.html Show resolved Hide resolved
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

🧹 Outside diff range and nitpick comments (3)
sass/homeassistant/homepage/_hero_unit.scss (3)

56-82: Consider adding gap fallback for better browser compatibility

While the flexbox layout is well-structured, the gap property might need a fallback for older browsers.

 .hero-buttons {
   display: flex;
   margin: 8px 0px 24px 0px;
   align-items: center;
+  margin-right: -12px; /* Fallback for gap */
   gap: 12px;
   
   a {
+    margin-right: 12px; /* Fallback for gap */
     font-size: 1.1rem;

163-167: Clean up unused animation code

The animation properties and keyframes are commented out. If these are not planned for future use, consider removing them to reduce file size.

-    // animation-name: floaty-demo;
-    // animation-duration: 4s;
-    // animation-iteration-count: infinite;
-    // animation-direction: alternate;
-    // animation-timing-function: linear;
     transform: rotateY(346deg) skewY(3deg);

-@keyframes floaty-demo {
-  from {
-    transform: translateY(-25px) rotateY(346deg) skewY(3deg);
-  }
-  to {
-    transform: translateY(0) rotateY(346deg) skewY(3deg);
-  }
-}

Also applies to: 181-188


200-206: Consider using SCSS variables for breakpoints

Using fixed pixel values for breakpoints makes maintenance more difficult. Consider using SCSS variables for consistent breakpoint management.

+$breakpoint-large: 1280px;
+$breakpoint-medium: 1240px;
+$breakpoint-small: 1080px;
+$breakpoint-mobile: 760px;

-@media only screen and (max-width: 1280px) {
+@media only screen and (max-width: $breakpoint-large) {
   // ...
}

-@media only screen and (max-width: 1240px) {
+@media only screen and (max-width: $breakpoint-medium) {
   // ...
}

Also applies to: 209-285

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6c84213 and 359d40c.

⛔ Files ignored due to path filters (2)
  • source/images/frontpage/ha-yellow.png is excluded by !**/*.png
  • source/images/frontpage/hero_screenshot.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • sass/homeassistant/homepage/_hero_unit.scss (7 hunks)
  • source/_includes/site/hero_unit.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/_includes/site/hero_unit.html
🔇 Additional comments (4)
sass/homeassistant/homepage/_hero_unit.scss (4)

7-7: LGTM! Background and spacing improvements

The gradient update and increased margin create better visual hierarchy and spacing.

Also applies to: 10-10


32-35: LGTM! Text gradient enhancement

The gradient text effect adds visual interest while maintaining readability through proper contrast.


49-54: Skipping review of !important declarations

This issue has been addressed in previous reviews.


88-145: LGTM! Well-structured social proof implementation

The social proof sections are well-organized with appropriate hover effects and responsive layout.

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

🧹 Outside diff range and nitpick comments (4)
sass/homeassistant/homepage/_hero_unit.scss (4)

27-35: Consider using fluid typography for better scaling

While the large font size creates impact, consider using CSS clamp() or min() for more fluid scaling:

h1 {
-    font-size: 8rem;
+    font-size: clamp(4rem, calc(2rem + 10vw), 8rem);
     font-style: normal;
     font-weight: 800;
     line-height: 1;
     letter-spacing: -2.56px;
}

This would provide smoother scaling between viewport sizes while maintaining the desired impact.


105-125: Consider using max-width for better responsiveness

The fixed width of 330px might cause overflow issues on smaller devices.

.hero-github-top-project {
-    width: 330px;
+    max-width: 330px;
+    width: 100%;

163-167: Clean up unused animation code

The floaty-demo animation is defined but commented out in usage. Consider either:

  1. Removing the unused animation code, or
  2. Uncommenting the animation if it's intended to be used

Also applies to: 181-188


Line range hint 200-288: Consider using CSS custom properties for breakpoints

The media queries use hardcoded pixel values. Consider using CSS custom properties for better maintainability:

+ :root {
+   --breakpoint-large: 1280px;
+   --breakpoint-medium: 1080px;
+   --breakpoint-small: 760px;
+ }

- @media only screen and (max-width: 1280px) {
+ @media only screen and (max-width: var(--breakpoint-large)) {

This would make it easier to maintain consistent breakpoints across the codebase.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 359d40c and d0f1542.

📒 Files selected for processing (1)
  • sass/homeassistant/homepage/_hero_unit.scss (7 hunks)
🔇 Additional comments (2)
sass/homeassistant/homepage/_hero_unit.scss (2)

7-7: LGTM! Well-structured gradient and spacing.

The HSL gradient provides good maintainability, and the increased margin improves vertical rhythm.

Also applies to: 10-10


56-82: LGTM! Well-structured component styles.

Good use of:

  • Flexbox for layout
  • Semantic class names
  • Consistent spacing
  • Smooth transitions

Also applies to: 88-104, 127-145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant