fix(modal-window): use dynamic height instead of hard-coded 407px#1047
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (10)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR introduces a new ChangesAlert Subsystem Counter Component
Estimated code review effort: 2 (Simple) | ~12 minutes Modal Window Sizing Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🐇 A counter hops onto the stage, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
talpitoo
left a comment
There was a problem hiding this comment.
@ludvigovrevik it seems it got mixed up with your other PR
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.css`:
- Around line 40-50: The `.label` block and the other affected style blocks in
`alert-subsystem-counter.css` are missing the required blank line before
declarations that follow `@mixin` at-rules, triggering
`declaration-empty-line-before` lint errors. Update each affected rule in this
stylesheet so the declaration list after `@mixin font-body;` follows the
project’s spacing convention, and verify the same fix is applied in the other
matching blocks around the `label`/counter styles.
In
`@packages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.ts`:
- Around line 103-106: The conditional property `emptyText` in
`alert-subsystem-counter.ts` is missing the required availability annotation.
Update the inline JSDoc for the `emptyText` property to include `@availableWhen`
so it clearly states that this text is only used when `hasAlert` is false, while
keeping the annotation on the dependent property rather than the gate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 65190e70-cf19-4b5f-b2ef-0c8821f6a848
⛔ Files ignored due to path filters (9)
packages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/abbreviation-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/abbreviation-vertical-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/default-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/no-alerts-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/vertical-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/vertical-no-alerts-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/alert-subsystem-counter/alert-subsystem-counter.stories.ts/without-icon-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/modal-window/modal-window.stories.ts/without-cancel-and-close-auto.pngis excluded by!**/*.pngpackages/openbridge-webcomponents/__vis__/linux/__baselines__/components/modal-window/modal-window.stories.ts/without-cancel-auto.pngis excluded by!**/*.png
📒 Files selected for processing (4)
packages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.csspackages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.stories.tspackages/openbridge-webcomponents/src/components/alert-subsystem-counter/alert-subsystem-counter.tspackages/openbridge-webcomponents/src/components/modal-window/modal-window.css
|
The demo can be viewed at https://openbridge-next-demo--1047-fix-modal-window-use-dynami-bpd670rf.web.app |
|
The storybook can be viewed at https://openbridge-next-storybook--1047-fix-modal-window-use-d-p8mlp5tp.web.app |
The modal wrapper was locked to `height: 407px`, preventing it from growing or shrinking to fit its content. Replace the fixed height with content-driven sizing capped at `max-height: 90vh`, and make the content area scroll (`overflow-y: auto`, `min-height: 0`) so the header and action bar stay pinned when content exceeds the cap. Update the without-cancel and without-cancel-and-close snapshot baselines, which now pack to content height instead of stretching. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Regenerate the modal-window visual baselines to match the content-driven height render (from CI). All size variants now pack to content height instead of stretching to a fixed 407px. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
a2a0d15 to
9c448ae
Compare
## [2.0.0-next.104](v2.0.0-next.103...v2.0.0-next.104) (2026-07-27) ### Bug Fixes * **modal-window:** use dynamic instead of hard-coded height ([#1047](#1047)) ([0d51840](0d51840))
Problem
The modal window wrapper was locked to
height: 407px, so the modal could not grow or shrink to fit its content. Reported externally, confirmed by Torstein: this should not be a hard-coded value — the modal should take the height its content needs, with a viewport cap.Fix
height: 407pxfrom.wrapper; addmax-height: 90vhso the modal is content-driven and capped at 90% of the viewport height..content-areascrollable (flex: 1 1 auto,min-height: 0,overflow-y: auto) so when content exceeds the 90vh cap, the content scrolls while the title bar and action bar stay pinned.Snapshot baselines
Two Linux baselines were regenerated because they now pack to content height instead of stretching:
without-cancelwithout-cancel-and-closeThe other modal stories render identically (their old baselines already showed content-driven height in the test harness, so removing the dead
407pxdid not change them). The 2 updated baselines were verified by eye and pass against the affected stories in the CI-matching Docker image.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes