Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Sep 10, 2025

Summary by CodeRabbit

  • Chores
    • Updated theme build configuration to use the current Sass option key; dev builds remain expanded, prod builds remain compressed. No end-user functional or visual changes; no action required.
  • Tests
    • Adjusted a frontend asset test expectation to account for minor formatting/whitespace in generated CSS.

@coderabbitai
Copy link

coderabbitai bot commented Sep 10, 2025

Walkthrough

Renamed the Sass option key outputStyle to style in the Grunt Sass configuration for both development (expanded) and production (compressed). Also changed a single test expectation spacing in .vortex/tests/bats/_helper.workflow.bash for a CSS background rule. No other logic changes.

Changes

Cohort / File(s) Summary
Grunt Sass config
web/themes/custom/your_site_theme/Gruntfile.js
Renamed Sass option key outputStylestyle in dev (expanded) and prod (compressed) configs; no other edits.
Bats test expectation
.vortex/tests/bats/_helper.workflow.bash
Adjusted expected FE asset CSS assertion to match background:#7e57e2 (removed single space after colon).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the core update—correcting the theme’s CSS output style within the Grunt configuration—which aligns directly with the change in Gruntfile.js and highlights the primary developer intent. It is concise, specific, and free of extraneous wording, making it clear to reviewers what the PR addresses.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I twitch my whiskers near the build at night,
Swapping keys so styles compile just right.
“outputStyle?”—hop—now “style” anew,
Dev expanded, prod compressed too.
A rabbit clap for tidy lines and light. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/fix-theme-css-output

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.02%. Comparing base (3ecce06) to head (8e4f7e0).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2008   +/-   ##
========================================
  Coverage    78.02%   78.02%           
========================================
  Files           89       89           
  Lines         5542     5542           
  Branches        44       44           
========================================
  Hits          4324     4324           
  Misses        1218     1218           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/fix-theme-css-output branch from 89f922e to 8e4f7e0 Compare September 10, 2025 20:30
@github-actions github-actions bot temporarily deployed to commit September 10, 2025 20:33 Inactive
Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89f922e and 8e4f7e0.

⛔ Files ignored due to path filters (4)
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/Gruntfile.js is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/Gruntfile.js is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/Gruntfile.js is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/Gruntfile.js is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (2)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • web/themes/custom/your_site_theme/Gruntfile.js (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
web/themes/custom/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place all custom Drupal themes under web/themes/custom/[theme_name]/

Files:

  • web/themes/custom/your_site_theme/Gruntfile.js
🧠 Learnings (1)
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/tests/bats/_helper.workflow.bash
⏰ 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). (14)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (1)
.vortex/tests/bats/_helper.workflow.bash (1)

773-773: Test expectation correctly aligned with compressed CSS output.

Matches the minified Sass output (no space after colon) and keeps consistency with earlier negative assertion for the spaced variant.

Comment on lines +87 to 88
style: 'expanded'
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Confirm grunt-sass/sass versions accept style; add fallback for broad compatibility.

Depending on plugin/runtime versions, some stacks only honor outputStyle (legacy render API) while others use style (newer API). Please verify theme package versions to avoid silent reversion to default formatting.

Run to verify versions and other themes’ configs:

If you need cross-version safety, set both keys (harmless for either API):

         options: {
           implementation: require('sass'),
           sourceMap: true,
-          style: 'expanded'
+          style: 'expanded',
+          outputStyle: 'expanded'
         }
...
         options: {
           implementation: require('sass'),
           sourceMap: false,
-          style: 'compressed'
+          style: 'compressed',
+          outputStyle: 'compressed'
         }

Also applies to: 97-98


🏁 Script executed:

#!/bin/bash
# Inspect theme package versions.
rg -n '"grunt-sass"|\"sass\"' web/themes/custom/**/package.json -C1 || true

# Check all theme Gruntfiles for style keys used.
rg -nP '\b(outputStyle|style)\b' web/themes/custom/**/Gruntfile.js || true

Length of output: 164


🏁 Script executed:

#!/bin/bash
# Inspect Sass-related dependencies and versions in theme package.json files
find web/themes/custom -type f -name package.json -print0 | xargs -0 rg -nP '"(?:grunt-sass|sass|grunt-contrib-sass)"\s*:\s*"[^"]+"' -n || true

# Check all theme Gruntfiles for style and outputStyle usage
rg -nP '\b(outputStyle|style)\b' web/themes/custom/**/Gruntfile.js || true

Length of output: 116


Explicitly set outputStyle alongside style in Gruntfile.js
grunt-sass v4’s task options honor outputStyle, not style. Update each Sass task (around lines 87–88 and 97–98) to include:

         options: {
           implementation: require('sass'),
           sourceMap: true,
-          style: 'expanded'
+          style: 'expanded',
+          outputStyle: 'expanded'
         }
…  
         options: {
           implementation: require('sass'),
           sourceMap: false,
-          style: 'compressed'
+          style: 'compressed',
+          outputStyle: 'compressed'
         }
📝 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
style: 'expanded'
}
// … around lines 87–88 …
options: {
implementation: require('sass'),
sourceMap: true,
style: 'expanded',
outputStyle: 'expanded'
}
// … around lines 97–98 …
options: {
implementation: require('sass'),
sourceMap: false,
style: 'compressed',
outputStyle: 'compressed'
}
🤖 Prompt for AI Agents
In web/themes/custom/your_site_theme/Gruntfile.js around lines 87–88 (and also
update the similar block at lines 97–98), the sass task currently sets style:
'expanded' but grunt-sass v4 requires outputStyle; add outputStyle: 'expanded'
alongside the existing style key (and for the second block mirror the same
change, or set outputStyle to whatever the intended style is) so the task
options include both keys to ensure v4 respects the formatting option.

@AlexSkrypnyk AlexSkrypnyk merged commit 208b7bd into develop Sep 10, 2025
31 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/fix-theme-css-output branch September 10, 2025 20:57
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 25.10.0

Development

Successfully merging this pull request may close these issues.

2 participants