Skip to content

feat: add optional widget header info icon - #25

Merged
aferd merged 2 commits into
patternfly:mainfrom
kdoberst:Add-info-option
Dec 3, 2026
Merged

aferd merged 2 commits into
patternfly:mainfrom
kdoberst:Add-info-option

Conversation

@kdoberst

Copy link
Copy Markdown
Contributor

Summary

Widgets can contain complex information—for example usage stats on a data dashboard. New users may need more background on what a widget contains and/or where the data comes from. Today there isn’t a straightforward pattern to add “more info” that covers the entire widget.

This PR adds an optional config.info on the widget configuration. When present, an info icon is shown in the widget header; clicking it opens a popover by default, or a modal when the content is larger (variant: 'modal'). If info is not configured, the icon is not shown.

Screenshot

Screenshot 2026-09-18 at 1 20 43 PM

Changes

  • Add WidgetInfo and optional info on WidgetConfiguration
  • Render a header info action in GridTile (popover or modal)
  • Document usage in README and docs examples
  • Cover behavior with GridTile tests

Assisted-by: Cursor

Allow widgets to show clickable header help via config.info, opening a popover by default or a modal for longer content.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kdoberst

kdoberst commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@wise-king-sullyman @andrew-ronaldson Can we get some eyes on this?

@andrew-ronaldson andrew-ronaldson left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A couple spacing updates for the widget headers. I can't tell from the screenshots but I think the spacing between the icon and the header text could be reduced. Also in the header I think the three icon buttons could be group closer together. These changes will give a small amount of space back for larger titles.

@kdoberst

kdoberst commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated widget header action spacing.

  • Reduced controls from 37x37 to 24×24 clickable targets. This makes the icons appear to be closer together
  • Centered each icon horizontally and vertically within its target.
  • Reused PatternFly plain action styling and the semantic action-to-action gap token instead of hard-coded dimensions.
  • Verified the live layout, focused tests, lint, and diff checks.
Screenshot 2026-11-11 at 2 26 05 PM

@andrew-ronaldson Please re-review

@wise-king-sullyman wise-king-sullyman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks!

@aferd
aferd merged commit b46a19d into patternfly:main Dec 3, 2026
3 checks passed
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.

4 participants