Skip to content

Conversation

@wellingtoncosta
Copy link
Collaborator

@wellingtoncosta wellingtoncosta commented Dec 22, 2025

Summary

This PR introduces a new component called PopupAdText, which is designed to be used inside a popup container to give a more informative and/or helpful description to that menu. To apply that, a new parameter called adText was introduced to all public API of comboboxes, so no need to setup layout, spacing and stuff like that. This API is designed to be simpler as we have in AbstractPopup#setAdText method in the legacy Swing implementation.

Screenshot
image

Release notes

⚠️ Important Changes

  • Added the new PopupAdTextStyle to the JewelTheme and to the IntUiTheme
  • Introduced a new PopupAdText component

New features

  • Popups can now have a ad text in which can be used to add more description to a combobox options list or even give more context on such menu.

Note

Adds optional ad text to popups and combo boxes with full theming support.

  • New PopupAdText component and PopupAdTextStyle (colors/metrics/textStyle) with LocalPopupAdTextStyle and JewelTheme.popupAdTextStyle
  • PopupContainer now renders bottom adText; ComboBox, ListComboBox, and EditableListComboBox APIs gain optional adText plumbed through implementations
  • Theme integration: DefaultComponentStyling extended with popupAdTextStyle; IntUiTheme (light/dark) and Swing bridge provide style (readPopupAdTextStyle, standalone light()/dark())
  • Samples: showcase adds "Editable list combo box with ad text" example

Written by Cursor Bugbot for commit 91fba7f. This will update automatically on new commits. Configure here.

Copy link
Collaborator

@faogustavo faogustavo left a comment

Choose a reason for hiding this comment

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

I think that you are missing the LaF styles loading. Also, make sure to get values to match the theme.

For more details in the AdText styles, check the JBUI.CurrentTheme.Advertiser type. You can find its usage to use as baseline on this function public void setAdText(@NotNull @NlsContexts.PopupAdvertisement String s, int alignment)

@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch 2 times, most recently from 4356525 to c4d0b61 Compare December 23, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants