-
Notifications
You must be signed in to change notification settings - Fork 2
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
implemented the interface #132
Conversation
29c5047
to
967f26c
Compare
There is quite a lot to this PR. Some things I would not consider part of the actual ticket, e.g. UI changes and changes to the DifferenceGenerator subproject. Would it be possible to take these changes and put them into a separate PR to better review this one? Because I dont really know where to start here as so many different things are happening EDIT: I think, some of the above mentioned design decisions should be discussed in the team before being merged |
f0bd1dd
to
3d2e613
Compare
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.
This is really a huge step for the GUI ! Thank you for your effort :)
There are some things though, the documentation, some naming stuff and the TestCaseGenerator. And also it would be nice to have a cleaner commit history I guess.
DifferenceGenerator/src/main/kotlin/algorithms/AlignmentAlgorithm.kt
Outdated
Show resolved
Hide resolved
GUI/src/main/kotlin/logic/differenceGeneratorWrapper/DifferenceGeneratorWrapper.kt
Show resolved
Hide resolved
import androidx.compose.ui.text.style.TextOverflow | ||
import androidx.compose.ui.unit.TextUnit | ||
|
||
// Reimplements the Text composable with auto-sizing functionality. |
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.
Use:
/** SOME DOC
*
*/
So it will be displayed if you hover over an element in the IDE :)
import java.nio.file.Path | ||
import frameNavigation.FrameNavigation | ||
import ui.components.AutoSizeText | ||
import wrappers.AllVideos | ||
|
||
/** | ||
* A Composable function that creates a screen to display the differences between two videos. | ||
* |
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.
add @params here :)
* @param setScreen A function that will be called if the user selected all three paths and wants to | ||
* continue. | ||
* @return [Unit] | ||
*/ | ||
@Composable |
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.
Doc
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.
There is a problem with these changes, because the generated alignment might contain MATCH elements that are not PERFECT.
So this might get more complicated now because we need to change the way we insert differences in the generated test case.
@@ -114,7 +114,7 @@ class TestCaseGenerator( | |||
AlignmentElement.DELETION -> { | |||
videoGenerator1.loadFrame(getByteArray(position + 1, false)) | |||
} | |||
AlignmentElement.MATCH -> { | |||
AlignmentElement.PERFECT -> { | |||
videoGenerator1.loadFrame(getByteArray(position + 1, false)) | |||
videoGenerator2.loadFrame( | |||
getByteArray( |
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.
here we use a random bool to decide wether to include differences or not. But even if the bool is true, it might be that no differences will be included. This is because the folder with the modified screenshots also contains not modified ones.
To correct this, we would need to look into the folder were only modified screenshots are and check if a modified version of the current frame exists. And only if it exists, we can add it. In this case the alignmentElement would be a MATCH and not a PERFECT
@@ -157,7 +157,11 @@ class Gotoh<T>( | |||
} | |||
|
|||
while (i > 0 || j > 0) { | |||
traceback.add(origin) | |||
if (origin == AlignmentElement.MATCH && similarityM[i][j] == 1.0) { // check indexes |
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.
// check indices
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.
tiny CnP error, otherwise LGTM :)
@@ -74,6 +80,12 @@ fun DiffScreen( | |||
} | |||
} | |||
|
|||
/** | |||
* A Composable function that creates a screen to display the differences between two videos. |
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.
I guess some CnP errors. Doc doesn't make much sense.
@@ -82,6 +94,12 @@ fun RowScope.Title(text: String) { | |||
) | |||
} | |||
|
|||
/** | |||
* A Composable function that creates a screen to display the differences between two videos. |
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.
I guess some CnP errors. Doc doesn't make much sense.
@@ -95,6 +113,12 @@ fun RowScope.DisplayedImage( | |||
} | |||
} | |||
|
|||
/** | |||
* A Composable function that creates a button to jump that jumps frame. |
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.
I guess some CnP errors. Doc doesn't make much sense.
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.
💯
Signed-off-by: a-miscellaneous <[email protected]>
Signed-off-by: a-miscellaneous <[email protected]>
added autoscaling Signed-off-by: a-miscellaneous <[email protected]>
added lib2 wrapper Signed-off-by: a-miscellaneous <[email protected]>
Signed-off-by: a-miscellaneous <[email protected]>
added theme Signed-off-by: a-miscellaneous <[email protected]>
16a3019
to
1f0ceb8
Compare
NEW TICKET:
extend testCaseGenerator to generate Matches and PERFECTS
choose better color scheme