fix(admin-cabinet): route field-info tooltips through TooltipBuilder#1069
Merged
Conversation
MailSettings, Storage and AsteriskManagers initialised popups directly
via $icon.popup({hoverable:true, ...}), missing `on: 'manual'`,
`click.popup-trigger` and `lastResort: true`. Symptoms:
- mail-settings: tooltips on toggle-checkbox icons did not show — the
Semantic UI .ui.toggle.checkbox label swallows pointer events.
- storage: clicking the s3_enabled tooltip icon toggled storage mode.
- asterisk-managers: tall eventfilter tooltip vanished on small viewports.
All three now delegate to TooltipBuilder.initialize() (matching
general-settings), inheriting manual click control, label-aware click
prevention and forced placement. Per-page click.tooltip-prevent dup in
mail-settings-modify.js dropped — global delegate in TooltipBuilder.js
already covers it.
docs/TOOLTIP_GUIDELINES.md rewritten to mandate TooltipBuilder.initialize()
and document why on:'manual' + lastResort:true are required.
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.
Summary
<label>s never showed (Semantic UI.ui.toggle.checkboxlabel swallows pointer events on the inner<i>).s3_enabledtooltip icon flipped the cloud-storage toggle.eventfiltertooltip vanished on small viewports because Fomantic couldn't fit any candidate position.Root cause was the same in all three pages: popups were initialised by raw
$icon.popup({hoverable:true, ...}), missingon: 'manual', the per-iconclick.popup-trigger, andlastResort: true. The canonical helperTooltipBuilder.initialize()— already used by General Settings, Extensions, Providers, IvrMenu, CallQueues, OutboundRoutes/IncomingRoutes, ApiKeys, Fail2Ban, OffWorkTimes, AsteriskRestUsers — wires all three up correctly.This PR refactors the three offenders to delegate to
TooltipBuilder.initialize(). The redundant per-pageclick.tooltip-preventhandler inmail-settings-modify.jsis dropped —TooltipBuilder.jsalready registers an equivalent delegatedclick.global-tooltipfor icons nested in<label>s.docs/TOOLTIP_GUIDELINES.mdis rewritten:TooltipBuilder.initialize(...));$icon.popup()directly for.field-info-icon;on: 'manual'andlastResort: trueare non-negotiable for icons nested in toggle/radio/checkbox labels.Files
sites/admin-cabinet/assets/js/src/MailSettings/mail-settings-tooltip-manager.jssites/admin-cabinet/assets/js/src/MailSettings/mail-settings-modify.jssites/admin-cabinet/assets/js/src/Storage/storage-index.jssites/admin-cabinet/assets/js/src/AsteriskManagers/manager-modify.jsdocs/TOOLTIP_GUIDELINES.mdsites/admin-cabinet/assets/js/pbx/...Storage's `setS3EndpointPresetNote()` (`storage-index.js:523`) continues to mutate the s3_endpoint tooltip via `popup('change content', ...)` — that call is a pure content update and is unaffected by switching the popup to `on: 'manual'`.
Test plan