Skip to content

[6.x] Add Info fieldtype - #15368

Merged
jasonvarga merged 7 commits into
6.xfrom
info-fieldtype
Sep 11, 2026
Merged

[6.x] Add Info fieldtype#15368
jasonvarga merged 7 commits into
6.xfrom
info-fieldtype

Conversation

@joshuablum

@joshuablum joshuablum commented Sep 4, 2026

Copy link
Copy Markdown
Member

Adds a non-data Info fieldtype for displaying visual guidance in Control Panel publish forms. It supports sanitized Markdown, built-in icon selection, and five states:

  • Notice (gray)
  • Tip (blue)
  • Warning (yellow)
  • Important Warning (red)
  • Success (green)
image image image

Closes statamic/ideas#1359.

@joshuablum joshuablum changed the title Add Info fieldtype [6.x] Add Info fieldtype Sep 4, 2026
@joshuablum
joshuablum marked this pull request as draft September 4, 2026 15:07
Base automatically changed from alert-tip-variant to 6.x September 7, 2026 18:12
@jasonvarga

Copy link
Copy Markdown
Member

@joshuablum I merged the other PR in this stack. Since this one is still in a draft, I unstacked it, and updated it for 6.x. It's standalone now ready for you to continue when you want.

@joshuablum
joshuablum marked this pull request as ready for review September 9, 2026 13:21
@jasonvarga

Copy link
Copy Markdown
Member

I wonder if we should call this "Alert" since it's really just a wrapper around the UI component already named Alert.

And maybe change the state config field to variant to match the prop.

@jackmcdade ?

@jackmcdade

Copy link
Copy Markdown
Member

I think "info" still makes more sense because that's how you'd use it - vs an "alert" which feels like describing a pop-up when in this user context.

@jasonvarga jasonvarga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that you named a field alert_icon just because icon was sorta reserved and getting wiped out. Instead of this workaround, I'm gonna resolve it in a separate PR. Then we can go back to using icon in here.

Also the naming I brought up earlier is fine based on what Jack said 👍

Comment thread resources/js/components/fieldtypes/InfoFieldtype.vue Outdated
jasonvarga and others added 2 commits September 11, 2026 10:03
The handle was "alert_icon" to work around the blueprint builder
clobbering and stripping a config field named "icon". That's fixed in
core now, so the field can use the name people will reach for first.

Drops the test that guarded the workaround. FieldTransformerTest covers
the round trip generically.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jasonvarga

Copy link
Copy Markdown
Member

I updated this PR to handle icon but I'll leave the aria stuff to you.

@jasonvarga
jasonvarga merged commit e2cc368 into 6.x Sep 11, 2026
64 checks passed
@jasonvarga
jasonvarga deleted the info-fieldtype branch September 11, 2026 15:55
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.

Implement an "Instruction" or "Tip" fieldtype for a more prominent authoring notice

3 participants