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

PWA-3217::Thumbnail Images are getting hidden due to PR - BUG#PWA-3215 #4193

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 25,
"index": 25,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 3,
"index": 3,
"line": 1,
},
},
Expand All @@ -23,14 +21,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 12,
"index": 12,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 3,
"index": 3,
"line": 1,
},
},
Expand All @@ -49,14 +45,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 25,
"index": 25,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 13,
"index": 13,
"line": 1,
},
},
Expand All @@ -70,14 +64,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 43,
"index": 43,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 26,
"index": 26,
"line": 1,
},
},
Expand All @@ -86,14 +78,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 32,
"index": 32,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 26,
"index": 26,
"line": 1,
},
},
Expand All @@ -110,14 +100,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 42,
"index": 42,
"line": 1,
},
"filename": undefined,
"identifierName": "Chordata",
"start": Position {
"column": 34,
"index": 34,
"line": 1,
},
},
Expand All @@ -128,14 +116,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 43,
"index": 43,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 33,
"index": 33,
"line": 1,
},
},
Expand All @@ -148,14 +134,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 76,
"index": 76,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 44,
"index": 44,
"line": 1,
},
},
Expand All @@ -164,14 +148,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 50,
"index": 50,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 44,
"index": 44,
"line": 1,
},
},
Expand All @@ -188,14 +170,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 76,
"index": 76,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 51,
"index": 51,
"line": 1,
},
},
Expand All @@ -205,14 +185,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 76,
"index": 76,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 51,
"index": 51,
"line": 1,
},
},
Expand All @@ -221,14 +199,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 74,
"index": 74,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 52,
"index": 52,
"line": 1,
},
},
Expand All @@ -237,14 +213,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 61,
"index": 61,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 52,
"index": 52,
"line": 1,
},
},
Expand All @@ -257,14 +231,12 @@ Array [
"loc": SourceLocation {
"end": Position {
"column": 74,
"index": 74,
"line": 1,
},
"filename": undefined,
"identifierName": undefined,
"start": Position {
"column": 62,
"index": 62,
"line": 1,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,25 +270,35 @@ Object.defineProperty(exports, \\"__esModule\\", {
value: true
});
exports.Checkbox = Checkbox;

var _react = require(\\"react\\");

const _excluded = [\\"classes\\", \\"fieldState\\", \\"id\\", \\"label\\", \\"message\\"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const DynamicComponent$3 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/a-third/component'))));
const DynamicBlerg$2 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/another/component'))));
const DynamicBlerg$1 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/dynamic/component'))));

function Checkbox(props) {
const {
classes,
fieldState,
id,
label,
message
} = props,
rest = _objectWithoutProperties(props, _excluded);
classes,
fieldState,
id,
label,
message
} = props,
rest = _objectWithoutProperties(props, _excluded);

const {
value: checked
} = fieldState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ exports[`renders form errors 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="240px"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=240&height=300&fit=cover"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg"
srcSet="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -475,7 +475,7 @@ exports[`renders form with data 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="240px"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=240&height=300&fit=cover"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg"
srcSet="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`Snapshot test 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg"
srcSet="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -112,7 +112,7 @@ https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/produc
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg"
srcSet="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -188,7 +188,7 @@ https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/produc
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg"
srcSet="https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ exports[`renders correctly with valid item data 1`] = `
onError={[MockFunction]}
onLoad={[MockFunction]}
sizes="(max-width: 640px) 300px, 840px"
src="/media/catalog/product/foo/bar/pic.png?auto=webp&format=png&width=100&fit=cover"
src="/foo/bar/pic.png"
srcSet="/media/catalog/product/foo/bar/pic.png?auto=webp&format=png&width=40&height=50&fit=cover 40w,
/media/catalog/product/foo/bar/pic.png?auto=webp&format=png&width=80&height=100&fit=cover 80w,
/media/catalog/product/foo/bar/pic.png?auto=webp&format=png&width=160&height=200&fit=cover 160w,
Expand Down
4 changes: 2 additions & 2 deletions packages/venia-ui/lib/components/Image/resourceImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const ResourceImage = props => {
onError={handleError}
onLoad={handleLoad}
sizes={sizes}
src={src}
srcSet={srcSet}
src={resource}
srcSet={ String(className).startsWith("item-image") ? null : srcSet}
width={width}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports[`Should disable delete icon while loading 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="www.venia.com/p1"
srcSet="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -198,7 +198,7 @@ exports[`Should render correctly 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="www.venia.com/p1"
srcSet="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -365,7 +365,7 @@ exports[`Should render correctly when configured to use variant thumbnail 1`] =
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="/media/catalog/product/www.venia.com/p1-variant1?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="www.venia.com/p1-variant1"
srcSet="/media/catalog/product/www.venia.com/p1-variant1?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
/media/catalog/product/www.venia.com/p1-variant1?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
/media/catalog/product/www.venia.com/p1-variant1?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down Expand Up @@ -532,7 +532,7 @@ exports[`Should render correctly with out of stock product 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="100px"
src="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=100&height=125&fit=cover"
src="www.venia.com/p1"
srcSet="/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
/media/catalog/product/www.venia.com/p1?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`should render properly 1`] = `
onError={[Function]}
onLoad={[Function]}
sizes="50px"
src="https://www.venia.com/product1-thumbnail.jpg?auto=webp&format=pjpg&width=50&height=62.5&fit=cover"
src="https://www.venia.com/product1-thumbnail.jpg"
srcSet="https://www.venia.com/product1-thumbnail.jpg?auto=webp&format=pjpg&width=40&height=50&fit=cover 40w,
https://www.venia.com/product1-thumbnail.jpg?auto=webp&format=pjpg&width=80&height=100&fit=cover 80w,
https://www.venia.com/product1-thumbnail.jpg?auto=webp&format=pjpg&width=160&height=200&fit=cover 160w,
Expand Down
Loading