App Home-only Polaris updates: Modal, Page, Popover, and DropZone#3920
App Home-only Polaris updates: Modal, Page, Popover, and DropZone#3920
Conversation
9b1d2de to
dc510fd
Compare
This comment has been minimized.
This comment has been minimized.
mcvinci
left a comment
There was a problem hiding this comment.
Thanks for these updates, @sordaz00! I went pretty deep on the intros, best practices, limitations, and code examples. Let me know if you have any questions or want to chat through anything. ❤️
I didn't review the prop descriptions, as I think you might need to do another rebase of the shared.d.ts and components.d.ts files. They currently have many revisions unrelated to your changes, so we might need to clean those up first. I'm happy to review those after that!
...es/ui-extensions/src/surfaces/admin/components/DropZone/examples/upload-with-validation.html
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Popover/Popover.ab.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Popover/Popover.ab.doc.ts
Outdated
Show resolved
Hide resolved
packages/ui-extensions/src/surfaces/admin/components/Popover/Popover.ab.doc.ts
Show resolved
Hide resolved
- Add Best practices and Limitations sections - Update descriptions with clearer language - Add complete workflow examples - Use interactive preview language for examples
- Modal: Replace repeated "The Modal component" with "This component", add link to App Window for complex workflows - Popover: Add second paragraph with link to Modal for larger interactions - DropZone: Restructure intro to lead with use cases, move technical details to second paragraph
- Rewrite descriptions to follow goal-focused pattern: user goal + specific implementation - Remove backticks from component names in Properties descriptions - Vary sentence structure to avoid repetitive phrasing
- Change PascalCase component names to lowercase (modal, page, popover, drop zone) - Remove backticks from component name references in descriptions - Keep code references (type fields, imports) unchanged
- Update name field from 'DropZone' to 'Drop zone'
- Generalize shared descriptions (remove prop-specific content) - Remove App Bridge-specific paragraph from Modal shared description - Add "Shopify" before "admin's" in Page description - Add MDN link for commandFor in Popover description - Update Events/Slots descriptions to match component pattern - Remove JSX tabs, keep HTML-only with language: 'preview' - Delete 28 unreferenced JSX example files
e0dfa93 to
71747d6
Compare
mcvinci
left a comment
There was a problem hiding this comment.
Added a couple more suggestions! Your updates to examples are looking 🔥!
I noticed that the updates to field / prop descriptions for modal, page, popover, and drop zone were removed from your PR (shared.ts and components.d.ts). Are you thinking to tackle those updates in a separate PR (or maybe no further updates are necessary for prop descriptions)?
| name: 'Drop zone', | ||
| description: | ||
| 'Lets users upload files through drag-and-drop functionality into a designated area on a page, or by activating a button.', | ||
| 'The drop zone component lets users upload files through drag-and-drop or by clicking to browse. Use for file uploads such as images, documents, or CSV imports.', |
There was a problem hiding this comment.
In comparison to the descriptions for the page and popover components, it feels like drop zone and modal are a bit thin on details. Not sure if there's more that we can say about drop zone and modal?
| sectionContent: `- Set clear file type and size restrictions using the \`accept\` property | ||
| - Use the \`droprejected\` event to display meaningful error messages when uploads fail validation | ||
| - Consider using \`disabled\` to prevent uploads during processing`, |
There was a problem hiding this comment.
If we do end up keeping these here, let's just add periods at the end of each statement. 😄
|
@sordaz00 Re: CI errors, you should be able to feed the linting errors into Cursor for quick fixes. With the CLA, I think you can just re-run that check, and it should pass the next time. |
mcvinci
left a comment
There was a problem hiding this comment.
One non-blocking thought to ponder, and can definitely be considered in a follow-up PR:
With the richer example code, should we also have richer descriptions that refer to specific props? I'm comparing to some of the API example descriptions that @SteveSill has written (example, which share a lot of context about what's going on in the code.
- Remove Usage/Useful for sections from Modal and Popover - Add periods to all bullet points for consistency - Update example descriptions with active verbs and prop references - Expand shared component descriptions with implementation details - Fix Page subCategory to match live docs URL structure - Sync prop descriptions from world Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
3730887 to
4b69208
Compare
Updating full page content for App Home-only polaris components.
Relates to:
https://github.com/Shopify/shopify-dev/issues/67273
https://github.com/Shopify/shopify-dev/issues/67272
https://github.com/Shopify/shopify-dev/issues/67274
https://github.com/Shopify/shopify-dev/issues/67275
Test plan
yarn docs:adminto regenerate documentation