Skip to main content

react-tooltip-check

Scratch validation app (NOT part of the shipped packages). It renders the UI5 Web Components tooltip under plain React 18 to confirm the tooltip works framework-agnostically.

What it renders​

  1. Raw three-part markup — a native <button data-ui5-has-tooltip="t1" aria-describedby="t1"> with a sibling <ui5-tooltip id="t1">.
  2. Consuming component — an icon-only <ui5-button icon="edit" tooltip="Edit item">, whose tooltip now renders inside its root button.

How the UI5 dependency is wired​

The @ui5/webcomponents* packages are not declared as npm dependencies of this app. This app lives inside the monorepo, and the repo root node_modules/@ui5/* already contains symlinks pointing at the built packages/*/dist. Bare specifiers such as @ui5/webcomponents/dist/Tooltip.js resolve through those symlinks — Vite (and Node) walk up to the repo root node_modules automatically.

vite.config.ts adds server.fs.allow: [<repo root>] so the dev server may serve the built package files that live outside this app directory.

This means the library must be built first (dist/ must exist). From the repo root:

yarn generate
yarn ts

Run​

cd docs/internal/react-tooltip-check
npm install
npm run dev

Dev server: http://localhost:5190 (fixed port via --strictPort).