Support group header hover and regular bg#927
Merged
lukasmasuch merged 7 commits intoglideapps:mainfrom Jun 18, 2025
Merged
Conversation
|
Hey @jassmith , When can we get this merged? This would be very helpful for my case as well! Thanks! |
|
This is very helpful feature. Waiting for it to be merged |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for custom background and hover colors specifically for group headers without affecting regular headers.
- Introduce two new theme properties:
bgGroupHeaderandbgGroupHeaderHovered - Update the drawing logic to use these new properties with proper fallbacks
- Expose corresponding CSS variables and document the
bgGroupHeadervariable in the theming guide
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/internal/data-grid/render/data-grid-render.header.ts | Use bgGroupHeader/bgGroupHeaderHovered in fillColor with fallback to bgHeader |
| packages/core/src/docs/08-theming.stories.tsx | Added a docs entry for the bgGroupHeader CSS variable |
| packages/core/src/common/styles.ts | Added CSS variables and theme interface fields for group header backgrounds |
Comments suppressed due to low confidence (2)
packages/core/src/docs/08-theming.stories.tsx:257
- The theming docs lack an entry for the new
bgGroupHeaderHoveredCSS variable (--gdg-bg-group-header-hovered). Please add a row describing its purpose and default fallback behavior.
| bgGroupHeader | --gdg-bg-group-header | string \\| undefined | The group header background color, if none provided the `bgHeader` is used instead. |
packages/core/src/internal/data-grid/render/data-grid-render.header.ts:185
- New behavior for group header backgrounds and hover styling is introduced here. Please add or update unit/integration tests to verify that
bgGroupHeaderandbgGroupHeaderHoveredare applied correctly under various override scenarios.
export function drawGroups(
packages/core/src/internal/data-grid/render/data-grid-render.header.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@jassmith
With this PR we'll be able to customize background colors for group headers and also change the hover color as well without affecting regular headers.