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

test(Image): test for Image added #361

Merged
merged 5 commits into from
Sep 21, 2023
Merged

test(Image): test for Image added #361

merged 5 commits into from
Sep 21, 2023

Conversation

niktverd
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

src/components/Image/__tests__/Image.test.tsx Outdated Show resolved Hide resolved
src/components/Image/__tests__/Image.test.tsx Outdated Show resolved Hide resolved
src/components/Image/__tests__/Image.test.tsx Outdated Show resolved Hide resolved
src/utils/imageCompress.ts Outdated Show resolved Hide resolved
test-utils/shared/image.tsx Outdated Show resolved Hide resolved
src/components/Image/__tests__/Image.test.tsx Outdated Show resolved Hide resolved
src/utils/imageCompress.ts Outdated Show resolved Hide resolved
src/components/Image/Image.tsx Outdated Show resolved Hide resolved
)}
<source srcSet={mobile} media={`(max-width: ${BREAKPOINTS.sm}px)`} />
</Fragment>
<DeviceSpecificFragment src={mobile} disableWebp={disableWebp} breakpoint="sm" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<DeviceSpecificFragment src={mobile} disableWebp={disableWebp} breakpoint="sm" />
<DeviceSpecificFragment src={mobile} disableWebp={disableWebp} breakpoint="BREAKPOINTS.sm" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using it inside when we can pass it from here once?

src/components/Image/__tests__/Image.test.tsx Show resolved Hide resolved
src/components/Image/__tests__/Image.test.tsx Outdated Show resolved Hide resolved
@niktverd
Copy link
Contributor Author

#401 separeted

@niktverd niktverd force-pushed the test/image branch 2 times, most recently from a2656f5 to 32491b8 Compare September 19, 2023 09:21
data-qa={`${qa}-compressed`}
/>
)}
<source srcSet={src} media={`(max-width: ${BREAKPOINTS[breakpoint]}px)`} data-qa={qa} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<source srcSet={src} media={`(max-width: ${BREAKPOINTS[breakpoint]}px)`} data-qa={qa} />
<source srcSet={src} media={`(max-width: breakpoint)`} data-qa={qa} />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I understand you

@@ -37,11 +37,11 @@ const DeviceSpecificFragment = ({
<source
srcSet={checkWebP(src)}
type="image/webp"
media={`(max-width: ${BREAKPOINTS[breakpoint]}px)`}
media={`(max-width: ${breakpoint})`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put px here inside and remove extra parenthesis

media={(max-width: ${breakpoint}px}
telegram-cloud-photo-size-2-5217477476513602623-x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@niktverd niktverd merged commit 131dff3 into main Sep 21, 2023
3 checks passed
@niktverd niktverd deleted the test/image branch September 21, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants