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
Improved Error Dialog #2953
Improved Error Dialog #2953
Conversation
…into feature/error-dialog
…into feature/error-dialog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goes in the right direction, but the code clarity can be improved.
src/test/java/org/cryptomator/ui/error/ErrorControllerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either use the signum function or simply adjust the expectedResult
to reflect the actual difference in upvote counts: This is not limited to just -1, 0 and 1 😄
src/test/java/org/cryptomator/ui/error/ErrorControllerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/cryptomator/ui/error/ErrorControllerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good already. Just a couple of minor remarks (and maybe one bigger question: Can we remove "third level" error code sorting altogether?)
|
||
<!-- ✏ Please describe what happened as accurately as possible. --> | ||
|
||
<!-- 📋 Please also copy and paste the detail text from the error window. --> | ||
|
||
<!-- ℹ Text enclosed like this (chevrons, exclamation mark, two dashes) is not visible to others! --> | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these diffs are unrelated, i.e. please undo them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes have been undone
src/test/java/org/cryptomator/ui/error/ErrorControllerTest.java
Outdated
Show resolved
Hide resolved
UI design is totally sufficient to get this merged, but I guess we can in a separate PR improve the visuals if a solution was found. CC @tobihagemann |
Ok, another suggestion for god level code legibility: @DisplayName("compare error codes by root cause")
@ParameterizedTest(name = "{0} {1} {2}")
@CsvSource(textBlock = """
Error 6HU1:12H1:0000, =, Error 6HU1:12H1:0000
Error 6HU1:12H1:0007, =, Error 6HU1:12H1:0042
Error 0000:0000:0000, =, Error 0000:0000:0000
Error 6HU1:12H1:0000, <, Error 0000:0000:0000
Error 6HU1:12H1:0000, <, Error 6HU1:0000:0000
Error 0000:0000:0000, >, Error 6HU1:12H1:0000
Error 6HU1:0000:0000, >, Error 6HU1:12H1:0000
""")
public void testCompareSecondLevelMatch(String leftTitle, char expected, String rightTitle) {
int expectedResult = switch (expected) {
case '<' -> -1;
case '>' -> +1;
default -> 0;
};
// ...
} |
BTW, as a user, I found it a bit disturbing to actually see the surrounding triple-backticks as part of the dialog. How about not showing them in the dialog, but adding them to the clipboard contents when clicking on |
See #2963. |
No description provided.