Skip to content

fix(timeplanning): offset the pinned Name column only when the checkbox column renders - #8080

Merged
renemadsen merged 1 commit into
stablefrom
fix/8069-locked-name-column-offset
Sep 17, 2026
Merged

renemadsen merged 1 commit into
stablefrom
fix/8069-locked-name-column-offset

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Fixes a live regression on stable, introduced by the interaction between #8068 (day-lock styles) and microting/eform-angular-timeplanning-plugin#1713 (which made the row-selection checkbox column first-user-only).

The bug

.time-dashboard pins mtx-grid's row-selection checkbox column and moves the pinned Name column right by its width. The checkbox column is conditional — mtx-grid renders it only when rowSelectable is true, and the plugin binds that to isFirstUser — but the offset was unconditional.

So for every user who is not the first user: no checkbox cell renders, yet Name is still forced to left: 60px !important, leaving a 60px strip at the left edge that horizontally-scrolled body cells slide through. The !important blocks any downstream rescue.

The fix

Scope the offset to rows that actually contain a checkbox cell. The first user's rendering is byte-for-byte unchanged; everyone else's Name column returns to the left edge.

:has() is used rather than adjacency because adjacency would additionally depend on siteName being the plugin's first declared column — a fact that lives in a tableHeaders array in another repo, with no way to pin it there (that repo's unit job is continue-on-error: true). The row-scoped :has() depends only on the condition being expressed. :has() already appears 11 times in this stylesheet and every .browserslistrc target supports it.

Comment corrections

Three, because a wrong comment is how this shipped:

  • the inline left: 0 is written by the CDK's StickyStyler and mtx-grid — neither counts the checkbox column, because it is never marked [sticky];
  • the checkbox column's condition is rowSelectable && !hideRowSelectionCheckbox;
  • the block header described the offset as unconditional, contradicting the rule below it.

Testing — please read

No test covers this, and none can today. This repo's browser tests have no plugin DOM to render against, and every spec in the plugin repo logs in as the first user, who does get the checkbox column. The plugin's unit bed never calls detectChanges() and asserts on template text, so it cannot see a cascade.

The regression test belongs in the plugin repo's Playwright shard s, seeded with a non-first user, asserting left: 0px for that user and 60px for the first user. It must land after this merges: that workflow checks this repo out at ref: stable, so the assertion would fail against the unfixed stylesheet until then.

Verified by static reading of the stylesheet, the plugin template and the mtx-grid/CDK sources. Not rendered — the local dev host still has the old stylesheet and a 12-day-stale plugin mirror, so a browser check there would not exercise the first-user path at all.

🤖 Generated with Claude Code

…ox column renders

The day-lock styles pinned mtx-grid's row-selection checkbox column and moved the
pinned Name column right by its width. The checkbox column is conditional -- the
plugin binds [rowSelectable] to isFirstUser -- but the offset was not, so every user
who is not the first user got a 60px strip at the left edge of the grid that
horizontally-scrolled cells slid through. The !important blocked any rescue.

Scope the offset to rows that actually contain a checkbox cell. The first user's
rendering is unchanged; everyone else's Name column returns to the left edge.

Also corrects the block's comments, which is how this shipped: the inline left:0 is
written by the CDK's StickyStyler as well as mtx-grid, neither of which counts the
checkbox column because it is never marked [sticky]; the checkbox column's condition
includes hideRowSelectionCheckbox; and the block header described the offset as
unconditional.

No test covers this. The host repo's browser tests have no plugin DOM to render
against, and every plugin spec logs in as the first user, who does get the checkbox
column. A regression test belongs in the plugin repo's Playwright shard, seeded with
a non-first user, and must land after this merges -- that CI checks the frontend out
at `stable`, so the assertion would fail against the unfixed stylesheet until then.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 17, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Only a minor comment wording nit remains; no approval-blocking issues were identified.

Pull request overview

Fixes time-planning grid sticky-column positioning for users without a rendered selection checkbox.

Changes:

  • Scopes the Name-column offset to checkbox-containing rows.
  • Clarifies sticky positioning and checkbox-rendering conditions.
File summaries
File Summary
eform-client/src/scss/styles.scss Applies the conditional sticky-column offset using :has(). Nit (1 vote): clarify the documented boolean condition.
Review details

Suppressed comments (1)

eform-client/src/scss/styles.scss:663

  • This wording is narrower than the condition it documents: a bound hideRowSelectionCheckbox = false also satisfies rowSelectable && !hideRowSelectionCheckbox, even though the property is set. Please state the actual boolean condition so this comment does not mislead future changes to the column-rendering logic.
     a checkbox cell. mtx-grid renders that column when rowSelectable is true and
     hideRowSelectionCheckbox is not set; the timeplanning plugin binds rowSelectable
     to isFirstUser, so every other user gets no checkbox cell. Offsetting regardless
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@renemadsen
renemadsen merged commit f5d9840 into stable Sep 17, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants