Skip to content

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

Open
Rello wants to merge 29 commits intomainfrom
codex/implement-persistent-layout-modes-in-nextcloud-tables
Open

🖼️ Add persistent per-view layout modes (table / tiles / gallery)#2407
Rello wants to merge 29 commits intomainfrom
codex/implement-persistent-layout-modes-in-nextcloud-tables

Conversation

@Rello
Copy link
Copy Markdown
Contributor

@Rello Rello commented Mar 18, 2026

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

Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
@Rello Rello linked an issue Mar 18, 2026 that may be closed by this pull request
@Rello
Copy link
Copy Markdown
Contributor Author

Rello commented Mar 18, 2026

@jancborchardt as new layouts will be relevant for your opinion

Copy link
Copy Markdown
Member

@jancborchardt jancborchardt left a comment

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 added 7 commits March 19, 2026 21:11
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Refactor layout handling and improve preview URL generation logic.

Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
@Rello
Copy link
Copy Markdown
Contributor Author

Rello commented Mar 19, 2026

@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 added 3 commits April 13, 2026 09:29
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
@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 added 3 commits April 13, 2026 12:02
Signed-off-by: Rello <Rello@users.noreply.github.com>
Added 'layout' property with type and enum options.

Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
@Rello Rello requested a review from jancborchardt April 13, 2026 10:47
Rello added 2 commits April 13, 2026 14:10
Signed-off-by: Rello <Rello@users.noreply.github.com>
Updated layout property documentation to include default value and options.

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

This comment was marked as outdated.

@Rello

This comment was marked as resolved.

Rello added 12 commits April 13, 2026 22:49
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
'notnull' => false,
'unsigned' => false,
]);
}
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.

@Rello
I’m planning to introduce a Kanban layout, which will also require additional columns. This led me to consider an alternative approach: instead of continuously adding new dedicated columns for each feature, we could introduce a single settings column (stored as JSON text).

This settings field would encapsulate various configuration attributes, allowing us to store extensible metadata without inflating the schema.

I see this as a more scalable and maintainable solution, as it avoids excessive schema growth and simplifies future migrations.

Example:

settings =
{
layout: ...,
card_background_source: ...,
card_title_source: ...,
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi,

thats a good idea. But I would keep the dedicated layout column for performance. there, your kanban would then also go in. but to derive the pure layout of a view (where table might be the standard) it would be overhead to parse the settings json every time

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.

Hi.
Are you planning to replace the card_background_source and card_title_source columns with a single settings (JSON) column, or should I try to push that change into your PR?

Copy link
Copy Markdown
Contributor

@enjeck enjeck left a comment

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

<div class="layout-source-settings">
<div class="layout-source-settings__item">
<div class="layout-source-settings__label">
{{ t('tables', 'Background source') }}
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.

What happens if this column is deleted after being set as the background source?

<div class="layout-source-settings__label">
{{ t('tables', 'Background source') }}
</div>
<NcSelect
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.

If a column isn't selected to be accessible in the view, it shouldn't be shown as the background or title source:

Image

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.

both in the frontend and validated in the backend too.

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

Projects

Status: 🏗️ At engineering

Development

Successfully merging this pull request may close these issues.

Add view mode: Tiles

6 participants