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

Multiple messages in the SnackBar #7577

Closed
wants to merge 2 commits into from

Conversation

EduRibeiro00
Copy link

@EduRibeiro00 EduRibeiro00 commented Mar 27, 2021

Previously, the SnackBar component could only display one message at a time, and messages that were created quickly were displayed in sequence and became obsolete because there was a more recent message waiting to be displayed.
The changes made allow for the SnackBar to display multiple messages in the same component, each in a different line.

Image

Changes that are still to be made in this PR:

  • Increase/Reset SnackBar timeout when a new message is added
  • Add a maximum limit for the number of messages displayed at the same time in the SnackBar
  • Gradually remove old messages from the SnackBar as they timeout

Fixes #7340.


  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@EduRibeiro00 EduRibeiro00 changed the title Multiple messages are displayed in SnackBar (#7340) Multiple messages in the SnackBar Mar 27, 2021
@EduRibeiro00
Copy link
Author

I'm having difficulties in finding a way to increase or reset the toast display timeout, so the new messages added to the SnackBar can be displayed the right amount of time. There seems to be no way of modifying the timeout of an already displaying event... I've tried closing the SnackBar and firing another event with the new messages, but that leads to weird closing and opening animations.

@tobiasdiez
Copy link
Member

A quick and dirty way would be to resubmit the previous event before submitting the combined event. According to
https://github.com/sshahine/JFoenix/blob/2dbb8515da236140c41eabe22eb549b458f1e867/jfoenix/src/main/java/com/jfoenix/controls/JFXSnackbar.java#L312-L317
this should reset the timer. Another approach would be to use reflection to get the pauseTransition and call playFromStart on it.

@Siedlerchr
Copy link
Member

What's the status here? Would be nice if you could continue working on this!

@EduRibeiro00
Copy link
Author

What's the status here? Would be nice if you could continue working on this!

Sorry for being inactive! I have been a little busy but I will be able to continue this issue in a few days.

@koppor
Copy link
Member

koppor commented Aug 29, 2021

@EduRibeiro00 I found this PR while cleaning up the mass of opened tabs in my Firefox. May I ask whether you could find some time these days? We are having JabCon and could provide fast feedback.

@EduRibeiro00
Copy link
Author

EduRibeiro00 commented Aug 31, 2021

@EduRibeiro00 I found this PR while cleaning up the mass of opened tabs in my Firefox. May I ask whether you could find some time these days? We are having JabCon and could provide fast feedback.

Hello. Unfortunately I cannot make this a priority in the next coming months, so I suggest moving this issue to another person. Sorry :/

@koppor
Copy link
Member

koppor commented Nov 14, 2021

Closing this issue due to inactivity 💤

Please ping us if you intend to resume work on this one.

@koppor koppor closed this Nov 14, 2021
@yogeshvar yogeshvar mentioned this pull request Apr 28, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple messages in the SnackBar
4 participants