New type of group: columns

Created on 30 June 2018, over 6 years ago
Updated 16 November 2024, 3 months ago

When editing a node, you sometimes have numerous small fields that don't take a lot of space (especially horizontally). Displaying them one above the other is a bit inefficient because it leaves a lot of empty space to the right of them, especially if you have a wide screen.

So it could be really interesting to have a new type of field group, allowing to display groups of fields side by side. This would work a lot like the "tabs" group: first you define a container (columns), and then one or more child elements (column). The only difference would be that instead of being displayed in tabs (where only one child group is visible at a time), all child groups (columns) would be visible at the same time, side by side (horizontally). If there's not enough horizontal space to display all columns side by side, the right-most columns would simply start a new line below (in order to avoid horizontal scrolling).

Wide screen:
A B C D

Medium screen:
A B
C D

Small screen:
A
B
C
D

I think this would be especially interesting in the node edition page (because it's more difficult to change de styling of this page), but it could also open interesting possibilities for the normal display page of a node.

Attached: a very simple example of what could be possible with columns.

Feature request
Status

Closed: works as designed

Version

3.0

Component

Miscellaneous

Created by

🇨🇭Switzerland s427

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇰Denmark ressa Copenhagen

    I found this issue looking for a way to show Field Groups in multiple columns, which is more simple than what is requested here, but I'll share my solution, in case anyone else ends up here, looking for the same.

    I needed to show multiple Field Groups in two columns, to be used as Leaflet Pop Up source, and in my case it was pretty simple:

    1. Create two new Field Groups of type "HTML Element", with class muni_col1 and muni_col2
    2. Drag the existing Field Groups under these two new Field Groups, so that they were now the top level Field Groups
    3. Add a little CSS

    This resulted in a structure like this:

    <div class="leaflet-popup-content">
      <div class="node__content">
        <div class="muni_col1">
          <div class="field-group">
            <h3>Column #1</h3>
          </div>
          <div class="field-group">
            <h3>Column #2</h3>
          </div>
        </div>
        <div class="muni_col2">
          <div class="field-group">
            <h3>Column #3</h3>
          </div>
          <div class="field-group">
            <h3>Column #4</h3>
          </div>
        </div>
      </div>
    </div>

    The CSS:

    /* split up in two columns with Field group */
    .leaflet-popup-content .node__content {
      display: flex;
    }
    .leaflet-popup-content .muni_col1,
    .leaflet-popup-content .muni_col2 {
      width: 100%;
    }
    

    You can see it here, by clicking on an area of the map: https://arst.dk/kort

Production build 0.71.5 2024