Skip to content

[OP-20322] Keep table row actions on screen - #25581

Merged
myabc merged 1 commit into
devfrom
bug/op-20322-border-box-table-mobile-overflow
Sep 25, 2026
Merged

myabc merged 1 commit into
devfrom
bug/op-20322-border-box-table-mobile-overflow

Conversation

@myabc

@myabc myabc commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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. A 1fr track has an auto minimum, so the nowrap name cell grew to its content and pushed the action column off screen. The mobile track is now minmax(0, 1fr) auto, matching the minmax(0, 1fr) tracks the desktop layout already uses; the cell's existing ellipsis column 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_viewport matcher (a plain visible check 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.

Statuses at 400 px, before and after

Desktop unchanged at 1280 px:

Statuses at 1280 px, before and after

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

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@github-actions

Copy link
Copy Markdown
1 Warning
⚠️ @opf/dream-team Files in app/components/op_primer were modified:

  • app/components/op_primer/border_box_table_component.sass

Please review these changes to ensure they align with the design system guidelines.

Generated by 🚫 Danger

@github-actions github-actions Bot added the ai: Directed 🪄 A human specified the requirements and AI implemented most of it; They validated via testing. label Sep 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./modules/team_planner/spec/features/team_planner_overview_spec.rb[1:4:4:1]
  • rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]
  • rspec ./spec/features/projects/creation_wizard/wizard_from_template_flow_spec.rb[1:1]
🤖 Ask Copilot to investigate

Copy 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.

@copilot The following spec(s) are flaky in CI (first seen on PR #25581, linked for reference only):

- `rspec ./modules/team_planner/spec/features/team_planner_overview_spec.rb[1:4:4:1]`
- `rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]`
- `rspec ./spec/features/projects/creation_wizard/wizard_from_template_flow_spec.rb[1:1]`

Treat this as a standalone task, unrelated to PR #25581. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25581 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@myabc myabc mentioned this pull request Sep 24, 2026
1 of 3 tasks
@myabc
myabc force-pushed the bug/op-20322-border-box-table-mobile-overflow branch 2 times, most recently from 9574d30 to aa7317d Compare September 24, 2026 16:22
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
@myabc
myabc force-pushed the bug/op-20322-border-box-table-mobile-overflow branch from aa7317d to 915616b Compare September 24, 2026 16:25
@myabc
myabc marked this pull request as ready for review September 24, 2026 16:32
@github-actions

Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/admin/custom_fields/work_packages/hierarchy_spec.rb[1:1]
  • rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]
🤖 Ask Copilot to investigate

Copy 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.

@copilot The following spec(s) are flaky in CI (first seen on PR #25581, linked for reference only):

- `rspec ./spec/features/admin/custom_fields/work_packages/hierarchy_spec.rb[1:1]`
- `rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]`

Treat this as a standalone task, unrelated to PR #25581. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25581 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@myabc myabc added this to the 18.0.x milestone Sep 24, 2026
@myabc
myabc merged commit f621c71 into dev Sep 25, 2026
21 checks passed
@myabc
myabc deleted the bug/op-20322-border-box-table-mobile-overflow branch September 25, 2026 07:55
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ai: Directed 🪄 A human specified the requirements and AI implemented most of it; They validated via testing. bugfix needs review

Development

Successfully merging this pull request may close these issues.

3 participants