-
Notifications
You must be signed in to change notification settings - Fork 70
feat: implement two up interactive diff viewer mode #707
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
base: master
Are you sure you want to change the base?
Conversation
commit: |
@codex review |
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.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
…pack of tests on 2-up interactive viewer
…omponent tests ci action
16fbe16
to
7380b20
Compare
✅ Component tests succeed
|
✅ E2E tests succeed
|
interface TwoUpInteractiveModeProps { | ||
expected: ImageFile; | ||
actual: ImageFile; | ||
diff?: ImageFile; |
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.
In which cases it can be undefined, if there are both "actual" and "expected"?
</div> | ||
<div className={styles.divider} /> | ||
<div className={styles.sideContainer}> | ||
<ImageLabel title={'Actual'} subtitle={getImageDisplayedSize(props.actual) + (props.differentPixels && props.diffRatio ? ` ⋅ ${getDisplayedDiffPixelsCountValue(props.differentPixels)} ${props.differentPixels > 1 ? 'are' : 'is'} different (${getDisplayedDiffPercentValue(props.diffRatio)}%)` : '')} /> |
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.
nit: This subtitle would be easier to read+understand, it it was separate multi-line function, as there would be less brackets:
getImageDisplayedSize(props.actual) + (props.differentPixels && props.diffRatio ? ` ⋅ ${getDisplayedDiffPixelsCountValue(props.differentPixels)} ${props.differentPixels > 1 ? 'are' : 'is'} different (${getDisplayedDiffPercentValue(props.diffRatio)}%)` : '')
if (!props.differentPixels || !props.diffRatio) {
return ...
}
const displayedDiffPixelsCountValue = ...
const getDisplayedDiffPercentValue = ...
return ...
setFitMode(InteractiveFitMode.FitWidth); | ||
}, [updateViewport, setFitMode]); | ||
|
||
const handleDownload = useCallback(() => { |
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.
lol, curious solution
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.
why python 😢
Can it be js, so we dont have to worry about "pip", "pillow" and such?
No description provided.