5 Commits

Author SHA1 Message Date
Ben Scott
a1a8aaa7d4 Unify Tophat and Playground servers
Tophatting is now done through the playground server instead of being a
separate thing. Examples are now hot reloadable - modifications to
README files and components will be reflected in your browser without
needing to save due to markdown files being imported via webpack loader.

This makes the examples part of the build pipeline instead of something
that gets serialised into the page. This makes individual pages smaller
at the expense of a larger bundle (which is shared amongst pages).
2018-11-22 18:51:35 -08:00
Ben Scott
a89de5b3b5 Provide better error messaging when README examples have syntax errors
This shall identify the file and example that the problem occurs in.
2018-11-19 17:48:26 -08:00
Tim Layton
828898e596 Shopify App Bridge 🌉🎉 (#2450)
* add appBridge to polaris context

* implement app bridge for loading and update tests

* add tests

* use appBridge in toast

* update tests

* update prop with default value, set to dismissable, and unmount safely

* render page components with app bridge

* add callback support, move to private methods

* add lifecycle handlers

* bump app-bridge version and update isDismissible option

* generate redirect callbacks based on url

* add target type to actions, remove logic to infer target

* add tests

* dev up

* [Modal] App Bridge (#2320)

* stop exporting embedded modal and export normal modal with modal props instead

* get a working app bridge modal

* better type for size and pull title

* get all props working, needs refactor with page

* easdk action is already part of the complex action type

* move modal app bridge transforms into shared utility

* refactor page to use shared transformers

* rebase off beta/app-bridge, respond to feedback, and fix modal typing

* add tests

* refactor transforms

* add transformer tests, refactor transformer to use overload, and subsequent refactors of page and modal and their tests

* add test for modal not opening on mount

* respond to feedback

* [Resource picker] App bridge (#2443)

* upgrade resource picker to use app bridge

* refactor toast and loading based on app bridge version bump

* change close callback to cancel callback, fix subscribed select action

* tweak docs

* set defaults to keep them in sync with our docs, add  showVariants

* add tests

* fix tests

* not true is also known as false

* cast action as Action.ADMIN_PATH to avoid casting as any

* use enum instead of string for argument to subscribe

* The EASDK is dead, long live the Shopify App Bridge

* fix tests

* replace type cast with overload function

* safe guard against calls to set unless something has changed

* add tests for safe guards to set

* support the danger button

* document all the changes

* ignore tophat examples if hidePlayground is true

* burn handle warning from Modal

* use default toast duration in tests

* stop typing as any in overloaded transformer function

* add note about shopOrigin to not have https://

* update history example

* dynamically generate types for target and modal size

* update prop docs for shopOrigin

* no no no
2018-10-19 11:22:02 -07:00
Kaelig Deloumeau-Prigent
9b0cfbef5d styleguide -> style guide (#2270) 2018-09-19 09:33:13 -07:00
Kaelig Deloumeau-Prigent
9f05dcdce0 Document component README formating guidelines (#2210) 2018-09-11 10:46:09 -07:00