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

Dark theme: Search: case sensitive is case insensitive (and vice-versa) #6791

Closed
1 task done
mlep opened this issue Aug 25, 2020 · 14 comments · Fixed by #7131
Closed
1 task done

Dark theme: Search: case sensitive is case insensitive (and vice-versa) #6791

mlep opened this issue Aug 25, 2020 · 14 comments · Fixed by #7131
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs search ui

Comments

@mlep
Copy link
Contributor

mlep commented Aug 25, 2020

JabRef 5.1--2020-08-25--2ce90ad
Linux 4.9.0-13-amd64 amd64
Java 15-ea

With the dark theme, if the "case sensitive" button is activated in the search bar, the search is case unsensitive.
And if the "case sensitive" button is deactivated in the search bar, the search is case sensitive.
Note: It works as expected in the light mode.

Steps to reproduce the behavior:

  1. activate the light theme (and restart)
  2. open https://github.com/JabRef/jabref/blob/master/src/test/resources/testbib/jabref-authors.bib
  3. in the search bar, type "garrido"
  4. if "case sensitive" is activated (i.e. "abc" is bold in the button), "No result found".
    if "case sensitive" is deactivated (i.e. "abc" is light in the button), "9 results found".
    (as expected)
  5. now activate the dark theme (and restart)
  6. in the search bar, type "garrido"
  7. if "case sensitive" is activated (i.e. "abc" is bold in the button), "9 results found"
    Dark-CaseSensitiveActivated
    if "case sensitive" is deactivated (i.e. "abc" is light in the button), "No result found"
    Dark-CaseSensitiveDeactivated

So, in the dark theme:

  1. the behavior is opposite to the one of the light theme
  2. search is visually case sensitive when, in fact, it is not.
@Siedlerchr Siedlerchr added search bug Confirmed bugs or reports that are very likely to be bugs ui labels Aug 25, 2020
@mlep
Copy link
Contributor Author

mlep commented Aug 26, 2020

The same goes with the button for regular expression search: when supposedly activated (i.e. button in bold), search works like if the button is not activated. And vice-versa:

  • title=modeling ==> "Found 7 results."
  • title=modelling ==> "Found 5 results."
  • title=modell?ing and regular expression button bold ==> "No result found."
  • title=modell?ing and regular expression button dimmed ==> "Found 12 results."

@Siedlerchr
Copy link
Member

Thanks for the investigation, seems like the the CSS colors/highlighing are wrong in the Dark.css
Maybe sth with the active/armed.
https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/Dark.css

@vatsal-M
Copy link

vatsal-M commented Oct 9, 2020

Our team @ISD14-LNMIIT wants to work on this issue. Please assign this issue to us!
@Siedlerchr @mlep

@vatsal-M
Copy link

vatsal-M commented Oct 9, 2020

We are a team of college undergrads and we have to solve an issue on Github as our project. We are following the team software process and as such it will take about 2 weeks for us to resolve the issue and we will ensure high-quality work. @Siedlerchr @mlep

@vatsal-M
Copy link

vatsal-M commented Oct 9, 2020

We (ISD14-LNMIIT) had been assigned a different issue on jabref but one of the team members got COVID-19 and we also had our mid-term exams because of which we didn't make a pull request and when we were about to make a pull request we saw that the issue has been closed. This is a very important project and we will ensure that this issue will be resolved as soon as possible. Please consider this team as it is very important for our grades. @Siedlerchr @mlep

@vatsal-M
Copy link

@Siedlerchr Can you assign @ISD14-LNMIIT this issue as I'm a part of this team?

@Siedlerchr
Copy link
Member

I can only assign persons.

@vatsal-M
Copy link

@Siedlerchr Is there any acceptance test for the issue? if there is then could you tell us about that as we will run it and provide a quality solution

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 18, 2020

Just test it manually, create a PR, then we will review the code changes and merge if all is good.
See also our https://devdocs.jabref.org for getting started.

As I outlined earlier, the issue is probably a CSS issue in the Dark.css. The dark theme can be enabled in the preferences of JabRef.
The dark.css just overwrites some properties of the Base.css

@vatsal-M
Copy link

@Siedlerchr ok thank you!

@Siedlerchr
Copy link
Member

For referenes:
The ToggleButton Style in the css applies to both the regex and the case sensitvy button, e.g. both are defined as ToggleButton
The properties of the toggle button:
https://openjfx.io/javadoc/14/javafx.graphics/javafx/scene/doc-files/cssref.html#togglebutton

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

I believe the classes are set to icon-button in

public ToggleButton asToggleButton() {
ToggleButton button = new ToggleButton();
button.setGraphic(getGraphicNode());
button.getStyleClass().add("icon-button");
return button;
}

@tobiasdiez
Copy link
Member

Thanks to @kingmanas and his team, 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.

@mlep
Copy link
Contributor Author

mlep commented Nov 30, 2020

This is now working as expected. Thank you @kingmanas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs search ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants