🖼️ Add persistent per-view layout modes (table / tiles / gallery)#2407
🖼️ Add persistent per-view layout modes (table / tiles / gallery)#2407
Conversation
Signed-off-by: Rello <Rello@users.noreply.github.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
|
@jancborchardt as new layouts will be relevant for your opinion |
jancborchardt
left a comment
There was a problem hiding this comment.
@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).
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>
|
@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 |
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>
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>
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>
This comment was marked as resolved.
This comment was marked as resolved.
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, | ||
| ]); | ||
| } |
There was a problem hiding this comment.
@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: ...,
}
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
enjeck
left a comment
There was a problem hiding this comment.
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.
| <div class="layout-source-settings"> | ||
| <div class="layout-source-settings__item"> | ||
| <div class="layout-source-settings__label"> | ||
| {{ t('tables', 'Background source') }} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
both in the frontend and validated in the backend too.

Motivation
Tileis only showing the picture plus its title from the 2nd column. Use case: Index pagesGalleryview is showing all additional columns from the current view. Use case: Product catalogue or inventorytable,tilesandgalleryand have that preference stored with the view.table).Implementation
Source data
Tile View
Gallery View
Settings modal
Sharepoint reference