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

Automatically dismiss alerts after some interval #213

Open
askvortsov1 opened this issue May 3, 2020 · 5 comments
Open

Automatically dismiss alerts after some interval #213

askvortsov1 opened this issue May 3, 2020 · 5 comments

Comments

@askvortsov1
Copy link
Member

Feature Request

Is your feature request related to a problem? Please describe.
Currently, alerts kinda hang around for a while.

Describe the solution you'd like
Add some logic to make alerts automatically fade away after awhile.

@clarkwinkelmann
Copy link
Member

In the Scratchpad extension, I manually implemented the auto-dismiss.

https://github.com/clarkwinkelmann/flarum-ext-scratchpad/blob/master/js/src/admin/components/ScratchpadEditor.js#L79

When the alert is an error however, I don't hide it.

Maybe we could do something similar, where a second option to the show() method is the timeout.

@stale
Copy link

stale bot commented Oct 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

@stale stale bot added the stale label Oct 26, 2020
@stale
Copy link

stale bot commented Jan 31, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

@stale stale bot added the stale label Jan 31, 2021
@askvortsov1
Copy link
Member Author

askvortsov1 commented Feb 1, 2021

This seems relatively simple to do: closeIn could be passed as an attr to ModalManagerState.show, and setTimeout to close the alert could be called with that time.

When the alert is an error however, I don't hide it.

I think this makes sense.

@stale stale bot removed the stale label Feb 1, 2021
@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

@stale stale bot added the stale label Jun 3, 2021
@askvortsov1 askvortsov1 transferred this issue from flarum/framework Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants