Skip to content

Commit e06538a

Browse files
lrsterrettdavebcn87andrewmcgovshopify-github-actions-access[bot]github-actions[bot]
authored
Merge 2025-10 changes into 2026-01-rc (#3734)
* Improved Table examples * added numeric to the default example as well * Update content on customer accounts polaris page * Version Packages (#3457) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Solves all issues after passing validation on the admin examples * fixed tooltip with accessory after removing the div * removed some warnings on the examples * Add component method docs for Customer accounts (#3519) ### Background Part of shop/issues-checkout#8471 Related to Shopify/shopify-dev#64144 This PR adds documentation for using methods in Polaris Web Components within static pages of the customer account surface. ### Solution Added a new "Methods" section to the Polaris Web Components documentation that explains: - What methods are (functions for programmatic control) - When to use methods (for actions that can't be achieved through property changes alone) - Examples showing how to use methods like `hideOverlay()` with components like Modal The documentation includes code examples in both JSX and vanilla JavaScript formats, demonstrating how to create and control a modal using methods. ### 🎩 See Shopify/shopify-dev#64144 for details ### Checklist - [x] I have 🎩'd these changes - [ ] I have updated relevant documentation * Add best practices to all customer account components (#3490) ### Background Part of shop/issues-checkout#8472 Part of shop/issues-checkout#8578 Part of shop/issues-checkout#8511 Part of shop/issues-checkout#8508 Part of shop/issues-checkout#8507 Part of shop/issues-checkout#8509 Part of shop/issues-checkout#8510 Part of shop/issues-checkout#8512 Related to Shopify/shopify-dev#63804 This PR improves the documentation for Customer Account UI Extension components by enhancing best practices sections with more detailed, actionable guidance. ### Solution Updated the best practices sections for multiple components to provide clearer, more specific guidance for developers. The changes include: - **Avatar**: Improved readability with better formatting and more concise language - **ButtonGroup**: Added a new best practices section with guidelines for grouping actions - **CustomerAccountAction**: Expanded guidance on information collection and form design - **ImageGroup**: Added recommendations for accessibility and visual spacing - **Menu**: Restructured content with clearer headings and more detailed organization principles - **Page**: Reorganized with clear subsections for headings, subheadings, and page-level actions - **Section**: Added a new best practices section with guidance on headings and actions These improvements make the documentation more actionable and help developers create more consistent, user-friendly interfaces. ### 🎩 See Shopify/shopify-dev#63804 for details ### Checklist - [x] I have 🎩'd these changes - [ ] I have updated relevant documentation * fixes issues in a bunch of components, patterns and code blocks * fixed the download attribute * reverting changes on s-grid gap * Add footerHelp, resourceList, and actionMenu patterns with examples and screenshots * Fix Aria labels * Removed action menu * Remove action menu doc file * Add aspectRatio comment to empty state examples * Update admin ui extensions and fix TextField children * fix for PR comments * Version Packages * 20155: Add Box to BlockExtensionComponents * Version Packages * Use currentTarget consistently * [Docs]: Fast-follows changes to components docs and APIs (#3527) * known changes * more changes * changeset * changeset updates * build-docs file * Version Packages (#3535) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Adds components to POS cart line item interface * Switch last changeset to patch Submitting a minor release results in an incorrect version bump for the package release PR, so we're going to try to release updates to POS cart api as a patch instead. * Version Packages * Add DropZone docs to admin extensions * Document window.close() for pos ui extensions * Expose il8n for POS ui extensions * added two new examples on Page to showcase breadcrumbs and secondary actions * Improved API and prop descriptions fo 2025-10 Component prop descriptions Component descriptions in index page cards Event data descriptions Type descriptions component descriptions lint Prop description fixes Additional context in descriptions contractions break up longer descs remove enhanced / improved language * Add changeset patch for pos ui extensions il8n * Add code examples of POS subscriptions UI extension * Move ProductSortType desc * Add 64kb limit notes * Add backticks around 2025-10 * Improved descriptions for targets, APIs, and components * 20149: Add mcp docs for POS (#3549) * Remove 'and detail pages' from Tile component description * Adds point of sale LineItemComponent type export * Version Packages * Implemented icon preview as a subSection of Icon docs * going back to the inline iframe approach * Supporting dark mode * Add UID to discount example configuration * Add UID and description to Shopify extension config * use filter:invert for dark mode on icon * Fixed race condition on icon explorer when switching dark mode and navigating * add tipAmount to BaseTransactionComplete type (#3586) ### Background Our compliance partners need tipAmount available in the data payload they receive for reporting. This PR updates the BaseTransactionComplete type to include tipAmount as optional. shop/issues-retail#20523 shop/issues-retail#20463 ### Solution Add tipAmount to BaseTransactionComplete type ### Checklist - [x] I have 🎩'd these changes - [ ] I have updated relevant documentation * Remove unstable reference from customer api doc * Improve example titles and descriptions * Alphabetize examples by title * fixes race condition of iframe not receiving theme value * added fuzzy search to icon finder * Add initial batch * Add more components * Add more pos ui extension doc examples * Add more docs * Add back in Banner docs * Best practices and limitations * Reorganize sub-categories * linting * linting * Update Image.d.ts * fix snapit.yml (#3599) * Add changeset * add composed choice example to ChoiceList * [POS UI extensions version 2025-10]: Refine example descriptions, limitations, and links (#3605) * Refine example descriptions * Refine limitations * Add cross-reference to other component docs Fix version Fix type error Move subSection to original position * Add missing example descriptions Fixes * Further refinements Wording * Integrate feedback from Tim * POS UI extensions components reference docs updates (#3607) * Update Components section to remove inappropriate content from limitations sections and add to description * Linting * Formatting, typos, and other minor revisions --------- Co-authored-by: Michelle Vinci <[email protected]> * POS UI extensions components reference docs updates (#3607) * Update Components section to remove inappropriate content from limitations sections and add to description * Linting * Formatting, typos, and other minor revisions --------- Co-authored-by: Michelle Vinci <[email protected]> * code styling --------- Co-authored-by: Tim Trevor <[email protected]> * Rename ProductSearch to Product Search (#3610) * [Copy edits]: POS UI extensions versions 2025-10 (#3619) * Revised component, prop, and example descriptions Revisions on second half of components Fixes * Revised repetitive 'A callback function' statement * Fix links to point to 2025-10 * Incorporate feedback from Tim * Clarify how to layout multiple form fields * Remove POS camera scanner examples * Redefine subcategory for Storage API (#3635) * Add back missing limitations to storage api docs * Improve admin component documentation for common usage patterns * Add comment on paragraph * docs: fix metafield and metaobject definition intent docs * Update change set to patch update for alt prop to POS Image * Version Packages * update npm deploy workflow to OIDC. (#3662) * fix latest npm release tagging. (#3663) * Add changeset to fix npm latest tag * Version Packages (#3666) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix latest npm release tagging. (#3668) * fix latest tag (#3669) * Version Packages (#3670) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix latest npm release tagging for `2025-10` (#3671) * fix latest npm release tagging. * add temporary `workflow_dispatch` for deploy workflow. * Remove children slot from DropZone docs * add manual fix (#3679) * Add temporary manual sync step for latest NPM tag (#3684) * Fix NPM OIDC authentication for manual dist-tagging (#3685) * update deploy workflow to use oidc and classic hybrid approach (#3686) * remove temp steps (#3689) * Fix snapit workflow: use comment_command instead of trigger_comment (#3707) The snapit action's source code reads 'comment_command' but the action.yml was renamed to 'trigger_comment' without rebuilding the dist. This caused /snapit comments to be silently ignored. Using 'comment_command' which is the actual input name the code reads. * Move snapit to unified OIDC ready deploy.yml workflow * [snapit] Fix warning and try a fix for yarn bild * [snapit] revert to comment_command * Fix snapit: remove changeset pre exit from build script The 'changeset pre exit' command fails because the repo is not in pre-release mode (no .changeset/pre.json file exists). This command was incorrectly added and causes all /snapit requests to fail. * Test snapit OIDC authentication branch (#3713) Points to Shopify/snapit@support-oidc-authentication to test OIDC support before merging the snapit PR. Related: Shopify/snapit#52 Co-authored-by: Claude Opus 4.5 <[email protected]> * [Admin UI extensions 2025-10]: IA for Target APIs and components (#3696) * IA for Target APIs linting Further revision * IA for components revert file change Revert file change * Add npm update step in deploy workflow Added step to update npm to the latest version before creating a snapshot. * update .nvmrc to match dev.yml (#3720) * Add admin.app.tools.data extension target (#3706) * Add admin.app.search.data extension target * Add changeset for admin.app.search.data target * Format changeset file with Prettier * Rename admin.app.search.data to admin.app.tools.data - Rename SearchDataApi to ToolsDataApi - Rename SearchDataOutput to ToolsDataOutput - Rename api/search-data directory to api/tools-data - Update extension target name * Rename SearchResult to ToolResult Co-Authored-By: Claude Opus 4.5 <[email protected]> * Change admin.app.tools.data to return undefined Remove ToolsDataOutput and ToolResult types as the extension target now returns undefined per issue requirements. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Use StandardApi for admin.app.tools.data target Remove custom ToolsDataApi in favor of StandardApi. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> * Fix deploy: update Node.js to v20.17.0 for [email protected] compatibility [email protected] requires Node.js ^20.17.0 || >=22.9.0, but the project was using v20.10.0 which caused the deploy workflow to fail. Co-Authored-By: Claude Opus 4.5 <[email protected]> * use latest version of snapit (#3724) * Version Packages (#3722) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * lint fixes * Resolve conflicts for Admin * Update api version in customer account example * use latest version of snapit (#3724) * fix conflicts with POS APIs. * pos components in line with 2026-01-rc --------- Co-authored-by: David Cortés <[email protected]> Co-authored-by: andrewmcgov <[email protected]> Co-authored-by: shopify-github-actions-access[bot] <109624739+shopify-github-actions-access[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Andrew McGoveran <[email protected]> Co-authored-by: Lianne Sit <[email protected]> Co-authored-by: Maxence Parenteau <[email protected]> Co-authored-by: Sam Rose <[email protected]> Co-authored-by: andy-chhuon <[email protected]> Co-authored-by: Jovi De Croock <[email protected]> Co-authored-by: Igor Martins <[email protected]> Co-authored-by: Jovi De Croock <[email protected]> Co-authored-by: Alex Graffeo-Cohen <[email protected]> Co-authored-by: Nathan Oliveira <[email protected]> Co-authored-by: Nathan Oliveira <[email protected]> Co-authored-by: Victor Chu <[email protected]> Co-authored-by: Michelle Vinci <[email protected]> Co-authored-by: Jane Zhu <[email protected]> Co-authored-by: Jane Zhu <[email protected]> Co-authored-by: David Cameron <[email protected]> Co-authored-by: David Cameron <[email protected]> Co-authored-by: Stephanie Ordaz <[email protected]> Co-authored-by: Chad Cromwell <[email protected]> Co-authored-by: Britta Evans-Fenton <[email protected]> Co-authored-by: H T <[email protected]> Co-authored-by: Prakash Raman <[email protected]> Co-authored-by: Tim Trevor <[email protected]> Co-authored-by: Prakash Raman <[email protected]> Co-authored-by: Victor Chu <[email protected]> Co-authored-by: Olavo Santos <[email protected]> Co-authored-by: Raman Lally <[email protected]> Co-authored-by: Bill Fienberg <[email protected]> Co-authored-by: Kyle Bavender <[email protected]> Co-authored-by: Bill Fienberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Trish Ta <[email protected]> Co-authored-by: Han T. <[email protected]>
1 parent a18ae01 commit e06538a

File tree

94 files changed

+2080
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2080
-199
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@ on:
1818
concurrency: ${{ github.workflow }}-${{ github.ref }}
1919

2020
jobs:
21+
# Snapit job - runs when /snapit comment is made on a PR
22+
snapit:
23+
name: Snapit
24+
if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/snapit' }}
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
pull-requests: write
29+
id-token: write
30+
steps:
31+
# WARNING: DO NOT RUN ANY CUSTOM LOCAL SCRIPT BEFORE RUNNING THE SNAPIT ACTION
32+
# This action can be executed by 3rd party users and it should not be able to run arbitrary code from a PR.
33+
- uses: actions/checkout@v4
34+
with:
35+
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
36+
37+
- uses: ./.github/workflows/actions/prepare
38+
39+
- name: Update npm to 11.7
40+
run: npm install -g [email protected]
41+
42+
- name: Create snapshot
43+
uses: Shopify/[email protected]
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
46+
NPM_TOKEN: ''
47+
NPM_CONFIG_PROVENANCE: true
48+
with:
49+
build_script: yarn build
50+
comment_command: /snapit
51+
2152
changesets:
2253
name: Deploy
2354
runs-on: ubuntu-latest

.github/workflows/snapit.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/ui-extensions/CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,48 @@
4444

4545
- [#3521](https://github.com/Shopify/ui-extensions/pull/3521) [`9f7afff`](https://github.com/Shopify/ui-extensions/commit/9f7afffcef86bcc8c6a9fef89ada580351082d9c) Thanks [@lrsterrett](https://github.com/lrsterrett)! - 2026.1.0-rc release
4646

47+
## 2025.10.12
48+
49+
### Patch Changes
50+
51+
- [#3706](https://github.com/Shopify/ui-extensions/pull/3706) [`2112c03`](https://github.com/Shopify/ui-extensions/commit/2112c03726ae401d95cfaace496005cc839b7007) Thanks [@billfienberg](https://github.com/billfienberg)! - Add admin.app.tools.data extension target
52+
53+
## 2025.10.11
54+
55+
### Patch Changes
56+
57+
- [#3669](https://github.com/Shopify/ui-extensions/pull/3669) [`115be91`](https://github.com/Shopify/ui-extensions/commit/115be91001aa754eb19fade5015f702a4f304a42) Thanks [@fatbattk](https://github.com/fatbattk)! - Sync latest tag
58+
59+
## 2025.10.10
60+
61+
### Patch Changes
62+
63+
- [#3665](https://github.com/Shopify/ui-extensions/pull/3665) [`34010b8`](https://github.com/Shopify/ui-extensions/commit/34010b8cf3a2dff7cf5fd86e3e0828af67efa529) Thanks [@vctrchu](https://github.com/vctrchu)! - Fix npm latest tag for 2025-10
64+
65+
## 2025.10.9
66+
67+
### Patch Changes
68+
69+
- [#3600](https://github.com/Shopify/ui-extensions/pull/3600) [`57ba7dc`](https://github.com/Shopify/ui-extensions/commit/57ba7dc2e3f97fb64bf1e04d228c62c8248c2671) Thanks [@BrittaEvansFenton](https://github.com/BrittaEvansFenton)! - Adds alt prop to POS Image
70+
71+
- [#3632](https://github.com/Shopify/ui-extensions/pull/3632) [`3f04401`](https://github.com/Shopify/ui-extensions/commit/3f04401f7dfbd91c6e5d31a97922fb043eba5bc2) Thanks [@vctrchu](https://github.com/vctrchu)! - Remove CameraScanner dev doc examples from Standard API
72+
73+
- [#3586](https://github.com/Shopify/ui-extensions/pull/3586) [`f9ab867`](https://github.com/Shopify/ui-extensions/commit/f9ab867be2e7f2865098824bfd8f64a3c22bfa6f) Thanks [@chadcromwell](https://github.com/chadcromwell)! - Add optional tipAmount field to POS transaction data types
74+
75+
## 2025.10.8
76+
77+
### Patch Changes
78+
79+
- [#3575](https://github.com/Shopify/ui-extensions/pull/3575) [`f27f6da`](https://github.com/Shopify/ui-extensions/commit/f27f6da4b22fc5e9cb282ca62c586f5e3b96dde7) Thanks [@alexgraffeocohen](https://github.com/alexgraffeocohen)! - Exports LineItemComponent from point-of-sale API so POS can import the type
80+
81+
- [#3555](https://github.com/Shopify/ui-extensions/pull/3555) [`3296915`](https://github.com/Shopify/ui-extensions/commit/32969157fe427b384c95e27e762c07f8dd4b0440) Thanks [@vctrchu](https://github.com/vctrchu)! - Expose Il8n type to POS UI extensions
82+
83+
## 2025.10.7
84+
85+
### Patch Changes
86+
87+
- [#3537](https://github.com/Shopify/ui-extensions/pull/3537) [`9c741e3`](https://github.com/Shopify/ui-extensions/commit/9c741e351ae26ebba94e0c83e4625f6f55041575) Thanks [@alexgraffeocohen](https://github.com/alexgraffeocohen)! - Adds components to point of sale cart LineItem interface to represent product bundle items.
88+
4789
## 2025.10.6
4890

4991
### Patch Changes
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import fs from 'fs/promises';
2+
import path from 'path';
3+
import {fileURLToPath} from 'url';
4+
import ts from 'typescript';
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
9+
const componentsPath = path.join(
10+
__dirname,
11+
'../../../src/surfaces/admin/components.d.ts',
12+
);
13+
14+
export async function extractIconList() {
15+
const content = await fs.readFile(componentsPath, 'utf-8');
16+
17+
const sourceFile = ts.createSourceFile(
18+
'components.d.ts',
19+
content,
20+
ts.ScriptTarget.Latest,
21+
true,
22+
);
23+
24+
let icons = [];
25+
26+
function visit(node) {
27+
if (ts.isTypeAliasDeclaration(node) && node.name.text === 'IconType$1') {
28+
if (ts.isUnionTypeNode(node.type)) {
29+
icons = node.type.types
30+
.filter((type) => ts.isLiteralTypeNode(type))
31+
.map((type) => {
32+
if (
33+
ts.isStringLiteral(type.literal) ||
34+
(type.literal && type.literal.text)
35+
) {
36+
return type.literal.text;
37+
}
38+
return null;
39+
})
40+
.filter(Boolean);
41+
}
42+
return;
43+
}
44+
45+
ts.forEachChild(node, visit);
46+
}
47+
48+
visit(sourceFile);
49+
50+
if (icons.length > 0) {
51+
return icons;
52+
}
53+
54+
throw new Error(
55+
'Could not find IconType$1 type definition in components.d.ts',
56+
);
57+
}
58+
59+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
60+
extractIconList().then((icons) => {
61+
console.log(JSON.stringify(icons, null, 2));
62+
});
63+
}

packages/ui-extensions/docs/surfaces/admin/build-docs.mjs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
copyGeneratedToShopifyDev,
1010
replaceFileContent,
1111
} from '../build-doc-shared.mjs';
12+
import {extractIconList} from './build-doc-extract-icons.mjs';
1213

1314
const EXTENSIONS_API_VERSION = process.argv[2] || 'unstable';
1415

@@ -48,6 +49,10 @@ const decodeHTML = (str) => {
4849
.replace(/&#039;/g, "'");
4950
};
5051

52+
const escapeForJSTemplate = (str) => {
53+
return str.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$/g, '\\$');
54+
};
55+
5156
const composeStyles = (...styles) => {
5257
return styles
5358
.filter(Boolean)
@@ -79,6 +84,33 @@ const stylesToString = (styles) => {
7984
.join('; ');
8085
};
8186

87+
/**
88+
* Renders the JSX template for the icon preview.
89+
* @returns The processed HTML string.
90+
*/
91+
const renderIconPreviewJsxTemplate = async (iconPreviewData) => {
92+
const templatePath = path.join(
93+
docsPath,
94+
'templates/icon-renderer/jsx-render.html',
95+
);
96+
const template = await fs.readFile(templatePath, 'utf-8');
97+
98+
const jsxFilePath = path.join(docsPath, iconPreviewData.jsxFile);
99+
let jsxCode = await fs.readFile(jsxFilePath, 'utf-8');
100+
101+
const iconListString = `[${iconPreviewData.icons
102+
.map((icon) => `'${icon}'`)
103+
.join(',')}]`;
104+
jsxCode = jsxCode.replace(/"__ICON_LIST__"/g, iconListString);
105+
106+
const escapedJsxCode = escapeForJSTemplate(jsxCode);
107+
108+
return template
109+
.replace(/\{\{COMPOSED_STYLES\}\}/g, iconPreviewData.customStyles || '')
110+
.replace(/\{\{BODY_CONTENT\}\}/g, iconPreviewData.bodyContent || '')
111+
.replace(/\{\{JSX_CODE\}\}/g, escapedJsxCode);
112+
};
113+
82114
const htmlWrapper = (htmlString, layoutStyles = '', customStyles = '') => {
83115
const baseStyles = 'box-sizing: border-box; margin: 0; padding: 0.5rem;';
84116
const composedStyles = composeStyles(baseStyles, layoutStyles, customStyles);
@@ -221,6 +253,40 @@ const templates = {
221253
const transformJson = async (filePath, isExtensions) => {
222254
let jsonData = JSON.parse((await fs.readFile(filePath, 'utf8')).toString());
223255

256+
const iconEntry = jsonData.find(
257+
(entry) => entry.name === 'Icon' && entry.subSections,
258+
);
259+
if (iconEntry) {
260+
const iconDataPath = path.join(srcPath, 'components/Icon/icon-data.json');
261+
const iconData = JSON.parse(await fs.readFile(iconDataPath, 'utf-8'));
262+
const iconPreviewData = iconData.iconPreviewData;
263+
264+
iconPreviewData.icons = await extractIconList();
265+
266+
const subSection = iconEntry.subSections.find((section) =>
267+
section.sectionContent?.includes('{{ICON_PREVIEW_IFRAME}}'),
268+
);
269+
if (subSection) {
270+
const html = await renderIconPreviewJsxTemplate(iconPreviewData);
271+
// Converting to base64 to avoid having to escape the HTML in the JSX template.
272+
const base64Html = Buffer.from(html, 'utf-8').toString('base64');
273+
const darkModeListener = await fs.readFile(
274+
path.join(docsPath, 'templates/icon-renderer/dark-mode-listener.jsx'),
275+
'utf-8',
276+
);
277+
const base64DarkModeListener = Buffer.from(
278+
darkModeListener,
279+
'utf-8',
280+
).toString('base64');
281+
subSection.sectionContent = subSection.sectionContent.replace(
282+
/\{\{ICON_PREVIEW_IFRAME\}\}/g,
283+
`<iframe id="icon-preview-iframe" width="100%" height="580px" sandbox="allow-scripts" src="data:text/html;base64,${base64Html}"></iframe>
284+
<script src="data:text/javascript;base64,${base64DarkModeListener}"></script>
285+
`,
286+
);
287+
}
288+
}
289+
224290
jsonData.forEach((entry) => {
225291
// Temporary to ensure that isOptional is added to all members
226292
if (entry.definitions && entry.isVisualComponent) {

packages/ui-extensions/docs/surfaces/admin/staticPages/admin-extensions.ext.doc.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,24 @@ If your app is using ESLint, update your configuration to include the new global
200200
},
201201
],
202202
},
203+
{
204+
type: 'Generic',
205+
anchorLink: 'limitations',
206+
title: 'Limitations',
207+
sectionContent: `
208+
As of \`2025-10\`, UI extensions have the following limitations:
209+
- **File size limit**: Extensions are limited to a maximum of 64 KB when deployed. This limit helps ensure fast loading times and optimal performance.
210+
`,
211+
sectionNotice: [
212+
{
213+
title: 'Note',
214+
sectionContent: `
215+
The 64 KB limit applies to the compiled extension bundle size upon deployment.
216+
`,
217+
type: 'info',
218+
},
219+
],
220+
},
203221
{
204222
type: 'Generic',
205223
title: 'Deploying',
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* eslint-disable no-undef */
2+
(function () {
3+
const initializedIframes = new WeakSet();
4+
5+
function sendThemeToIframe() {
6+
const iframe = document.querySelector('#icon-preview-iframe');
7+
if (iframe && iframe.contentWindow) {
8+
const isDark = document.documentElement.classList.contains('Mode-Dark');
9+
iframe.contentWindow.postMessage(
10+
{type: 'theme', mode: isDark ? 'dark' : 'light'},
11+
'*',
12+
);
13+
}
14+
}
15+
16+
const observer = new MutationObserver(() => {
17+
const iframe = document.querySelector('#icon-preview-iframe');
18+
if (iframe && !initializedIframes.has(iframe)) {
19+
initializedIframes.add(iframe);
20+
iframe.addEventListener('load', sendThemeToIframe);
21+
sendThemeToIframe();
22+
}
23+
});
24+
observer.observe(document.body, {childList: true, subtree: true});
25+
26+
window.addEventListener('theme-mode-changed', () => {
27+
sendThemeToIframe();
28+
});
29+
30+
// Re-send theme when page is restored from cache
31+
window.addEventListener('pageshow', (event) => {
32+
if (event.persisted) {
33+
sendThemeToIframe();
34+
}
35+
});
36+
37+
sendThemeToIframe();
38+
})();

0 commit comments

Comments
 (0)