Skip to content

Allow individual fields to configure their own display component#3808

Merged
sandbergja merged 2 commits intomainfrom
allow-custom-layout-component-class
Mar 16, 2026
Merged

Allow individual fields to configure their own display component#3808
sandbergja merged 2 commits intomainfrom
allow-custom-layout-component-class

Conversation

@sandbergja
Copy link
Copy Markdown
Contributor

The use case: for certain long fields, we would like to have a different layout that includes a "Show more"/"Show less" toggle.

This allows us to add the following to our catalog controller:

config.add_show_field 'contents_display', label: 'Contents', layout_component: DisplayMoreFieldLayoutComponent

The use case: for certain long fields, we would like to have a
different layout that includes a "Show more"/"Show less" toggle.

This allows us to add the following to our catalog controller:

```
config.add_show_field 'contents_display', label: 'Contents', layout_component: DisplayMoreFieldLayoutComponent
```
Copy link
Copy Markdown
Contributor

@maxkadel maxkadel left a comment

Choose a reason for hiding this comment

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

Ooooh, very cool! I like it!

Non-blocking question: I think the spec serves as good documentation, but I'm wondering if there's somewhere else we can document this? I can see lots of folks wanting to use this but having a hard time parsing exactly what their controller should look like - could we put something in maybe the catalog controller or similar to make this more visible?

@sandbergja sandbergja merged commit 5b5d78b into main Mar 16, 2026
12 checks passed
@sandbergja sandbergja deleted the allow-custom-layout-component-class branch March 16, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants