Skip to content

Multiple messages in the SnackBar#7577

Closed
EduRibeiro00 wants to merge 2 commits into
JabRef:mainfrom
EduRibeiro00:mult-msg-snackbar-fix
Closed

Multiple messages in the SnackBar#7577
EduRibeiro00 wants to merge 2 commits into
JabRef:mainfrom
EduRibeiro00:mult-msg-snackbar-fix

Conversation

@EduRibeiro00

@EduRibeiro00 EduRibeiro00 commented Mar 27, 2021

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@EduRibeiro00

Copy link
Copy Markdown
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

koppor commented Aug 29, 2021

Copy link
Copy Markdown
Member

@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

EduRibeiro00 commented Aug 31, 2021

Copy link
Copy Markdown
Author

@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

koppor commented Nov 14, 2021

Copy link
Copy Markdown
Member

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