Skip to content

Ability to render confetti on page load #3

@erozas

Description

@erozas

Occasionally, we might need to render confetti outside a user-initiated click.

For example, we might want to render confetti after a user has checked out from an order flow which starts with a POST request to the /orders endpoint.

Currently, to achieve this, we can hijack a hidden link with a follow value set to “false” and display the confetti as we see fit.

This happens because the spray method expects a browser click event where we can obtain the event's clientX and clientY values.

We could modify the behavior to allow for the ability to render confetti on the connect method of the Stimulus controller.

As far as I know, we would have to modify the default behavior so we can render something without the need for a click event.

Do you think that's something that could be useful?

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