Skip to content

Support rich labels in SearchSuggestions#366

Merged
nilmerg merged 2 commits intomainfrom
feature/rich-suggestion-labels
Apr 17, 2026
Merged

Support rich labels in SearchSuggestions#366
nilmerg merged 2 commits intomainfrom
feature/rich-suggestion-labels

Conversation

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor

@BastianLedererIcinga BastianLedererIcinga commented Apr 10, 2026

Allow providers of SearchSuggestions to pass ValidHtml via the details key, which is rendered inside a button element.

resolve #364

Allow `ValidHtml` to be passed via the `label-html` key
which is then rendered inside a `button` element.

css selectors are adjusted to have increased specificity
because otherwise the button elements are styled by icingaweb2.
Comment thread asset/css/search-base.less
Comment thread src/FormElement/SearchSuggestions.php Outdated
@nilmerg nilmerg added the enhancement New feature or request label Apr 14, 2026
@nilmerg nilmerg modified the milestone: 0.14.0 Apr 14, 2026
Copy link
Copy Markdown
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

@raviks789 Please test this with your Director customvar changes, since you make heavy use of the TermInput there.

The location of .suggestions changed to outside the form now and accumulate there in case of multiple instances.

@nilmerg nilmerg requested a review from raviks789 April 14, 2026 12:35
@raviks789
Copy link
Copy Markdown
Contributor

raviks789 commented Apr 14, 2026

@nilmerg just did a simple test. The suggestions are not displayed for data lists with this branch. See the screen shots below:

main branch:
Screenshot 2026-04-14 at 16 17 30

feature/rich-suggestion-labels branch:
Screenshot 2026-04-14 at 16 11 14

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor Author

I could not think of a clever solution that fixes the problem with the fieldsets, but maybe Claude did:
Icinga/ipl-html@main...fieldset-on-register
It fixes the problem in the director as far as I tested it but I'm not sure if this is 100% reliable.

I left the comments it made for now so it's easier to evaluate if the approach makes sense at all, if we want to use it I'm going to clean it up.

@nilmerg
Copy link
Copy Markdown
Member

nilmerg commented Apr 16, 2026

I'm not sure whether this approach is correct. It looks promising, but it changes the timing of when fieldsets are assembled. Though, at least only for fieldsets. But I'd like to perform proper testing and right now there's not enough time for this. So please open a separate pull request for it and restore the .search-suggestions.search-suggestions approach here.

Copy link
Copy Markdown
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

See above.

@nilmerg nilmerg merged commit d430b0d into main Apr 17, 2026
14 checks passed
@nilmerg nilmerg deleted the feature/rich-suggestion-labels branch April 17, 2026 07:06
@nilmerg nilmerg removed the request for review from raviks789 April 17, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support rich labels in \ipl\Web\FormElement\SearchSuggestions

3 participants