Skip to content

Replace Naive UI popup primitives (dropdown / tooltip) #3015

@nighca

Description

@nighca

Background

As part of #3013, we scanned the current naive-ui dependency surface in spx-gui.

A major dependency cluster is the popup / overlay stack built on NPopover and NTooltip.

Current dependency points include:

  • src/components/ui/UIDropdown.ts
  • src/components/ui/UITooltip.vue
  • popup-related helpers in src/components/ui/utils/index.ts

Problem

Our popup primitives currently depend on naive-ui internals and already carry workaround logic:

  • UIDropdown is implemented on top of NPopover
  • it works around incorrect clickoutside behavior when the trigger itself is clicked
  • it queries DOM by generated wrapper class because there is no direct way to get the popover wrapper element
  • UITooltip depends on NTooltip
  • UITooltip manually adds the __popover__ flag to match naive-ui internal expectations
  • tooltip styling currently uses non-scoped global style because the component does not style cleanly through the wrapper
  • shared popup detection still depends on n-popover class names

This is exactly the kind of library-specific complexity we want to remove.

Goal

Replace the naive-ui popup primitives with internal implementations that fit XBuilder's requirements directly.

Scope

  • replace NPopover usage in UIDropdown
  • replace NTooltip usage in UITooltip
  • preserve current features such as placement, trigger modes, manual positioning, arrow support, popup container selection, and nested popup behavior
  • remove workaround logic tied to naive-ui clickoutside behavior and popover wrapper discovery
  • remove naive-ui-specific popup class assumptions from shared UI utilities

Notes

This issue is about dropdown / tooltip style popup primitives. Modal-specific work should be tracked separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions