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 #7340

Closed
calixtus opened this issue Jan 14, 2021 · 8 comments · Fixed by #8733
Closed

Multiple messages in the SnackBar #7340

calixtus opened this issue Jan 14, 2021 · 8 comments · Fixed by #8733
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement ui

Comments

@calixtus
Copy link
Member

If JabRef has do display several messages very shortly after each other, the messages are stacked and played one after each other. This is confusing, since the SnackBar is still displaying a message, which is already obsolete. E.g. if you cycle quickly through the preview styles.

A simple solution would be to stack the messages inside an already showing SnackBar, separated by a new line and to lengthen the display time of the SnackBar for the time only the last message should show.

@calixtus calixtus added type: enhancement ui good first issue An issue intended for project-newcomers. Varies in difficulty. labels Jan 14, 2021
@HoussemNasri
Copy link
Member

Another solution would be to have multiple Snackbar views, every time we add a new Snackbar, all of the old Snackbars would move up, and the new one would BounceInUp, Unfortunately, this can't happen with the current Snackbar implementation (JFXSnackbar) because it uses only one view like shown in this code snippet :

private void show(SnackbarEvent event) {
content.getChildren().setAll(event.getContent());

Anyway, this is the method responsible for pushing Snackbars :

public void notify(String message) {

@EduRibeiro00
Copy link

@calixtus Since this is labelled as a good first issue, can I give it a try? If yes, and since I am new to this project, I would appreciate it if you could provide me with more information about this issue.

@calixtus
Copy link
Member Author

Hi @EduRibeiro00 , yes, give it a shot. Quick
Idea would be just to add the message to a message queue, each with a closing timer and display all the messages in a distinct line, add new messages at the end, remove outtimed messages at the beginning.
Please don't forget to familiarize yourself with our developer docs and to setup your workspace according to our guide.
https://devdocs.jabref.org/

@DS-654
Copy link

DS-654 commented Mar 23, 2021

Hi @calixtus, I would like to work on this issue, is it still open?

@calixtus
Copy link
Member Author

Since I haven't heard anything of @EduRibeiro00 anymore, why not? Good luck and happy coding. Remember to set up your workspace according to our contributors guide at devdocs.jabref.org - especially the codestyle stuff.

@EduRibeiro00
Copy link

Hello @DS-654 and @calixtus,

I apologize for the wait and for not giving any feedback. I am currently working on this issue and will hopefully make a PR soon. :)

@EduRibeiro00
Copy link

Hey again!

Just submitted a WIP PR for this issue. Any feedback is appreciated! Once again sorry for taking so long 😅

@yogeshvar
Copy link
Contributor

Hello, I would like to contribute to this. I will go through all the linked issues and PRs to understand the project base since I'm new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants