Improve examples for components Image Thumbnail#3927
Open
Improve examples for components Image Thumbnail#3927
Conversation
This comment has been minimized.
This comment has been minimized.
mcvinci
reviewed
Feb 19, 2026
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Thumbnail/Thumbnail.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Thumbnail/Thumbnail.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Thumbnail/Thumbnail.doc.ts
Outdated
Show resolved
Hide resolved
SteveSill
reviewed
Feb 20, 2026
Contributor
SteveSill
left a comment
There was a problem hiding this comment.
Hey! Nice work on these. 😄 I left some comments / suggestions, but most of them are around the code in the examples. I'm not sure if that's in scope for you guys, but I thought I'd leave them there anyway.
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
| { | ||
| description: | ||
| 'Demonstrates the simplest implementation of an image component with a source and alt text.', | ||
| 'Control image proportions with a fixed aspect ratio. This example shows a 16:9 image with cover fit and lazy loading for performance.', |
Contributor
There was a problem hiding this comment.
Little confused by 'cover fit'. What is a cover fit?
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Image/Image.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Thumbnail/Thumbnail.doc.ts
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Thumbnail/Thumbnail.doc.ts
Show resolved
Hide resolved
mcvinci
approved these changes
Feb 20, 2026
Contributor
mcvinci
left a comment
There was a problem hiding this comment.
Nice updates, @sordaz00! Again, I'll leave it up to you if you want to revisit any descriptions in a follow-up PR to add some more specifics about certain props / attributes that are referenced in the code examples (related comment).
| @@ -37,21 +41,17 @@ const data: AdminReferenceEntityTemplateSchema = { | |||
Contributor
There was a problem hiding this comment.
Suggested change
| 'The image component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).', |
| { | ||
| description: | ||
| 'Shows how to use images within a grid layout, creating a consistent grid of images with equal size, aspect ratio, and styling.', | ||
| 'Build a product image gallery with consistent sizing using [Grid](/docs/api/app-home/polaris-web-components/s-grid). This example arranges three product photos in a row, each constrained to a square with rounded corners so they line up evenly.', |
Contributor
There was a problem hiding this comment.
Suggested change
| 'Build a product image gallery with consistent sizing using [Grid](/docs/api/app-home/polaris-web-components/s-grid). This example arranges three product photos in a row, each constrained to a square with rounded corners so they line up evenly.', | |
| 'Build a product image gallery with consistent sizing using a [grid](/docs/api/{API_NAME}/{API_VERSION}/polaris-web-components/layout-and-structure/grid). This example arranges three product photos in a row, each constrained to a square with rounded corners so they line up evenly.', |
Contributor
There was a problem hiding this comment.
Suggested change
| 'The thumbnail component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).', |
Updates example documentation for Image and Thumbnail components: Image (8 examples): - Swapped default to show simplest usage (src + alt) - Added "Combine aspect ratio and sizing" for advanced usage - Updated all descriptions to 3-sentence pattern - Action-oriented titles throughout Thumbnail (4 examples, was 5): - Added description to default example - Removed redundant "Basic usage" (identical to default) - Updated all descriptions to 3-sentence pattern - Action-oriented titles throughout
…ge.doc.ts Co-authored-by: Michelle Vinci <michelle.vinci@shopify.com>
…ge.doc.ts Co-authored-by: Michelle Vinci <michelle.vinci@shopify.com>
…/Thumbnail.doc.ts Co-authored-by: Michelle Vinci <michelle.vinci@shopify.com>
- Collapse code examples to HTML only, removing duplicate JSX tabs - Remove "Click to interact with the preview." from all descriptions - Add backticks to property names in descriptions (srcSet, sizes, alt, etc.) - Delete unused .jsx example files
- Update basic Image example to show realistic product thumbnail with metadata - Remove redundant auto-sized image example - Clarify descriptions for objectFit and responsive images - Fix Thumbnail alt texts to follow "Image of" convention - Fix event handling example to use proper addEventListener pattern instead of React-style onLoad attribute - Add both load and error handlers to match description
- Replace "This example shows" with active verbs - Add periods to all bullet points - Lowercase component names in prose (image, thumbnail) - Fix Grid link to use proper URL format with API placeholders Co-authored-by: Cursor <cursoragent@cursor.com>
38825ba to
a7c1f87
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
55f1dac to
0cc8a15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating examples only for App Home polaris components: Image and Thumbnail.
Updates:
Relates to:
https://github.com/Shopify/shopify-dev/issues/67432
https://github.com/Shopify/shopify-dev/issues/67433
Test plan
yarn docs:admin 2026-01to verify docs build