Skip to content

📍Option to pin a column#2496

Merged
enjeck merged 10 commits into
mainfrom
feat/613/pinColumn
Apr 26, 2026
Merged

📍Option to pin a column#2496
enjeck merged 10 commits into
mainfrom
feat/613/pinColumn

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Apr 19, 2026

Copy link
Copy Markdown
Member

implements the column aspect of #613 - frontend-only (not persisted in the backend in any way - also currently not planned to, see below).

So this is not persisted in any way to keep the PR simple. Storing the info could be a follow-up, question would be the scope, general or per user while I think pinning is in most cases something temporary or general so I am unsure about a user option.
For general pinning it should then just happen via the dialog not in the tabular view itself I think.

  • The pinning works for table, view and application items/columns.
  • Pinning a column pins all columns to the left of it.
Pin Unpin
2026-04-19 17_47_37-Welcome to Nextcloud Tables! - Tables - Nextcloud — Mozilla Firefox 2026-04-19 18_04_39-Welcome to Nextcloud Tables! - Tables - Nextcloud — Mozilla Firefox

❓ Open Question

Should the pinned column be more visually marked as such, see below. Currently the column line is thicker, but that is the only way to spot the pinned column and of course it becomes apparent upon horizontal scrolling. Can't tell given that spreadsheets also don't visualize it, but the thought crossed my mind, so I wanted to bring it up. Below "Ease of use" is the pinned column (see the slightly thickened column line)

2026-04-19 18_01_47-Welcome to Nextcloud Tables! - Tables - Nextcloud — Mozilla Firefox

@AndyScherzinger AndyScherzinger added the enhancement New feature or request label Apr 19, 2026
@AndyScherzinger AndyScherzinger added design Related to the design 3. to review Waiting for reviews labels Apr 19, 2026
@AndyScherzinger AndyScherzinger changed the title Option to pin a column 📍Option to pin a column Apr 19, 2026

@enjeck enjeck 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.

I'll wait for designers to review first before I do

@AndyScherzinger

Copy link
Copy Markdown
Member Author

@enjeck designers, namely @marcoambrosini are fine with it 😃 👍

AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.114 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AI-assistant: Claude Code v2.1.119 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@enjeck enjeck force-pushed the feat/613/pinColumn branch from 0bd6aec to 499c770 Compare April 26, 2026 16:02

@enjeck enjeck 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.

works well, thanks. Just nitpicking:

box-shadow: inset -1px 0 0 var(--color-border-dark);
}

// Visual separator on the last frozen column � 2px overrides the 1px per-column border above.

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.

malformed character (�). Also, i don't think all the comments are helpful anyway

Comment on lines +32 to +45
* Returns a sticky-positioning style for a column within the frozen range, or null if it should scroll normally.
*
* columnWidths is an optional map of col.id → measured offsetWidth (px). When supplied it is used for the
* left-offset calculation so the offsets match the browser's actual auto-layout widths. Without it the
* calculation falls back to customSettings.width or DEFAULT_COLUMN_WIDTH.
*
* No explicit width is set on the frozen cell itself — the table's auto-layout already maintains the
* correct column width across all rows. Forcing a width here caused auto-sized columns to be narrowed
* to the DEFAULT_COLUMN_WIDTH fallback.
*
* Hidden columns are excluded from visibleColumns before this function is called, so pinnedColumnIndex
* naturally resolves to -1 when the pinned column is hidden, causing the freeze to silently disappear.
* This is intentional: when the pinned column is re-shown the freeze resumes automatically.
*/

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.

Comment is too long and not helpful, imo, could be removed

@AndyScherzinger

AndyScherzinger commented Apr 26, 2026

Copy link
Copy Markdown
Member Author

I'll take care of the comments @enjeck - thanks for the review 🙏

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger

Copy link
Copy Markdown
Member Author

@enjeck

  • review comments fixed - 35f47f5
  • replaced the filled icon with the outline variant - 240e936

@enjeck enjeck merged commit 4152a82 into main Apr 26, 2026
56 checks passed
@enjeck enjeck deleted the feat/613/pinColumn branch April 26, 2026 17:48
@AndyScherzinger AndyScherzinger added this to the v2.1.0 milestone Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted design Related to the design enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants