fix(timeplanning): offset the pinned Name column only when the checkbox column renders - #8080
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
🟢 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 = falsealso satisfiesrowSelectable && !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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-dashboardpins 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 whenrowSelectableis true, and the plugin binds that toisFirstUser— 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!importantblocks 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 onsiteNamebeing the plugin's first declared column — a fact that lives in atableHeadersarray in another repo, with no way to pin it there (that repo's unit job iscontinue-on-error: true). The row-scoped:has()depends only on the condition being expressed.:has()already appears 11 times in this stylesheet and every.browserslistrctarget supports it.Comment corrections
Three, because a wrong comment is how this shipped:
left: 0is written by the CDK'sStickyStylerand mtx-grid — neither counts the checkbox column, because it is never marked[sticky];rowSelectable && !hideRowSelectionCheckbox;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, assertingleft: 0pxfor that user and60pxfor the first user. It must land after this merges: that workflow checks this repo out atref: 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