Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Auto" feature #1

Open
johnholdun opened this issue May 10, 2019 · 3 comments
Open

"Auto" feature #1

johnholdun opened this issue May 10, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@johnholdun
Copy link
Contributor

Automatically interact with something after a specified duration, or when it comes into view. Useful for automatic data refreshes and infinite scroll.

  • What should this be called? "Autoclick" works for links and buttons but we should allow form submission as well. Maybe just "Auto?"
  • Should we consider time-based and visibility-based interactions to be two options of the same feature, or two different features?
@johnholdun johnholdun added the enhancement New feature or request label May 10, 2019
@snellingio
Copy link

Can see this being super useful for a "toast" or flash feature as well to remove it from the dom.

@weavermedia
Copy link

@snellingio Yeah, really like that idea. There is a Remove action already, would that be confusing?

Or maybe Remove could be extended to accept a delay value. If no delay value is provided it waits for a click (current behavior) but if delay is provided it removes on either a click or after the delay time 🤔

@johnholdun
Copy link
Contributor Author

Or maybe Remove could be extended to accept a delay value.

I think another way to handle this is to add this hypothetical "auto" directive to a button that also has a "remove" directive. This button could be displayed to the user as a dismiss option for the alert in case they want to dismiss it more quickly; if they don't, after the specified delay, the button would receive a click event, which then triggers the remove and removes the alert from the DOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants