Skip to content

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Aug 15, 2025

Summary by Sourcery

Fix CSS layout issues for button groups under Django admin style, enhance color variable fallback, and clean up generated CSS

Bug Fixes:

  • Prevent button groups from being too condensed in djangocms-admin-style by overriding width constraints.

Enhancements:

  • Augment $color-secondary Sass variable with an additional fallback to var(--dca-primary).

Chores:

  • Remove @charset declaration and prune redundant theme/Bootstrap variable definitions from base.css and button_group.css.

Copy link
Contributor

sourcery-ai bot commented Aug 15, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR adds a djangocms-admin-style CSS override to prevent button groups from being overly condensed, adjusts the secondary color SCSS variable fallback, and cleans up generated CSS assets by removing redundant @charset declarations.

Class diagram for updated SCSS variable fallback logic

classDiagram
    class VariablesSCSS {
      $color-primary: var(--primary)
      $color-secondary: var(--dca-action-bg, var(--dca-primary, var(--header-bg)))
      $color-gray: var(--dca-gray, var(--breadcrumbs-fg, #999))
      $dark-fg: var(--dca-dark-fg, #333)
    }
Loading

File-Level Changes

Change Details Files
Add admin-style override for button group width
  • Introduce high-specificity selector to unset max-width and width under djangocms-admin-style forms
  • Document hack with comment
private/sass/components/_button-group.scss
Enhance secondary color fallback variable
  • Include --dca-primary as a fallback for $color-secondary
  • Reorder var() fallbacks for consistency
private/sass/components/_variables.scss
Remove redundant @charset declarations from CSS assets
  • Delete @charset "UTF-8" from base.css
  • Delete @charset "UTF-8" from button_group.css
djangocms_frontend/static/djangocms_frontend/css/base.css
djangocms_frontend/static/djangocms_frontend/css/button_group.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.13%. Comparing base (662b357) to head (0cf93fd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #303   +/-   ##
=======================================
  Coverage   89.13%   89.13%           
=======================================
  Files         124      124           
  Lines        3387     3387           
  Branches      288      288           
=======================================
  Hits         3019     3019           
  Misses        252      252           
  Partials      116      116           

☔ 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.

@fsbraun fsbraun merged commit 6ec69a0 into main Aug 15, 2025
32 checks passed
@fsbraun fsbraun deleted the fix/djangocms-admin-style-hack branch August 15, 2025 11:31
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @fsbraun, you have reached your 24-hour rate limit for Sourcery. Please try again later

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.

1 participant