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

Large error message incorrect representaion #345

Open
Hello-zoka opened this issue Sep 3, 2024 · 2 comments
Open

Large error message incorrect representaion #345

Hello-zoka opened this issue Sep 3, 2024 · 2 comments
Labels
bug Something isn't working UI/UX

Comments

@Hello-zoka
Copy link
Collaborator

Hello-zoka commented Sep 3, 2024

Describe the bug
If the error message doesn't fit into the screen size, the window containing it starts blinking, so it's impossible to read

To Reproduce
We need a large enough error message. One of the ways to get it(large enough for my machine):

  • Clone repo from the development branch, run "Run IDE for UI Tests"
  • Create a standard IntelliJ IDEA project with open SDK 21(This causes error due to incompatibility with jacoco)
  • Add JUnit 5.8.1 in the .iml` configuration using maven
  • Generate tests on main class through TestSpark
  • Run test ---> error message connected with incompatibility of java and Jacoco versions.

In my case, the message blinks on the laptop's display(find the video attached), while displays correctly if external monitor attached(strange behavior to show an error message on another display)

Console outputs such warning:
[ 403304] WARN - #c.i.u.p.AbstractPopup - popup preferred size is bigger than screen: 1123x4674 com.intellij.ui.popup.AbstractPopup$MyContentPanel javax.swing.JPanel com.intellij.ide.HelpTooltip$Header com.intellij.ui.popup.AbstractPopup$2 com.intellij.ui.CaptionPanel

Expected behavior
Showing error message on the same monitor without blinking. If message is too large, show only small amount of frames or allow scrolling

Screenshots

bug.mov

Additional context
The laptop's display is 16inch

@Hello-zoka Hello-zoka added the bug Something isn't working label Sep 3, 2024
@Hello-zoka Hello-zoka self-assigned this Sep 27, 2024
@Hello-zoka
Copy link
Collaborator Author

The reason for this problem is that tooltips are designed to show short messages, while we output stack trace, which can get quite big. There are no possible solutions for how to output big text correctly on every device(at least by the info I've found) using standard JLabel. Possible solutions I can see there(don't really like any of them):

  • Manually limit the size of the stack trace to output. The problem is how to get such a limit: try adjusting it by monitor size? Hardcode such limit?
  • Redesign UI so a more suitable element is responsible for showing error
  • Create a custom JLabel that uses custom ToolTip, which allows to scroll(for example baloon tip)

@Hello-zoka Hello-zoka removed their assignment Oct 1, 2024
@Vladislav0Art
Copy link
Collaborator

@Hello-zoka
Another possible solution could be to allow a user to click a button (next to the error icon), which opens a in-memory log file (idk whether it is possible in intellij) with the error trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI/UX
Projects
None yet
Development

No branches or pull requests

2 participants