Skip to content

Conversation

@JakeSCahill
Copy link
Contributor

@JakeSCahill JakeSCahill commented Nov 12, 2025

This pull request introduces a series of improvements focused on performance optimization, prevention of layout shifts (CLS), and a major redesign of the site footer. The changes enhance user experience by reserving space for key UI elements, optimizing image loading, and refactoring the footer for better structure and responsiveness. Additionally, several CSS and build process updates support these improvements.

Preview: https://deploy-preview-345--docs-ui.netlify.app/#fin

Performance & Layout Shift (CLS) Prevention

Reduced CLS from an average of 0.401 to 0.247

  • Added contain and reserved space (min-height, min-width, aspect-ratio) to multiple CSS selectors including html, .doc .sect1, images, navigation, and TOC to isolate rendering and prevent layout shifts. [1] [2] [3] [4] [5] [6]
  • Implemented a new script src/js/15-optimize-images.js to add lazy loading, async decoding, and explicit dimensions to images for faster load times and reduced CLS.
  • Updated font loading in src/css/typeface-calibre-regular.css to use font-display: optional, reducing CLS from font swaps.

Footer Redesign & Responsiveness

  • Completely refactored the footer in src/css/footer.css with a new structure, improved layout, reserved space, isolated rendering, and enhanced responsive design. Footer now uses .container-large, .footer__top, .footer__columns, .footer__bottom, and related classes. [1] [2]
  • Simplified and visually refined the footer on home and labs pages with lighter colors, reduced content, and centered layout (src/css/home.css).

Build Process & Asset Optimization

  • Updated gulp.d/tasks/build.js to minify Prism plugins, handle legacy JS files, and improve copying of vendor assets to avoid unnecessary processing. [1] [2]

Stylelint Configuration

  • Updated .stylelintrc to ignore unknown properties for contain and aspect-ratio, supporting new CSS features used for CLS prevention.

Minor Accessibility & Usability Fixes

  • Added a missing href="#" to the "Make a contribution" link in the feedback footer partial for improved accessibility.

   Update footer to use new responsive multi-column layout with:
   - New Redpanda footer logo
   - Organized links in Product, Learn, and Company sections
   - Improved responsive design with flexbox layout
   - Enhanced styling with CSS variables for theming
   - Social media icons integration
   - Better spacing and typography

   This redesign improves footer usability and aligns with Redpanda's
   current branding guidelines.
@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit c61b43d
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6915a95d9b4e5a0008502928
😎 Deploy Preview https://deploy-preview-345--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 29 (🟢 up 4 from production)
Accessibility: 93 (no change from production)
Best Practices: 100 (no change from production)
SEO: 89 (🟢 up 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This PR implements a multi-faceted performance, accessibility, and UI enhancement across the documentation site. Key changes include: adding CSS containment rules (contain: layout/style/paint) across multiple layouts to reduce Cumulative Layout Shift; implementing lazy loading and async decoding for images with explicit dimension attributes; restructuring the footer markup with semantic BEM-style naming and a multi-column grid layout; optimizing resource loading with print-media + onload patterns for non-critical CSS and deferred script loading; updating the Gulp build process to refine vendor bundle collection and Prism plugin minification; adding accessibility attributes (role="button", tabindex="0") to navigation toggles; optimizing font delivery with font-display: optional; and updating Stylelint configuration to allow specific CSS properties. Changes span styling, build configuration, templates, and JavaScript across 15 files.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • src/js/15-optimize-images.js — New image optimization script with conditional dimension-setting logic and diagnostic logging; requires verification of dimension calculation correctness and load event handling edge cases.
  • gulp.d/tasks/build.js — Vendor bundling refactor affects asset delivery pipeline; verify exclusion patterns don't inadvertently skip needed assets and that Prism plugin minification is applied correctly.
  • src/css/footer.css & src/partials/footer-content.hbs — Interconnected footer redesign with semantic restructuring; changes must be validated together for consistent spacing, responsive behavior, and link/social icon rendering.
  • src/partials/head-scripts.hbs & src/partials/head-styles.hbs — Resource loading optimization with print-media + onload patterns and noscript fallbacks; verify no render-blocking or missing fallback paths for disabled JavaScript.
  • Image and CSS containment interaction — Verify that aspect-ratio handling and image-rendering properties work correctly with lazy loading and new dimension attributes.

Possibly related PRs

  • Reduce CLS #332 — Also targets CLS reduction via layout/CSS changes in footer.css and main.css, sharing the same performance optimization theme.
  • Upgrade Kapa SDK #311 — Modifies gulp.d/tasks/build.js vendor JavaScript handling for sorttable and Prism bundle processing, directly overlapping file scope.

Suggested reviewers

  • paulohtb6
  • kbatuigas

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and directly describes the two main changes in the PR: introducing a new Redpanda footer and optimizing for performance, which aligns with the substantial footer redesign and comprehensive performance enhancements throughout the changeset.
Description check ✅ Passed The pull request description accurately relates to and describes the changeset, covering performance optimizations, footer redesign, build process updates, and accessibility improvements.

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

🧹 Nitpick comments (1)
.stylelintrc (1)

9-17: Permit size-adjust so the font fallback fix can ship

src/css/typeface-calibre-regular.css (Line 7) currently comments out size-adjust purely because Stylelint flags it. size-adjust is supported in modern browsers and is the intended way to align fallback metrics; without it the CLS mitigation you mention never runs. Please allow it here so we can restore the declaration.

Apply this diff:

-    "property-no-unknown": [
-      true,
-      {
-        "ignoreProperties": [
-          "contain",
-          "aspect-ratio"
-        ]
-      }
-    ]
+    "property-no-unknown": [
+      true,
+      {
+        "ignoreProperties": [
+          "contain",
+          "aspect-ratio",
+          "size-adjust"
+        ]
+      }
+    ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 28c0f7c and 8e0a700.

⛔ Files ignored due to path filters (1)
  • src/img/footer-logo.svg is excluded by !**/*.svg
📒 Files selected for processing (18)
  • .stylelintrc (1 hunks)
  • gulp.d/tasks/build.js (2 hunks)
  • src/css/doc.css (3 hunks)
  • src/css/footer.css (1 hunks)
  • src/css/home.css (1 hunks)
  • src/css/main.css (1 hunks)
  • src/css/nav.css (1 hunks)
  • src/css/toc.css (1 hunks)
  • src/css/typeface-calibre-regular.css (1 hunks)
  • src/js/15-optimize-images.js (1 hunks)
  • src/partials/feedback-footer.hbs (1 hunks)
  • src/partials/footer-content.hbs (1 hunks)
  • src/partials/head-scripts.hbs (1 hunks)
  • src/partials/head-styles.hbs (1 hunks)
  • src/partials/header-scripts.hbs (2 hunks)
  • src/partials/home.hbs (2 hunks)
  • src/partials/nav-tree-lab.hbs (2 hunks)
  • src/partials/nav-tree.hbs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
gulp.d/tasks/build.js (1)
gulp.d/tasks/build-preview-pages.js (1)
  • vfs (12-12)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
src/partials/header-scripts.hbs (1)

3-22: Deferred script loading and Mermaid gating look great

Deferring Popper/Tippy/Choices while keeping Mermaid off home and labs-search pages tightens the critical path without breaking dependencies. Nicely done.

src/partials/nav-tree-lab.hbs (1)

16-16: Verify keyboard event handlers for button roles.

Similar to nav-tree.hbs, these toggles with role="button" must respond to both Space and Enter keys. The explicit image dimensions appropriately prevent CLS.

The verification script from the nav-tree.hbs review will also cover these handlers.

Also applies to: 35-35

src/css/footer.css (4)

11-11: Verify CSS containment includes paint value per PR objectives.

Line 11 specifies contain: layout style, but the PR objectives describe implementing contain: layout/style/paint across multiple selectors. Confirm whether omitting paint is intentional or if it should be added for full performance optimization.


1-196: Well-structured footer redesign with modern CSS patterns.

The footer restructuring follows BEM naming conventions, uses appropriate flexbox and grid layouts with responsive breakpoints, and implements performance optimizations (min-height for CLS prevention, contain property for rendering isolation). The responsive behavior across 768px, 769px, 1024px, and 1350px breakpoints is well-planned and the visual hierarchy is clear.


75-81: All CSS custom properties are defined and valid.

The verification confirms that all three variables referenced in footer.css are properly defined in src/css/vars.css:

  • --body-font-family-bold: Defined with fallback fonts
  • --body-faint-font-color: Defined as #667085 with dark mode variant
  • --link-highlight-color: Defined as #444ce7 (light) and #9184f1 (dark)

The footer styling is correct and requires no changes.


185-196: No issues found—CSS variables are properly defined.

Both --toc-width and --toc-width--widescreen are defined in src/css/vars.css, making them available throughout the stylesheet including the media queries in lines 185-196 of src/css/footer.css. The variables are correctly accessible to the main:not(.labs):not(.home) footer.footer selectors.

@Feediver1
Copy link
Contributor

@JakeSCahill Was it requested that we update the footer to align with rest of RP? I have to say, this feels very...unbalanced. Such an odd use of space here.

Copy link
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

Nothing wrong with it except that I don't like it! So imbalanced. I'm surprised that marketing thought this was an improvement. Approving, but begrudgingly.

@JakeSCahill
Copy link
Contributor Author

@JakeSCahill Was it requested that we update the footer to align with rest of RP? I have to say, this feels very...unbalanced. Such an odd use of space here.

I've made the footer content align with our doc content so it feels less awkward. We've always tried to keep the footers in sync with marketing so users have a consistent experience.

@JakeSCahill JakeSCahill merged commit f4e6812 into main Nov 13, 2025
6 checks passed
@JakeSCahill JakeSCahill deleted the new-footer branch November 13, 2025 10:01
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.

3 participants