[OpenNMS/opennms] 043711: NMS-20162: Capture the tooltip z-index for late va...

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: 04371169257e1f5aa8d37325300d8c473db7569c
      https://github.com/OpenNMS/opennms/commit/04371169257e1f5aa8d37325300d8c473db7569c
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-19 (Wed, 19 Aug 2026)

  Changed paths:
    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/Menu/Menubar.vue
    M ui/tests/onms-ui/OnmsIconButton.test.ts
    M ui/tests/onms-ui/OnmsTooltip.test.ts

  Log Message:
  -----------
  NMS-20162: Capture the tooltip z-index for late values, drop the remount

The wrapper only fixed half the upstream bug. PrimeVue's beforeMount returns
on an empty directive value before stamping $_ptooltipZIndex, and its
`updated` re-binds the events without ever setting it, so a tooltip whose
text arrives with data still fell back to ~1000 — behind the fixed menubar.
Resolving binding.instance covered literals only.

Stamp the resolved z-index after both beforeMount and updated. tooltipActions
reads the property at show time — ZIndex.set('tooltip', tooltipElement,
el.$_ptooltipZIndex) — not at bind time, so a late value needs no remount.

That retires the :key on OnmsIconButton's Button, which forced beforeMount to
re-run by replacing the DOM node and so dropped keyboard focus to <body> when
a tooltip appeared. It also retires Menubar's v-if as a z-index workaround;
the v-if stays because a date icon with no date is noise, and its comment now
says so instead of implying the tooltip depends on it.

Tests pin the late-value capture differentially against the raw PrimeVue
directive, and pin that the icon button keeps its element and its focus.


  Commit: ab1f26c4669c7a54751306ffc3c070707226228d
      https://github.com/OpenNMS/opennms/commit/ab1f26c4669c7a54751306ffc3c070707226228d
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-19 (Wed, 19 Aug 2026)

  Changed paths:
    M ui/packages/onms-ui/src/components/OnmsSearchInput.vue

  Log Message:
  -----------
  NMS-20160: Own the search field's icon size and its padding reservation

The menubar search glyph landed on top of the placeholder on the Vaadin
topology page, where the menu mounts inside the Vaadin app's own stylesheets.
PrimeVue declares the space for an IconField glyph as padding-inline-start
inside @layer primevue, so any unlayered legacy `padding` shorthand on `input`
beats it outright and the reservation disappears.

It was also sized wrong everywhere: PrimeVue derives it from --p-icon-size
(1rem) while primevue-overrides.scss renders these glyphs at 1.5rem app-wide,
leaving 0.25rem between glyph and text.

Drive the whole field from one number in the seam — leading glyph, clear
button, and the padding reserved for both — and re-assert the paddings
unlayered so legacy stylesheets can't drop them.


  Commit: c4073a3f66463f1588ae6633f11ebe9de5a0d250
      https://github.com/OpenNMS/opennms/commit/c4073a3f66463f1588ae6633f11ebe9de5a0d250
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-19 (Wed, 19 Aug 2026)

  Changed paths:
    M ui/src/components/Menu/SideMenu.vue
    M ui/src/styles/opennms-styles.scss
    M ui/tests/components/Menu/SideMenu.test.ts

  Log Message:
  -----------
  NMS-20160: Keep the expanded side menu clear of the Vaadin topology page

bootstrap.jsp emits #content only on its non-Vaadin branch, so on a Vaadin
page SideMenu's applyPush finds nothing to push and the expanded rail painted
over the map. vaadin-theme.scss offsets the topology app root with a static
margin sized for the collapsed rail — its own comment notes it "only moves it
past the collapsed side menu".

Publish the live rail offset as --onms-side-menu-offset on <html> and have
the menu bundle's legacy stylesheet track it there. Vaadin sizes its UI in
pixels from JS and re-measures only on window resize, so a changed offset also
dispatches one once the rail transition has settled.


  Commit: 2822d148a17b63acfbf333e9cfe197d2f311795a
      https://github.com/OpenNMS/opennms/commit/2822d148a17b63acfbf333e9cfe197d2f311795a
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-19 (Wed, 19 Aug 2026)

  Changed paths:
    M ui/packages/onms-ui/src/components/OnmsSearchInput.vue
    M ui/tests/onms-ui/OnmsSearchInput.test.ts

  Log Message:
  -----------
  NMS-20160: Make the search field's padding survive host page CSS

The previous attempt re-asserted the padding but at the same specificity the
legacy rule already beat. The scoped selector compiled to
`.p-inputtext[data-v-x]` — (0,2,0) — and on the Vaadin topology page the
menubar mounts inside `.v-app`, where a `.v-app input[type="text"]`-shaped
rule is (0,2,1) and wins. (The seam's input is type="text", and PrimeVue's own
padding is unreachable anyway: it ships inside @layer primevue, which any
unlayered author rule outranks.)

Nest the rules under .p-iconfield for (0,3,0) and mark the two paddings
!important, so the field's geometry no longer depends on what the embedding
page happens to ship. No call site sets padding on this input; the seam owns it.

Also guard the mechanism the whole re-assertion rests on: the scope attribute
reaching the <input> two component roots down. A wrapper or fragment root added
to OnmsInputText would silently stop every one of these rules matching.


Compare: https://github.com/OpenNMS/opennms/compare/9e4d30d74601...2822d148a17b

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.