[OP-20322] Keep table row actions on screen - #25581
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified, and all reviewed changes have regression coverage.
Review effort: Lite
Findings: None
What changed in this PR
Fixes mobile Border Box Table layouts so long row names no longer push action menus off-screen.
Changes:
- Uses
minmax(0, 1fr)for the mobile name column. - Adds a viewport-boundary matcher.
- Adds a 400px regression test for status row actions.
| File | Description |
|---|---|
spec/support/matchers/be_inside_viewport.rb |
Adds a viewport containment matcher. |
spec/features/admin/statuses_spec.rb |
Tests mobile status action accessibility. |
app/components/op_primer/border_box_table_component.sass |
Allows mobile grid content to shrink and truncate. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
9574d30 to
aa7317d
Compare
Sets the mobile main-column track of the Border Box Table to minmax(0, 1fr) so a nowrap name cell can shrink instead of growing to its content and pushing the action column past the viewport edge, as desktop tracks already do. Adds a phone-width regression example that finds the actions trigger only once its whole box lies inside the viewport, which fails on the old layout because the trigger's box ends at x=502 in a 400 px viewport. https://community.openproject.org/wp/OP-20322
aa7317d to
915616b
Compare
|
Caution The provided work package version does not match the core version Details:
Please make sure that:
|
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
Ticket
https://community.openproject.org/wp/OP-20322
What are you trying to accomplish?
Keep the row action menu reachable on phone-sized screens when a Border Box Table row has a long name. Found in the review of PR #25468; the bug predates it and shows on the Statuses admin page on
dev.What approach did you choose and why?
The shared mobile grid used
grid-template-columns: 1fr auto. A1frtrack has anautominimum, so the nowrap name cell grew to its content and pushed the action column off screen. The mobile track is nowminmax(0, 1fr) auto, matching theminmax(0, 1fr)tracks the desktop layout already uses; the cell's existingellipsiscolumn then truncates the name.A regression example renders a long status name at 400 px and asserts the action trigger lies inside the viewport and opens, through a new
be_inside_viewportmatcher (a plainvisiblecheck passes on the broken layout).Screenshots
Statuses admin at 400 px, before / after. Before, the long status name pushes the Default label and the action menu trigger off screen; after, the name truncates and both stay visible.
Desktop unchanged at 1280 px:
AI involvement
Directed – I specified the requirements and AI implemented most of it; I validated via testing rather than a full line-by-line review.
Merge checklist