Repository navigation
luci-base: form: move tooltip option from Flag to Value - #9121
Merged
Merged
Conversation
Until now only form.Flag supported the tooltip and tooltipicon options, and the tooltip was rendered inside the ui.Checkbox widget. Move both options to form.Value so that they are available for all option types, e.g. Value, ListValue, DynamicList or TextValue. The tooltip is rendered by the new renderTooltip() and added by renderFrame(). form.Flag inherits it and no longer passes the options to ui.Checkbox. The tooltip can be a string (formatted with the section ID), a function returning a string, or an array. The items of an array are separated by line breaks, which allows multi-line tooltips without embedding HTML. To always show the tooltip icon behind the widget, independent of whether the widget frame is a block or an inline element (e.g. text inputs, textareas and selects use plain block frames), the widget and the icon are wrapped into an inline-flex container if a tooltip is set. Options without a tooltip are not changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
1 task done
openwrt-ai
reviewed
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request details
Description
Until now only form.Flag supported the tooltip and tooltipicon options, and the tooltip was rendered inside the ui.Checkbox widget.
Move both options to form.Value so that they are available for all option types, e.g. Value, ListValue, DynamicList or TextValue. The tooltip is rendered by the new renderTooltip() and added by renderFrame(). form.Flag inherits it and no longer passes the options to ui.Checkbox.
The tooltip can be a string (formatted with the section ID), a function returning a string, or an array. The items of an array are separated by line breaks, which allows multi-line tooltips without embedding HTML.
To always show the tooltip icon behind the widget, independent of whether the widget frame is a block or an inline element (e.g. text inputs, textareas and selects use plain block frames), the widget and the icon are wrapped into an inline-flex container if a tooltip is set. Options without a tooltip are not changed.
Screenshot or video of changes (if applicable)
Note
This is a preparatory commit so that this can be used elsewhere as well.
Currently, this tooltip is only used on this page.
Tested on
OpenWrt version:
master
LuCI version:
master
Web browser(s):
firefox