Skip to content

Commit

Permalink
Deprecate AppBlock's summary prop
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchLillie committed Dec 12, 2023
1 parent 7b4127f commit 345ed9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/ten-vans-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/ui-extensions': patch
'@shopify/ui-extensions-react': patch
---

Deprecate summary prop for AdminBlock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {reactExtension, AdminBlock} from '@shopify/ui-extensions-react/admin';

function App() {
return (
<AdminBlock title="My App Block" summary="5 items active">
<AdminBlock title="My App Block">
Block content
</AdminBlock>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export interface AdminBlockProps {
title?: string;

/**
* The summary to display when the app block is collapsed. If not provided, no summary will be displayed. No summary is shown when the app block is expanded. Summaries longer than 40 characters will be truncated.
* The summary to display when the app block is collapsed.
*
* @deprecated App blocks no longer have a collapsed state, so this prop is no longer supported.
*/
summary?: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {extension, AdminBlock, Button} from '@shopify/ui-extensions/admin';
export default extension('Playground', (root) => {
const adminBlock = root.createComponent(AdminBlock, {
title: 'My App Block',
summary: '',
}, '5 items active');

root.appendChild(adminBlock);
Expand Down

0 comments on commit 345ed9a

Please sign in to comment.