#13423 - Increased case selection table row height by 1#13580
#13423 - Increased case selection table row height by 1#13580raulbob merged 1 commit intodevelopmentfrom
Conversation
In order to address a Firefox layout issue where the row of the case selection table was not fully visible when there were no cases to display, the initial number of rows displayed in the case selection table was increased from 1 to 2.
WalkthroughUpdated CaseSelectionGrid.reload() to set the grid height to 2 rows when there are zero items. Existing rules remain: height equals item count for 1–10 items; capped at 10 for more than 10 items. No changes to public APIs. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/caseselection/CaseSelectionGrid.java (1)
93-93: Tidy up nested ternary; keep the 2-row fallback as intendedChange aligns with the PR objective. To improve readability and avoid magic numbers, compute rows explicitly and introduce named constants.
Apply this localized refactor:
- setHeightByRows(cases.size() > 0 ? (cases.size() <= 10 ? cases.size() : 10) : 2); + int rows = cases.isEmpty() ? MIN_ROWS_WHEN_EMPTY : Math.min(cases.size(), MAX_VISIBLE_ROWS); + setHeightByRows(rows);And add these class-level constants outside the shown range:
private static final int MAX_VISIBLE_ROWS = 10; private static final int MIN_ROWS_WHEN_EMPTY = 2;Verification (manual):
- Zero items: height shows space for 2 rows in Firefox, Chrome, Edge.
- 1–10 items: height equals item count.
10 items: height capped at 10.
- Quickly resize the grid container to ensure wrapping/variable row heights don’t regress the fix in Firefox.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/caseselection/CaseSelectionGrid.java(1 hunks)
⏰ 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). (1)
- GitHub Check: SORMAS CI
In order to address a Firefox layout issue where the row of the case selection table was not fully
visible when there were no cases to display,
the initial number of rows displayed in
the case selection table was increased from 1 to 2.
Summary by CodeRabbit