Skip to content

[Feature Request]: Rethink what should happen if no animation was matched #38

@hirasso

Description

@hirasso

Describe the problem 🧐

Currently, the fallback for the case where a route matches no animation seems to be incoherent.

  • The readme says that a default "proceed immediately" animation will be used: "This is also the fallback animation in case no other matching animations were found."
  • The implementation seemingly uses the first defined animation instead as a fallback

Describe the propsed solution 😎

I'd like to

  • apply the default animation as mentioned in the docs as a fallback
  • warn the user that the fallback animation was used

Alternatives considered 🤔

I also thought about letting the user animate routes without a match in JS plugin via CSS – simple CSS animation for every page transition, except this one where I need more control. But I can imagine this would come with quite some complexity.

  • Is it possible to fallback to the default handler for animation:in:await and animation:out:await if no animation matched?
  • Is there a way to prevent CSS animations on the main transition-* class if there is a matching JS animation found?
  • .... surely some other things I can't think of right now

How important is this feature to you? 🧭

Nice to have

Checked all these? 📚

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