Skip to content

🖼️ Add persistent per-view layout modes (table / tiles / gallery)#2407

Open
Rello wants to merge 1 commit into
mainfrom
codex/implement-persistent-layout-modes-in-nextcloud-tables
Open

🖼️ Add persistent per-view layout modes (table / tiles / gallery)#2407
Rello wants to merge 1 commit into
mainfrom
codex/implement-persistent-layout-modes-in-nextcloud-tables

Conversation

@Rello

@Rello Rello commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Implement optional gallery and tile views, as available in SharePoint
  • Both views are using the first column to get the picture url for the preview
  • Tile is only showing the picture plus its title from the 2nd column. Use case: Index pages
  • Gallery view is showing all additional columns from the current view. Use case: Product catalogue or inventory
  • Provide persistent, per-view layout modes so users can choose between table, tiles and gallery and have that preference stored with the view.
  • Expose layout selection in the View settings modal and apply the persisted layout automatically when a view is opened, while keeping backward compatibility (missing/old values => table).

Implementation

Source data

Bildschirmfoto 2026-03-19 um 20 34 35

Tile View

Bildschirmfoto 2026-03-19 um 20 52 47

Gallery View

Bildschirmfoto 2026-03-19 um 20 53 05

Settings modal

Bildschirmfoto 2026-03-19 um 20 54 28

Sharepoint reference

565593259-fda68f2f-2a04-4ace-b1f9-fb2efbc6c77a-2

@Rello Rello requested review from blizzz and enjeck as code owners March 18, 2026 11:50
@Rello Rello linked an issue Mar 18, 2026 that may be closed by this pull request
@Rello

Rello commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@jancborchardt as new layouts will be relevant for your opinion

@jancborchardt jancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@marcoambrosini one for you, check it out. :)

@Rello do you have reference screenshots from Sharepoint as you mention?
List and Gallery view currently also look very similar (with Gallery in need of some design improvement).

@Rello Rello marked this pull request as draft March 19, 2026 15:16
@Rello

Rello commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

@marcoambrosini can you please have a look now? the PR was now implemented and tested on the branch and I added the actual screenshots from the working app

@Rello Rello marked this pull request as ready for review March 19, 2026 20:37
@jancborchardt jancborchardt moved this to 🏗️ At engineering in 🖍 Design team Mar 30, 2026
@AndyScherzinger AndyScherzinger added enhancement New feature or request 3. to review Waiting for reviews labels Apr 12, 2026
@Rello Rello changed the title Add persistent per-view layout modes (table / tiles / gallery) 🖼️ Add persistent per-view layout modes (table / tiles / gallery) Apr 13, 2026
@Rello Rello requested a review from jancborchardt April 13, 2026 10:47
marcoambrosini

This comment was marked as outdated.

@Rello

This comment was marked as resolved.

Comment thread lib/Migration/Version1000Date20260318000000.php

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

Just confirming that the state when there's no image is designer-approved? Here, for a tile view, I don't see why say "No image" instead of just text-based tiling like in https://media.geeksforgeeks.org/wp-content/uploads/20231218102144/Screenshot-2023-12-18-102058.png, for example.

Image

cc @marcoambrosini

Comment thread src/modules/modals/ViewSettings.vue
Comment thread src/modules/modals/ViewSettings.vue
@Rello Rello marked this pull request as draft April 28, 2026 08:37
@Rello

Rello commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 539a382 — brought in the pin-column feature from main alongside the card layout changes, with no conflicts remaining.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node node dist/index.js --exec install /home/REDACTED/.cache/node-gyp/20.20.2/deps/zlib -I /home/REDACTED/.cache/node-gyp/20.20.2/deps/v8/include -I ../../../../../nan --64 -o Release/obj.target/sshcrypto/src/binding.o --no�� rd (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Rello

Rello commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

Just confirming that the state when there's no image is designer-approved? Here, for a tile view, I don't see why say "No image" instead of just text-based tiling like in https://media.geeksforgeeks.org/wp-content/uploads/20231218102144/Screenshot-2023-12-18-102058.png, for example.
2BK1ZfxUS9CBdrnTws71-prkJ5-t8t_fhbs">
cc @marcoambrosini

@enjeck what do you mean by this? I am not sure if I understand. what would you show instead of the "no image"?

Signed-off-by: Rello <github@scherello.de>

Signed-off-by: Rello <Rello@users.noreply.github.com>

AI-assistant: Codex (GPT-5)
@Rello Rello force-pushed the codex/implement-persistent-layout-modes-in-nextcloud-tables branch from 31001dd to 253b902 Compare May 11, 2026 12:17
@Rello Rello marked this pull request as ready for review May 11, 2026 12:19

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 253b902313

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 251 to 255
array_merge($inputColumnsArray, [
'sort' => $newSort,
'filter' => $newFilter,
'layout' => $view['layout'] ?? null,
])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve and remap viewSettings during table import

When importing views in createFromScheme, the payload passed to ViewUpdateInput::fromInputArray() remaps columnSettings, sort, and filter, but drops viewSettings entirely. Because TablesView now includes viewSettings card source IDs, imported views lose their configured title/background sources (or keep stale IDs if later added elsewhere), so imported layouts are not faithfully restored.

Useful? React with 👍 / 👎.

Comment on lines +215 to +219
if (stored !== null && stored !== undefined) {
const exists = this.cardSourceOptions.some(opt => opt.id === stored)
if (exists) return stored
}
return this.cardSourceOptions[0]?.id ?? null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Persist fallback card source IDs before submitting view updates

This getter returns a fallback column ID for display when the stored cardBackgroundSource is no longer in cardSourceOptions, but it does not write that fallback back to mutableView.viewSettings. If a user removes the previously selected source column and saves without manually reselecting, the request still sends the stale ID, and backend validation rejects the update with an invalid card source column error.

Useful? React with 👍 / 👎.

@jancborchardt jancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Rello As @enjeck says, it is indeed weird to show "No image", especially as it underlays the text.

Instead, it would be better to show nothing as @enjeck proposed and just focus on the text.

FYI @marcoambrosini

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 codex enhancement New feature or request

Projects

Status: 🏗️ At engineering

Development

Successfully merging this pull request may close these issues.

Add view mode: Tiles

7 participants