[OpenNMS/opennms] e34f60: NMS-20162: Make tooltip a first-class prop on Onms...
Scott Theleman via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/jira/NMS-20160-search-input-etc/[email protected]> |
Branch: refs/heads/jira/NMS-20160-search-input-etc
Home: https://github.com/OpenNMS/opennms
Commit: e34f6052db2d384b4e30be12cf558947b3673f2c
https://github.com/OpenNMS/opennms/commit/e34f6052db2d384b4e30be12cf558947b3673f2c
Author: Scott Theleman <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M ui/CLAUDE.md
M ui/packages/onms-ui/README.md
M ui/packages/onms-ui/src/components/OnmsIconButton.vue
M ui/packages/onms-ui/src/directives/OnmsTooltip.ts
M ui/src/components/AdhocGraphs/AdhocChartToolbar.vue
M ui/src/components/Configuration/ConfigurationAdvancedPanel.vue
M ui/src/components/Configuration/ConfigurationCopyPasteDisplay.vue
M ui/src/components/Configuration/ConfigurationTable.vue
M ui/src/components/Configuration/ProvisionDForm.vue
M ui/src/components/Device/DCBModalConfigDiffContent.vue
M ui/src/components/Device/DCBModalViewHistoryContent.vue
M ui/src/components/FileEditor/FileSidebar.vue
M ui/src/components/SCV/ScvInputIcon.vue
M ui/tests/onms-ui/OnmsIconButton.test.ts
M ui/tests/onms-ui/OnmsTooltip.test.ts
Log Message:
-----------
NMS-20162: Make tooltip a first-class prop on OnmsIconButton
Icon buttons declared their tooltip by leaning on directive fallthrough
(`v-onms-tooltip` on the component, forwarded to its root element). It is now
a prop:
<OnmsIconButton :icon="Delete" tooltip="Delete" />
and the 22 icon-button call sites across the Adhoc graph toolbar, the
Configuration screens, the DCB modals, the file-editor sidebar and
ScvInputIcon use it. The directive stays for every other host — plain
elements, OnmsIcon, OnmsChip — and for positioning modifiers, which have no
prop equivalent.
When `tooltip` is set the native `title` attribute is dropped, so the
browser's own tooltip no longer duplicates the rich one; `title` still names
the button for assistive tech, and a tooltip-only button is named from the
tooltip text. Where the two carried identical strings (most of the Adhoc
toolbar) the redundant `title` is gone.
Rolling this up exposed a pre-existing bug that made every tooltip in the app
paint at the wrong z-index, so OnmsTooltip is now a thin wrapper rather than a
bare re-export. PrimeVue captures the configured tooltip z-index only in
beforeMount, and only from `binding.instance.$primevue` — the one place the
directive touches binding.instance. Vue fills that in with
getComponentPublicInstance(), which returns the host's *exposeProxy* whenever
the component has called expose() — which the <script setup> compiler output
always does. That proxy resolves Vue's own $-properties but not app
globalProperties, so $primevue came back undefined everywhere, nothing was
captured, and the ZIndex util fell back to ~1000: tooltips painted behind the
fixed menubar (1030) and the side-menu rail (2000) rather than at the
zIndex.tooltip of 2100 that theme/primevue-setup.ts has always asked for. That
reads as "hovering doesn't open the tooltip", which is how NMS-20201 saw it.
The wrapper hands beforeMount an instance that can resolve $primevue off the
vnode's app context — the same fallback PrimeVue's own
BaseDirective._getConfig uses for the rest of its config, which is why
everything except the z-index worked. Verified in a browser: an Adhoc toolbar
tooltip now renders at 2101 over the 1030 header.
OnmsIconButton keys its Button on whether a tooltip is present, so a tooltip
that arrives after mount still goes through beforeMount and gets its z-index
(PrimeVue's updated hook re-binds the events but never re-captures it). Both
new behaviors have regression tests that fail without the fixes.
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs