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

Fix notifications that overlap task bar #8775

Merged
merged 10 commits into from
May 15, 2022

Conversation

LIM0000
Copy link
Contributor

@LIM0000 LIM0000 commented May 9, 2022

Previous discussion for notification system that overlaps task bar: #8769

The new notification system works fine, but I am having the issue that the notifications overlap the task bar on Windows.

Proposal solution: Set owner of notification to Jabref window instead of whole screen

Fixes: #8769

.owner(JabRefGUI.getMainFrame().getScene().getWindow())

1 1

PR Checklist:

  • 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 developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@claell
Copy link
Contributor

claell commented May 10, 2022

@LIM0000 Isn't the task bar (of Windows, not of JabRef) in the screenshot still overlapped?

Maybe there was a misunderstanding, what #8769 is about (not the many notifications that fill the entire window, that is a coincidence, but the notification that does not stay inside the JabRef window, but is overlapping the Windows task bar).

The many notifications filling the entire window might also be of concern, though.

@LIM0000
Copy link
Contributor Author

LIM0000 commented May 10, 2022

Thank you @claell, I definitely misread the issue.
I will look into look a fix for the overlap.

@Siedlerchr
Copy link
Member

the NotificationPane comes from ControlsFX, maybe you find the issue somewhere in the code there https://github.com/controlsfx/controlsfx/

@LIM0000
Copy link
Contributor Author

LIM0000 commented May 10, 2022

I have pushed a solution for this issue by setting the owner of notification to Jabref window instead of whole screen.
Please let me know if I should include the notification threshold for this PR as well.
Thanks.

@claell
Copy link
Contributor

claell commented May 10, 2022

What does the notification threshold do exactly?

I assume this one: https://controlsfx.github.io/javadoc/11.1.1/org.controlsfx.controls/org/controlsfx/control/Notifications.html#threshold(int,org.controlsfx.control.Notifications)?

Would be interesting to see the behavior of it in action. Might feel a bit weird if there are first four notifications and if a fifth one comes up, they are all merged into one (if I understand the behavior correctly).

@LIM0000
Copy link
Contributor Author

LIM0000 commented May 10, 2022

@claell
It collapses all the notifications into one if it exceeds threshold limit.
For example, if threshold limit is set to 5, the sixth notification closes the previous 5 notifications immediately and turn into one which is the sixth notification.

@claell
Copy link
Contributor

claell commented May 10, 2022

That is what I thought. Does this offer a good experience? This probably doesn't happen often, so maybe not that important. I am only concerned that collapsing will lose information (in case different types of notifications are collapsed into one where you maybe cannot see the content of the individual ones anymore) or look weird.

@Siedlerchr Siedlerchr added the status: changes required Pull requests that are not yet complete label May 10, 2022
@LIM0000
Copy link
Contributor Author

LIM0000 commented May 10, 2022

Thanks for your review @Siedlerchr, they are really valuable to me!
I have applied those changes in the latest commit.
Cheers.

@yogeshvar
Copy link
Contributor

@claell
It collapses all the notifications into one if it exceeds threshold limit.
For example, if threshold limit is set to 5, the sixth notification closes the previous 5 notifications immediately and turn into one which is the sixth notification.

The reason for not using the threshold is that users might tend to miss out on the notification. Unless we have a tab/option to give all the notifications. It would be better not to collapse the notification. @Siedlerchr thoughts on this?

@ThiloteE
Copy link
Member

We have the event log. Can be found in the UI via Help > view event log
grafik

Maybe collaps, when there are too many popups, notify user somehow that it was collapsed and that the rest of the notifications can be found in the event log?

@claell
Copy link
Contributor

claell commented May 11, 2022

Might be a good way. There also seems to be a method for what to do when the user clicks the notification (which could open the event log in case of a collapsed notification): https://controlsfx.github.io/javadoc/11.1.1/org.controlsfx.controls/org/controlsfx/control/Notifications.html#onAction(javafx.event.EventHandler).

@Siedlerchr
Copy link
Member

@LIM0000 I would appreciate it if you could finish this soon with the suggested changes

@LIM0000
Copy link
Contributor Author

LIM0000 commented May 14, 2022

Thank you @Siedlerchr , I have added all required changes in the latest commit.

@Siedlerchr Siedlerchr marked this pull request as ready for review May 14, 2022 11:21
@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes required Pull requests that are not yet complete labels May 14, 2022
@Siedlerchr
Copy link
Member

LGTM! Thanks for the quick follow up!
grafik

@koppor
Copy link
Member

koppor commented May 15, 2022

I would like to see the last notification. Thus, I modified the text and code to appear as follows:

grafik

@ThiloteE
Copy link
Member

Another alternative wording: "Check the event log to see all notifications"

I would suggest to keep calling "notifications" and "messages" coherent. Either call them messages or call them notifications. Not both.

On a side note: would it be possible to make this a two liner (or maybe even a one liner)?

e.g.:

Last notification (Check the event log to see all notifications):

Nothing to undo.

* upstream/main:
  checkstye
  Default path for ssl key store is nested inside "JabRef" directory (JabRef#8796)
  Add log on disk (JabRef#8791)
  Squashed 'buildres/csl/csl-styles/' changes from 25512a5..649aac4
@Siedlerchr
Copy link
Member

Siedlerchr commented May 15, 2022

Adjusted based on @ThiloteE suggestiosn

grafik

@ThiloteE
Copy link
Member

Fair enough.

@Siedlerchr Siedlerchr merged commit c38d18b into JabRef:main May 15, 2022
Siedlerchr added a commit to Christina0114/jabref that referenced this pull request May 22, 2022
* upstream/main: (109 commits)
  Fix right clicking a group and choosing "remove selected entries from this group" leads to error when Bibtex source tab is selected (JabRef#8821)
  Fix single identifier cannot be opened on click (JabRef#8838)
  Add Pubmed/Medline Query Transformer (JabRef#8818)
  adjust and add testcases for FileAnnotationViewModel (JabRef#8830)
  Append config instead of replacing (JabRef#8834)
  Fix eclipse config (JabRef#8835)
  Add Nemo file manager (JabRef#8831)
  Fix missing clear action on pressing esc within the "Filter groups" field (JabRef#8829)
  Update bouncycalse to new base version (JabRef#8827)
  add: add test cases for FileUtil (JabRef#8810)
  Restrict use of standard streams (JabRef#8816)
  updated 8802 (JabRef#8817)
  Bump pascalgn/automerge-action from 0.15.2 to 0.15.3 (JabRef#8803)
  Bump jackson-dataformat-yaml from 2.13.2 to 2.13.3 (JabRef#8804)
  Bump icu4j-charset from 70.1 to 71.1 (JabRef#8805)
  Fix notifications that overlap task bar (JabRef#8775)
  checkstye
  Default path for ssl key store is nested inside "JabRef" directory (JabRef#8796)
  Add log on disk (JabRef#8791)
  Fix for JabRef#8788 JabRef not showing contents of shared database library (JabRef#8793)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: enhancement ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New notification system overlaps task bar on Windows
6 participants