googlearchive / paper-toast

A lightweight feedback about an operation in a small popup at the base of the screen on mobile and at the lower left on desktop.
17 stars 8 forks source link

Add autoCloseDisabled attribute #15

Closed afandria closed 9 years ago

afandria commented 9 years ago

The autoCloseDisabled attribute from core-overlay should be exported by paper-toast. If set, toasts do not automatically disappear after interacting with other elements on the page. Toasts would still disappear if they are closed manually or after the proper timeout.

The original and default behaviors of paper-toast are unchanged with this pull request.

afandria commented 9 years ago

This change adds a new behavior to paper-toast that can enhance user experience. This behavior is similar to the toasts of applications like Google Keep and Inbox.

If a user performs several actions over time, a single toast may be dismissed too quickly for the user to read. autoCloseDisabled would avoid that problem.

Similarly, the user's actions may generate multiple toasts in the application. The current paper-toast behavior would only allow the most recent toast to render. However, autoCloseDisabled allows all relevant toasts be shown on-screen simultaneously. Admittedly, these multiple toasts would overlap if autoCloseDisabled is used naively, but the problem can be solved by simple css styling.

ebidel commented 9 years ago

Before this PR can be merged, please sign the CLA. See the CONTRIBUTING guide.

ebidel commented 9 years ago

@frankiefu PTAL

frankiefu commented 9 years ago

lgtm