Skip to content

Feature: Add LayoutHeaderField to support headers in Layout Grids #4548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

heath-freenome
Copy link
Member

@heath-freenome heath-freenome commented Apr 4, 2025

Reasons for making this change

Sometimes people will want a header for a section in a LayoutGridField and this provides support for it

  • Added a new LayoutHeaderField to the list of fields in core that simply renders a TitleFieldTemplate
    • Added 100% RTL tests for the component
  • Updated the layoutGrid example in the playground to add an example of using it
  • Updated the shadcn GridTemplate to remove some hard-coded styling that made the LayoutHeaderField usage look really bad
    • Updated the layoutGrid to add the additional styling to make the example still work for shadcn
  • Updated the CHANGELOG_v6.md and custom-widgets-fields.md to document the new fields

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature
Screen.Recording.2025-04-04.at.9.43.04.AM.mov

Sometimes people will want a header for a section in a `LayoutGridField` and this provides support for it
- Added a new `LayoutHeaderField` to the list of fields in `core` that simply renders a `TitleFieldTemplate`
  - Added 100% RTL tests for the component
- Updated the `layoutGrid` example in the `playground` to add an example of using it
- Updated the `shadcn` `GridTemplate` to remove some hard-coded styling that made the `LayoutHeaderField` usage look really bad
  - Updated the `layoutGrid` to add the additional styling to make the example still work for `shadcn`
- Updated the `CHANGELOG_v6.md` and `custom-widgets-fields.md` to document the new fields
@heath-freenome heath-freenome requested a review from nickgros April 4, 2025 16:39
@heath-freenome heath-freenome merged commit dc91565 into rjsf-v6 Apr 4, 2025
4 checks passed
@heath-freenome heath-freenome deleted the add-LayoutGridHeader branch April 4, 2025 17:19
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