Skip to content

[ChangelogVersions] Indicator motion not scoped and breaks with custom scroll containers #5256

@vachmara

Description

@vachmara

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.0.1

Reproduction

https://codesandbox.io/p/devbox/new-cloud-r8s3yz?workspaceId=ws_5DYg3LqMrjTKCvwSfjZf5g

Description

<UChangelogVersions> has two motion-related issues caused by improper useScroll targeting.

1. Motion applied to the entire page:

The motion animation (fade/translate) is applied globally to the window scroll instead of being scoped to the component container.

As a result, the entire page animates when scrolling, not just the changelog items.

2. Incorrect behavior inside custom scroll containers

When the component is rendered inside a scrollable container (not the main window), the motion does not track or trigger correctly.

Proposition:

Instead of just being a boolean, add the possibility to pass UseScrollOptions similar to indicatorMotion prop behavior :

/**
   * Display an indicator bar on the left.
   * @defaultValue true
   * @see https://motion.dev/docs/vue-use-scroll#api
   */
  indicator?: boolean | UseScrollOptions

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions