Skip to content

fix: remove Reakit peer conflict with React 18-tested tooltip - #60

Draft
mssteuer wants to merge 3 commits into
masterfrom
fix/react18-tooltip
Draft

fix: remove Reakit peer conflict with React 18-tested tooltip#60
mssteuer wants to merge 3 commits into
masterfrom
fix/react18-tooltip

Conversation

@mssteuer

@mssteuer mssteuer commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the only Reakit source consumer (Tooltip) with the real Ariakit tooltip store/anchor/popup APIs; remove Reakit and its peer-incompatible dependency tree.
  • Preserve public React peers (^18.3.0), child refs/events/name/existing description, null behavior, styling and contents; connect the previously ignored forwarded tooltip ref.
  • Test actual React/ReactDOM 18.3.1 in StrictMode and Chromium. Add a strict-peer, isolated npm-tarball consumer with a production Vite build and the same browser behavior suite.
  • Wire unit/browser/consumer tests into CI on Node 20.19.0 and 22.x, replacing unsupported Node 18 for Vite 7. No publish/deploy workflow changed.

Coordination with #42 — draft pending consolidation

I read the CLICK-908 diff and discussion before preparing this change. It overlaps this exact wrapper with a react-tooltip migration, but keeps Reakit in both package files, so it does not resolve the React 18 peer conflict as written. This draft is a peer-compatibility candidate using the closer successor APIs, not an unnoticed continuation of #42. Maintainers should choose/consolidate the approaches; do not merge both replacements independently. #42 and its branch are untouched.

Verification

  • npm ci --legacy-peer-deps=false --strict-peer-deps: passed; actual React/DOM 18.3.1; no Reakit packages.
  • npm test: 2 tests passed.
  • Rebuilt distribution + Chromium: 2 tests passed (hover/leave/hoverable content, keyboard and non-button anchors, accessible description, Escape retaining focus, normal Tab movement, refs/events, portal, opacity, padding/width and rich content).
  • npm run test:consumer: passed; real npm pack, isolated strict installation, no workspace symlink, production Vite bundle and 2 Chromium tests passed.
  • Build emits successfully. Standalone typecheck is NOT green: 16 SDK/activity-feed errors match untouched base 08e1b5c byte-for-byte.
  • Source-only diff whitespace check passed. Generated FormatJS template literals retain upstream trailing spaces.

Existing limitations / scope

  • Styled-components 5 has an independent fresh-resolution Babel-plugin/React-Native peer issue. Fixtures explicitly supply babel-plugin-styled-components 2.1.4, also needed as the existing Vite config's direct build dependency. This is documented, not a global peer override or claim to fix every upstream vulnerability.
  • Native Node ESM import (styled default interop) and UMD require (browser window) fail on both untouched base and candidate. This PR verifies the existing browser/Vite target, not SSR support.
  • Local npm audit still reports 22 findings in the library development tree; unrelated vulnerability remediation is not bundled here.

Release gate — no release triggered

Registry latest is 2.0.6; master already declares unpublished 2.0.7. After review/consolidation and merge, publish 2.0.7 (or next available patch) through the existing GitHub release-triggered workflow. Then update application lockfile resolutions to the registry release and rerun strict install/build/browser checks. CSPR.click UI 1.12.1 declares design ^2.0.6, so it accepts 2.0.7 without a separate UI release, subject to verifying the actual application's locked version.

Test instructions and caveats: tests/README.md.

Model: gpt-6-astra

Preserve trigger descriptions, refs, events and keyboard behavior. Add source unit and built-bundle browser regressions. Model: gpt-6-astra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants