Skip to content

Conversation

@pftg
Copy link
Member

@pftg pftg commented Sep 27, 2025

Summary by CodeRabbit

  • New Features

    • Added reusable Hero, Card, and Content components with variants, responsive layouts, and improved theming.
  • Performance

    • Introduced critical CSS for faster initial render and removed a legacy stylesheet to reduce bloat.
    • Added foundational layout utilities to ensure smoother, more consistent page rendering.
  • Style

    • Refined page layouts and spacing; improved button, typography, and hover states for better readability and consistency.
  • Documentation

    • Added Component Migration Plan and CSS Optimization Findings outlining strategy, milestones, and testing protocols.

pftg and others added 3 commits September 27, 2025 10:37
- Removed reference from layouts/page/single.html
- Deleted themes/beaver/assets/css/fl-component-layout-alt.css
- Phase 1 FL CSS removal: 21KB saved
- Tests: 39 runs, 57 assertions, 0 failures
The removal of .fl-node-2il86phfbmex CSS in commit 8397a2b broke
service page layouts. This fix replaces the FL-Builder node reference
with inline styles maintaining the same visual behavior (width: 100%).

- Updated line 37 in themes/beaver/layouts/services/single.html
- Replaced fl-node-2il86phfbmex with inline CSS equivalent
- Maintains backward compatibility with FL-Builder structure
- Fixes visual regression tests for service pages

Tests now pass: 23 runs, 36 assertions, 0 failures

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Walkthrough

Adds BEM-based component CSS (c-hero, c-card, c-content), introduces critical and foundation FL CSS, removes legacy fl-component-layout-alt.css and its layout reference, tweaks a services layout column, and adds two planning docs detailing migration and CSS optimization strategies.

Changes

Cohort / File(s) Summary
Documentation: Migration & Optimization Plan
docs/component-migration-plan.md, docs/css-optimization-findings.md
New docs outlining BEM migration strategy, target components, testing, file organization, rollout phases, and CSS optimization plan/governance.
New BEM Components (Blocks)
themes/beaver/assets/css/components/blocks/c-hero.css, .../components/blocks/c-card.css, .../components/blocks/c-content.css
Adds presentational CSS for reusable hero, card, and content components with variants, responsive rules, and FL-Builder compatibility notes/selectors.
Foundation & Critical CSS
themes/beaver/assets/css/fl-foundation.css, themes/beaver/assets/css/critical.css
Introduces foundational FL layout/utilities and above-the-fold critical styles, including resets, visibility utilities, scaffolding, and responsive breakpoints.
Legacy CSS Removal & Template Update
themes/beaver/assets/css/fl-component-layout-alt.css, themes/beaver/layouts/page/single.html
Deletes legacy layout CSS and removes its inclusion from page single layout resources.
Layout Markup Adjustment
themes/beaver/layouts/services/single.html
Replaces a specific .fl-col ... class with a generic .fl-col and inline styles; no content logic changes.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • AucT
  • dgorodnichy

Poem

I hop through styles with tidy paws,
From FL to BEM, I tweak the laws.
Cards and heroes, crisp and light,
Critical CSS for speedy sight.
Old threads snipped, new seams sewn—
Thump-thump! This garden’s cleanly grown. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The provided title “refact: continue fixes 4” is too generic and does not convey the primary changes introduced in this pull request, such as the new CSS component modules, critical stylesheet, and documentation for a BEM migration plan. It fails to clearly summarize the scope or intent of the changeset, making it difficult for reviewers to understand the main purpose at a glance. As a result, the title does not meet the clarity and specificity criteria. Please update the title to briefly describe the key changes, for example “chore: add BEM-based component CSS modules, critical.css, and migration plan documentation,” so that it clearly reflects the scope and intent of the pull request.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refact/components-fixes-4

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
themes/beaver/layouts/services/single.html (1)

37-75: Reintroduce the node-specific class for this column

Line 37 drops the fl-node-2il86phfbmex identifier. Those FL node IDs are still referenced by the dynamic CSS bundle we assemble via $servicesResources (notably the template-driven asset at Line 3), so removing the class severs the responsive spacing/width rules scoped to that column. The inline style you added covers only the base desktop flow; tablet/mobile overrides and any node-specific tweaks are now lost. Please keep the node class (and add the inline style alongside it if needed).

-                                  <div class="fl-col" style="width: 100%; float: left; min-height: 1px;">
+                                  <div class="fl-col fl-node-2il86phfbmex" style="width: 100%; float: left; min-height: 1px;">
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a03475e and 7474c96.

📒 Files selected for processing (10)
  • docs/component-migration-plan.md (1 hunks)
  • docs/css-optimization-findings.md (1 hunks)
  • themes/beaver/assets/css/components/blocks/c-card.css (1 hunks)
  • themes/beaver/assets/css/components/blocks/c-content.css (1 hunks)
  • themes/beaver/assets/css/components/blocks/c-hero.css (1 hunks)
  • themes/beaver/assets/css/critical.css (1 hunks)
  • themes/beaver/assets/css/fl-component-layout-alt.css (0 hunks)
  • themes/beaver/assets/css/fl-foundation.css (1 hunks)
  • themes/beaver/layouts/page/single.html (0 hunks)
  • themes/beaver/layouts/services/single.html (1 hunks)
💤 Files with no reviewable changes (2)
  • themes/beaver/assets/css/fl-component-layout-alt.css
  • themes/beaver/layouts/page/single.html
🧰 Additional context used
📓 Path-based instructions (2)
themes/**/assets/**/*.{css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

CSS/SCSS should follow project performance and responsiveness practices; mobile @media queries must avoid problematic CSS variable rendering (use direct hex if needed)

Files:

  • themes/beaver/assets/css/components/blocks/c-card.css
  • themes/beaver/assets/css/components/blocks/c-content.css
  • themes/beaver/assets/css/fl-foundation.css
  • themes/beaver/assets/css/critical.css
  • themes/beaver/assets/css/components/blocks/c-hero.css
{layouts,themes/**/layouts}/**/*.html

📄 CodeRabbit inference engine (CLAUDE.md)

Hugo templates must use Go template syntax and follow Hugo layout patterns (no foreign templating or React/JSX)

Files:

  • themes/beaver/layouts/services/single.html
🧬 Code graph analysis (1)
themes/beaver/assets/css/critical.css (1)
test/unit/hugo_partials_test.rb (1)
  • test_critical_css_partial (168-185)
🪛 markdownlint-cli2 (0.18.1)
docs/component-migration-plan.md

138-138: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ 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_and_deploy / build

Comment on lines +138 to +153
```
themes/beaver/assets/css/components/
├── base/
│ ├── c-grid.css
│ └── c-section.css
├── layout/
│ ├── c-nav.css
│ └── c-footer.css
└── blocks/
├── c-hero.css
├── c-card.css
├── c-content.css
├── c-testimonial.css
├── c-cta.css
└── c-form.css (existing)
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a language to this fenced code block

Markdownlint (MD040) flags the bare triple backtick fence around the directory tree. Add a language identifier (e.g., text) so the docs pipeline passes.

-```
+```text
 themes/beaver/assets/css/components/
 ├── base/
 │   ├── c-grid.css
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

138-138: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In docs/component-migration-plan.md around lines 138 to 153, the fenced code
block showing the directory tree is missing a language identifier which triggers
markdownlint MD040; update the opening triple-backtick fence to include a
language (for example "text") so it becomes ```text and leave the block contents
unchanged, then save the file so the docs pipeline no longer flags the block.

Comment on lines +205 to +209
.c-card--clickable {
cursor: pointer;
text-decoration: none;
display: block;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Restore flex layout for clickable cards

.c-card--clickable overrides the base .c-card display:flex with display:block, so the layout loses flex behavior (e.g., .c-card__body { flex: 1; } no longer stretches and meta/footer content stops pinning to the bottom). Drop the override so clickable variants keep the intended structure.

 .c-card--clickable {
   cursor: pointer;
   text-decoration: none;
-  display: block;
 }
📝 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
.c-card--clickable {
cursor: pointer;
text-decoration: none;
display: block;
}
.c-card--clickable {
cursor: pointer;
text-decoration: none;
}
🤖 Prompt for AI Agents
In themes/beaver/assets/css/components/blocks/c-card.css around lines 205 to
209, the .c-card--clickable rule sets display:block which overrides the base
.c-card display:flex and breaks flex layout (so .c-card__body flex:1 and
footer/meta pinning stop working); remove the display:block declaration from
.c-card--clickable (keep cursor:pointer and text-decoration:none) so clickable
cards inherit the base flex layout and maintain intended stretching and
alignment.

@pftg pftg merged commit 76f0bbe into master Sep 27, 2025
2 checks passed
@pftg pftg deleted the refact/components-fixes-4 branch September 27, 2025 12:40
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.

2 participants