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
@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch from c4d0b61 to 91fba7f Compare December 23, 2025 17:38
@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch 2 times, most recently from ecf2915 to 20db336 Compare December 30, 2025 20:47
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.

Don't forget to update API Dumps after updating public apis. Run the 'apiChecks' task in the IDE for it :)

@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch from 20db336 to 259bd6b Compare January 6, 2026 23:16
Copy link
Collaborator

Choose a reason for hiding this comment

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

For references, this is a sample of breaking change. Note that the method signature changed (even when you've added a default parameter). For the JVM, that's a breaking change and will cause runtime issues.

When you keep the old method with "Deprecation Level Hidden", the old method becomes "synthetic" (therefore get's hidden from normal usages), but is still available for old compilations using that method.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Complementing this info: to ensure the deprecation flow was correctly applied, check the changes in the platform/jewel/int-ui/int-ui-standalone/api-dump.txt file

  • - sf:dark( -> - bsf:dark(

The only change was the addition of the b. The parameters remained the same.

Also, here is a list with all modifiers:

* - marked with @ApiStatus.Experimental.
b - synthetic (as in binary visible). Members with both ACC_SYNTHETIC and ACC_BRIDGE are not included in the dump.
p - protected. Nothing for public because it's the default. private and package-private members are not included.
s - static.
@ - annotation.
e - enum.
f - final.
a - abstract.
c - class. Nothing for interface because it should be the default.

@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch from 259bd6b to 779db91 Compare January 7, 2026 14:21
@wellingtoncosta wellingtoncosta force-pushed the wp/implement-popup-ad-text branch from 779db91 to 60a6e3f Compare January 7, 2026 14:48
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.

👏

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