Skip to content

V3#1195

Merged
gilbarbara merged 100 commits intomainfrom
next
Mar 23, 2026
Merged

V3#1195
gilbarbara merged 100 commits intomainfrom
next

Conversation

@gilbarbara
Copy link
Copy Markdown
Owner

@gilbarbara gilbarbara commented Mar 20, 2026

Summary

V3 is a complete rewrite focused on modern React patterns, smaller bundle size, and a more intuitive API.

Highlights

  • useJoyride hook — replaces getHelpers with a proper hook returning controls, state, current step, failures, and event subscriptions
  • New event system — discriminated event types (tour:start, step:before, tooltip, etc.) with onEvent(data, controls) and selective subscription via on()
  • Step hooks — async before/after callbacks for per-step logic
  • Floating UI — replaced Popper.js/react-floater with direct @floating-ui/react-dom integration
  • Flexible targetsscrollTarget and spotlightTarget for independent positioning; targets accept RefObject, callbacks, and CSS selectors
  • SVG overlay — precise spotlight rendering replacing CSS box-shadow
  • Portal rendering — tour UI renders via React portal with custom container support
  • New component propsarrowComponent, loaderComponent
  • React 16.8–19 support
  • ~30% smaller bundle through dependency replacement

Breaking changes

  • Named export: import { Joyride } from 'react-joyride'
  • callback replaced by onEvent prop
  • run defaults to false
  • getHelpers replaced by useJoyride() hook
  • Step-level props consolidated into flat options (set globally or per-step)
  • styles.options theming moved to options prop
  • Button visibility via buttons array (['back', 'close', 'primary'])
  • Multiple prop renames (disableBeaconskipBeacon, disableCloseOnEscdismissKeyAction, floaterPropsfloatingOptions, etc.)
  • Removed: disableScrollParentFix, styles.spotlight, legacy overlay styles

Full migration guide: https://react-joyride.com/docs/migration
What's new: https://react-joyride.com/docs/new-in-v3


We'd love your feedback! If you run into issues, have questions about migrating, or want to share ideas, join the discussion: #1196

gilbarbara and others added 30 commits March 20, 2026 14:55
- update tsconfig "jsx" to react-jsx
- update tests
Co-authored-by: Gil Barbara <gilbarbara@gmail.com>
- fix lint errors
- add Vite config for local fixture development
- update test-utils
- create deepMerge in modules/helpers
- split useJoyrideData into useLifecycleEffect, usePropSync and useScrollEffect
- refactor Store to plain object state with frozen snapshots and subscribe
- reorder beacon inner and outer spans for correct rendering
- add sortObjectKeys to helpers
- add scrolling state to the store to coordinate scroll-aware rendering
- hide tooltip and spotlight during scroll transitions
- pre-scroll document to center custom scroll parents before scrolling within them
- fix scroll position calculation for elements in scroll containers
- move scroll decision earlier in the lifecycle (READY transition)
- update e2e specs and Playwright config
- reorganize snapshot directories from spec-name.spec.tsx/ to spec-name/
- fix hydration warning when tour is not running
- add useTargetPosition hook for the spotlight positioning
- automatically disable overlay clicks if spotlightClicks
- removes mousemove mechanism for spotlightClicks
- make it stable with useMemoDeepCompare
- step.target accepts RefObject<HTMLElement> and () => HTMLElement | null
- add polling in INIT lifecycle (targetWaitTimeout, loaderDelay)
- add Loader component + loaderComponent prop shown while waiting
- update Loader to be self-contained
- add tests for Beacon, Loader, Portal and Tooltip
- remove controlled tour test
- update custom-options test
- migrated from react-joyride-demo
- replace @playwright/experimental-ct-react with @playwright/test
- the step can set any "options" directly
- decouple waiting state from loaderDelay
- add beforeTimeout option
- remove codesandbox ci config
- rename BaseProps to SharedProps
- move it to types/props
- step:before_hook was being sent before tour:start
- accepts close (default), next and false
- rename closeAction to closeButtonAction
- rename overlayClickBehavior to overlayClickAction
- add "controls" to onEvent API
- replace all individual onEvent call
- add on(eventType, handler) to the hook return
- disableBeacon > skipBeacon
- disableOverlay > hideOverlay
- disableScroll > skipScroll
- disableTargetInteraction > blockTargetInteraction
- replace tsup with tsdown
- remove fix-cjs
- upgrade dependencies
- add ConfigPanel for live experimentation
- update e2e tests to hide the Header
- add docs/architecture.md
- add CLAUDE.md
@sonarqubecloud
Copy link
Copy Markdown

@gilbarbara gilbarbara merged commit 15054e0 into main Mar 23, 2026
8 checks passed
@gilbarbara gilbarbara deleted the next branch March 23, 2026 00:04
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.

3 participants