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

Options should be inactive or show Error or Information Box #4795

Closed
atulim opened this issue Mar 21, 2019 · 9 comments · Fixed by #4872 or #8342
Closed

Options should be inactive or show Error or Information Box #4795

atulim opened this issue Mar 21, 2019 · 9 comments · Fixed by #4872 or #8342
Labels

Comments

@atulim
Copy link
Contributor

atulim commented Mar 21, 2019

JabRef version 5.0

I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists-
Steps to reproduce the behavior:

(1) Open JabRef 5.0 and go to Tools option.
(2) Click on the link 'Push entries to external application(TeXstudio)' which comes as active.
(3) Nothing happens.

Actual behavior: Nothing happens on clicking 'Push entries to external application(TeXstudio)' option.

Workaround: open JabRef 5.0, 'Push entries to external application(TeXstudio)' option shouldn't be active or should show the error or information box like it shows when we add a new Library with no entry which results in 'This operation requires one or more entries to be selected'.

Why it matters: It's a common U.I. bug that needs to be fixed. In this P.R. I will suggest more options that could be inactive or show error or information box.

@tobiasdiez tobiasdiez added bug Confirmed bugs or reports that are very likely to be bugs ui labels Mar 21, 2019
@tobiasdiez tobiasdiez self-assigned this Mar 21, 2019
@atulim
Copy link
Contributor Author

atulim commented Mar 22, 2019

@tobiasdiez As I said, I would suggest initial bugs in U.I. when there is no database involved. They are listed below -

Bugs Involved - (a) Some of the options that show as active and don't perform an operation. They should be marked as inactive or a dialog box should appear.

(1) Edit (Menu bar)- Manage keywords

(2) Library - New entry
New entry from plain text
Manage field names and content
(3) Tools - Search document identifier online

(b) Some of the options show exception. Instead they should show inactive or error dialog box -

(1) Library -
Library properties
Edit preamble
Edit string constraints
BibTex key patterns
(2) Quality-
Find Duplicates
Merge Entries
Check integrity
Automatically set file links
Search for unliked social files

(3) Tools-
Search for unlinked local files
Copy Linked Files to Folder

Actual Behaviour - These options have a buggy nature and should show behaviour like Abbreviate Journal names in Tools bar.

Also I request @tobiasdiez to address these bugs. I will try to remove these bugs in three to four days, reason being which there is a problem in setting up the environment even after resetting everything(as i mentioned on gitter).Till then I thought I could help in finding the bugs and improve the documentation.

@tobiasdiez
Copy link
Member

@atulim Thanks for the list! That helps a lot.

If you are really motivated you can go ahead and try to fix this bug as well. However, this is definitely not a beginner task. As it would require a lot of refactorization. For example, the disable status of the menu item needs to be bound to the command here:

public MenuItem createMenuItem(Action action, Command command) {
MenuItem menuItem = ActionUtils.createMenuItem(new JabRefAction(action, command, keyBindingRepository));
setGraphic(menuItem, action);
return menuItem;
}

And then there should be some general procedure (helper methods?) that allow to disable a command when no database is opened.

@Ali96kz
Copy link
Contributor

Ali96kz commented Mar 25, 2019

Try to work on it. If someone start work on that issue please notify me

@atulim
Copy link
Contributor Author

atulim commented Mar 26, 2019

@atulim Thanks for the list! That helps a lot.

If you are really motivated you can go ahead and try to fix this bug as well. However, this is definitely not a beginner task. As it would require a lot of refactorization. For example, the disable status of the menu item needs to be bound to the command here:
jabref/src/main/java/org/jabref/gui/actions/ActionFactory.java

Lines 40 to 45 in e14b567

public MenuItem createMenuItem(Action action, Command command) {
MenuItem menuItem = ActionUtils.createMenuItem(new JabRefAction(action, command, keyBindingRepository));
setGraphic(menuItem, action);

 return menuItem; 

}

And then there should be some general procedure (helper methods?) that allow to disable a command when no database is opened.

@tobiasdiez Yeah I will work on this issue. It's just that there is some problem that I am facing in setting up the correct development environment which I will fix in the next 2-3 days.

@atulim
Copy link
Contributor Author

atulim commented Mar 26, 2019

Try to work on it. If someone start work on that issue please notify me

@Ali96kz Yes. I think I would have no problem with you solving this bug. It will be great if someone improves this bug, be it anyone. Please reference the issue in the pull request when you solve the bug.

Thank you.

Siedlerchr pushed a commit that referenced this issue Apr 9, 2019
* #4795 disable menu item if database not connected

* resolve merge conflict

* resolve merge conflict

* resolve merge conflicts

* resolve check style

* fix import order

* resolve merge

* delete duplicate code

* change push to application implementation

* fix check style

* delete action

* put deprecated annotation on OldDatabaseCommandWrapper
Siedlerchr added a commit that referenced this issue Apr 13, 2019
* upstream/master:
  Fix right clicking on any entry and selecting "Open folder" results in the NullPointer exception (#4797)
  Bump fontbox from 2.0.14 to 2.0.15 (#4882)
  Bump pdfbox from 2.0.14 to 2.0.15 (#4881)
  Bump xmpbox from 2.0.14 to 2.0.15 (#4883)
  Bump mockito-core from 2.26.0 to 2.27.0 (#4879)
  Bump java-string-similarity from 1.1.0 to 1.2.1 (#4878)
  Fix JabRef dying silently without enough inotify instances (#4875)
  #4795 disable menu item if database not connected (#4828)
Siedlerchr added a commit that referenced this issue Apr 13, 2019
* upstream/master: (61 commits)
  fix missing l10n from previous merge
  fix compile error
  Fix right clicking on any entry and selecting "Open folder" results in the NullPointer exception (#4797)
  Bump fontbox from 2.0.14 to 2.0.15 (#4882)
  Bump pdfbox from 2.0.14 to 2.0.15 (#4881)
  Bump xmpbox from 2.0.14 to 2.0.15 (#4883)
  Bump mockito-core from 2.26.0 to 2.27.0 (#4879)
  Bump java-string-similarity from 1.1.0 to 1.2.1 (#4878)
  Fix JabRef dying silently without enough inotify instances (#4875)
  #4795 disable menu item if database not connected (#4828)
  Remove deprecated awt apple extension (#4860)
  Fix IllegalArgumentException when ranking entries (#4779)
  Bump junit-vintage-engine from 5.4.1 to 5.4.2 (#4866)
  Bump junit-platform-launcher from 1.4.1 to 1.4.2 (#4865)
  Bump junit-jupiter from 5.4.1 to 5.4.2 (#4867)
  Add author normalizer for medline import (#4863)
  Fixed group creation with default settings (#4801)
  removed default constructor of FXDialogService (#4847)
  QuotedStringTokenizer now does not unquote (#4830)
  Bump juh from 5.4.2 to 6.2.2 (#4851)
  ...
Siedlerchr added a commit that referenced this issue Apr 13, 2019
* upstream/master: (184 commits)
  Try to update to gradle 5.0.2 (#4766)
  Post change notifications on JavaFX (#4871)
  fix missing l10n from previous merge
  fix compile error
  Fix right clicking on any entry and selecting "Open folder" results in the NullPointer exception (#4797)
  Bump fontbox from 2.0.14 to 2.0.15 (#4882)
  Bump pdfbox from 2.0.14 to 2.0.15 (#4881)
  Bump xmpbox from 2.0.14 to 2.0.15 (#4883)
  Bump mockito-core from 2.26.0 to 2.27.0 (#4879)
  Bump java-string-similarity from 1.1.0 to 1.2.1 (#4878)
  Fix JabRef dying silently without enough inotify instances (#4875)
  #4795 disable menu item if database not connected (#4828)
  Remove deprecated awt apple extension (#4860)
  Fix IllegalArgumentException when ranking entries (#4779)
  Bump junit-vintage-engine from 5.4.1 to 5.4.2 (#4866)
  Bump junit-platform-launcher from 1.4.1 to 1.4.2 (#4865)
  Bump junit-jupiter from 5.4.1 to 5.4.2 (#4867)
  Add author normalizer for medline import (#4863)
  Fixed group creation with default settings (#4801)
  removed default constructor of FXDialogService (#4847)
  ...

# Conflicts:
#	build.gradle
#	src/main/java/org/jabref/gui/JabRefFrame.java
#	src/main/java/org/jabref/gui/collab/ChangeDisplayDialog.java
#	src/main/java/org/jabref/gui/collab/EntryChangeViewModel.java
@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

Thanks @atulim for the above list. Was really helpful while coding!

@koppor koppor reopened this Jul 13, 2019
@koppor
Copy link
Member

koppor commented Jul 13, 2019

I tried it today with an empty database:

grafik

grafik

Export should not be possible if no entries are selected (which is especially the case with no opened database)

@koppor
Copy link
Member

koppor commented Jan 9, 2021

Curent state:

  • File > Save-All needs to be disabled
  • Export needs to be disabled (Can we disable a complete submenu?)
    grafik
  • Edit -> Copy selected entries needs to be disabled
    grafik

Other than these issues: Everything OK in latest master.

@koppor
Copy link
Member

koppor commented Aug 2, 2021

Current status:

  • grafik
  • grafik
  • grafik
  • grafik
  • grafik
  • Can we disable the main menu if all sub items are disabled: grafik

@koppor koppor reopened this Aug 2, 2021
@koppor koppor removed the bug Confirmed bugs or reports that are very likely to be bugs label Aug 2, 2021
@JabRef JabRef deleted a comment from github-actions bot Nov 3, 2021
@JabRef JabRef deleted a comment from github-actions bot Nov 3, 2021
@koppor koppor moved this to Closed in JabRef UI Improvements Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
4 participants