feat(components/modals): modal header close button is shown in modern theme#4265
feat(components/modals): modal header close button is shown in modern theme#4265Blackbaud-TrevorBurch merged 6 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughModal component styling gained theme-aware button classes and a CSS variable for header alignment. Tests were simplified by removing a legacy assertion and adding clarifying comments; no runtime behavior changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip Migrating from UI to YAML configuration.Use the |
|
View your CI Pipeline Execution ↗ for commit b38250e
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
libs/components/modals/src/lib/modules/modal/modal.component.scss (1)
75-77: Consider aligning variable naming with the new selector scope.Line 76 still uses
--sky-override-modal-help-close-display, but this block now applies only to.sky-modal-btn-help. A help-specific alias would make intent clearer and avoid future confusion.♻️ Optional aliasing refactor
`@include` compatMixins.sky-default-overrides('.sky-modal') { + --sky-override-modal-help-display: var(--sky-override-modal-help-close-display, inline-block); --sky-override-modal-help-close-display: inline-block; } .sky-modal-btn-help { - display: var(--sky-override-modal-help-close-display, none); + display: var( + --sky-override-modal-help-display, + var(--sky-override-modal-help-close-display, none) + ); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/components/modals/src/lib/modules/modal/modal.component.scss` around lines 75 - 77, The CSS variable name --sky-override-modal-help-close-display is misleading for the .sky-modal-btn-help selector; rename it to a help-specific alias (e.g. --sky-override-modal-help-btn-display) and update the .sky-modal-btn-help rule to use the new variable with the same fallback (preserve "none"), then search and replace other usages of --sky-override-modal-help-close-display across the codebase (or add a second alias mapping) so all help-related components reference the new --sky-override-modal-help-btn-display variable consistently.libs/components/modals/testing/src/legacy/modal-fixture.ts (1)
105-106: Avoid suppressing coverage on this branch.Line 106 hides coverage for the
elsepath, but that path is still the explicit error contract when the close button is missing/hidden. Prefer keeping it covered.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/components/modals/testing/src/legacy/modal-fixture.ts` around lines 105 - 106, Remove the "/* istanbul ignore else */" suppression on the safety-check branch in modal-fixture.ts so the explicit else path remains covered, and add a unit test that simulates the missing/hidden close button to exercise the else branch (the code that throws the error when the close button is absent) — locate the safety check around the close-button handling in ModalFixture (the method that attempts to click/close the modal) and ensure the test asserts the expected error is thrown so coverage includes that path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@libs/components/modals/src/lib/modules/modal/modal.component.scss`:
- Around line 75-77: The CSS variable name
--sky-override-modal-help-close-display is misleading for the
.sky-modal-btn-help selector; rename it to a help-specific alias (e.g.
--sky-override-modal-help-btn-display) and update the .sky-modal-btn-help rule
to use the new variable with the same fallback (preserve "none"), then search
and replace other usages of --sky-override-modal-help-close-display across the
codebase (or add a second alias mapping) so all help-related components
reference the new --sky-override-modal-help-btn-display variable consistently.
In `@libs/components/modals/testing/src/legacy/modal-fixture.ts`:
- Around line 105-106: Remove the "/* istanbul ignore else */" suppression on
the safety-check branch in modal-fixture.ts so the explicit else path remains
covered, and add a unit test that simulates the missing/hidden close button to
exercise the else branch (the code that throws the error when the close button
is absent) — locate the safety check around the close-button handling in
ModalFixture (the method that attempts to click/close the modal) and ensure the
test asserts the expected error is thrown so coverage includes that path.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
libs/components/modals/src/lib/modules/modal/modal.component.htmllibs/components/modals/src/lib/modules/modal/modal.component.scsslibs/components/modals/testing/src/legacy/modal-fixture.spec.tslibs/components/modals/testing/src/legacy/modal-fixture.ts
💤 Files with no reviewable changes (1)
- libs/components/modals/testing/src/legacy/modal-fixture.spec.ts
|
The logic lgtm, I have two questions:
|
Responses:
|
|
One thing I noticed in reviewing to make the matching Figma component and update docs is there isn't a gap space to the left of the close button. We've put those in spots like these to avoid the text running into the button. Similar to box header, this could use var(--sky-space-text_action_gap-l); |
|
@Blackbaud-MattGregg fixed the gap token being missing. |
|
Looks good to me with the added gap. I don't see a way to actually approve it in this repo so just commenting. |
## [14.0.0-alpha.10](14.0.0-alpha.9...14.0.0-alpha.10) (2026-03-18) ### ⚠ BREAKING CHANGES * **components/layout:** replace `@angular/animations` in text expand repeater component with CSS transitions (#4317) * **components/layout:** replace `@angular/animations` in text expand component with CSS transitions (#4308) * **components/inline-form:** replace `@angular/animations` with CSS transitions (#4315) * **components/popovers:** replace `@angular/animations` with CSS transitions (#4313) ### Features * **components/modals:** modal header close button is shown in modern theme ([#4265](#4265)) ([db2a615](db2a615)) ### Bug Fixes * **components/core:** animationend and transitionend handlers detect suppressed animations via `getComputedStyle` ([#4310](#4310)) ([88d7b0f](88d7b0f)) * **components/inline-form:** replace `@angular/animations` with CSS transitions ([#4315](#4315)) ([5254dbb](5254dbb)) * **components/layout:** replace `@angular/animations` in text expand component with CSS transitions ([#4308](#4308)) ([bbde359](bbde359)) * **components/layout:** replace `@angular/animations` in text expand repeater component with CSS transitions ([#4317](#4317)) ([bb4a3c7](bb4a3c7)) * **components/popovers:** replace `@angular/animations` with CSS transitions ([#4313](#4313)) ([28088aa](28088aa)) * **sdk/skyux-eslint:** remove `no-barrel-exports` rule ([#4320](#4320)) ([73dafd6](73dafd6)), closes [AB#3614172](https://dev.azure.com/blackbaud/Products/_workitems/edit/3614172) [#4268](#4268) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Animation behavior updated across multiple components * **New Features** * Added close button to modal headers in the modern theme * **Bug Fixes** * Resolved animation handling issues affecting multiple components * Fixed related stability issues across components <!-- end of auto-generated comment: release notes by coderabbit.ai -->
AB#3695438
Summary by CodeRabbit
New Features
Refactor