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: Event log. Output not readable #9732

Closed
koppor opened this issue Apr 3, 2023 · 7 comments · Fixed by #9739
Closed

Dark theme: Event log. Output not readable #9732

koppor opened this issue Apr 3, 2023 · 7 comments · Fixed by #9739
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs Dark Theme FirstTimeCodeContribution Triggers GitHub Greeter Workflow ui

Comments

@koppor
Copy link
Member

koppor commented Apr 3, 2023

  1. Open Help -> "View event log"
    image
  2. See that the text is black (and not white)
    image

This should be fixed.

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs ui labels Apr 3, 2023
@dlyrsk
Copy link
Contributor

dlyrsk commented Apr 5, 2023

Hello, can I be assigned this issue?

@koppor koppor added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Apr 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.

Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@dlyrsk
Copy link
Contributor

dlyrsk commented Apr 5, 2023

I want to confirm if I understand it correctly:

@Override
public void updateItem(LogEventViewModel event, boolean empty) {
super.updateItem(event, empty);
if ((event == null) || empty) {
setGraphic(null);
} else {
icon = event.getIcon().getGraphicNode();
heading.setText(event.getDisplayText());
heading.getStyleClass().setAll(event.getStyleClass());
stacktrace.setText(event.getStackTrace().orElse(""));
graphic.getStyleClass().setAll(event.getStyleClass());
graphic.getChildren().setAll(icon, message);
setGraphic(graphic);
}
}

In ErrorConsoleView, the ListCell was set with the following style classes depending on log level:
public String getStyleClass() {
switch (logEvent.getLevel()) {
case ERROR:
return "exception";
case WARN:
return "output";
case INFO:
default:
return "log";
}
}

So, adding -fx-text-fill: -fx-text-background-color to these style classes could fix this bug. Is that correct?

@koppor
Copy link
Member Author

koppor commented Apr 5, 2023

I don't know about the styling in JabRef. We have a documentation of it there: https://docs.jabref.org/advanced/custom-themes#selection-of-useful-css-selectors. Feel free to add information about concrete styles.

If I was the one to work on the issue, I would check how the other text colors were done. (This context information is missing in your question).

@dlyrsk
Copy link
Contributor

dlyrsk commented Apr 5, 2023

Yes I got that from other simlar ListView component. For example, org.jabref.gui.preferences.PreferencesDialogView#preferenceTabList and org.jabref.gui.texparser.ParseLatexResultView#referenceListVIew. They all have -fx-text-fill: -fx-text-base-color(I checked it again, it's not background-color), for example:

#referenceListView > .virtual-flow > .clipped-container > .sheet > .list-cell {
-fx-padding: 4 4 4 4;
-fx-background: transparent;
-fx-text-fill: -fx-text-base-color;
}

@dlyrsk
Copy link
Contributor

dlyrsk commented Apr 5, 2023

Probably found one problem in the current error log console. The icon before warning log texts is smaller than others. It seems this isn't expected behavior, is it?
jr-ecv

@koppor
Copy link
Member Author

koppor commented Apr 5, 2023

Not expected, looking forward to a fix!

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 Dark Theme FirstTimeCodeContribution Triggers GitHub Greeter Workflow ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants