- Stop publishing css files to sdks.shopifycdn.com
- Update docs to use unpkg link for CCSS files
- Make it clear that we sugggest downloading these files and hosting
them yourself rather than using unpkg directly
This helps protect us against people overriding our variables / mixins /
functions and thus causing problematic output.
Do the sass build as part of the rollup styles plugin instead of a
separate step. This saves us having to generate a file in the rollup
plugin that we then pass on to a second step.
Merge src/styles/global into a single file, it's pretty small and it's
easier to deal with a single file
Update a few dependencies that we want to keep in sync with sewing-kit
Use `sewing-kit optimize` to optimize svgs instead of maintaining our
own script which does the same thing.
Settings in babel.config.js are project-wide and used every time you
call babel. This saves us repeating ourselves in the various places we
trigger babel
Usually we want to compile targeting the web, however when running in
Jest we want to target a node environment
* Use the latest version of yarn to upgrade Polaris on the style guide
ShipIt comes with an old version of Yarn, that doesn't support integrity hashes. This means each polaris-styleguide PR coming from polaris-react deploys is deleting thousands of lines (hashes) from yarn.lock.
By leveraging the latest version of Yarn, we know those hashes will be kept in.
* Update UNRELEASED.md
* Use a strict version of Yarn
* Get the yarn version from dev.yml
Previously this tried to optimize svgs within the node_modules folder
too, all of which we never use.
This makes the optimize build step take about 250ms instead of 4300ms -
shaving about 4 seconds off our build time.
Previously we ran rollup for twice, but as the only thing that differs
is the output format that's not needed.
This reduces the build time by ~5.5 seconds (~15%)
Ran with the same command (`yarn dev`) this contains all the
functionality you know and love - hot reloading, a playground, percy
snapshots just with a different veneer
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).
glob will return paths separated by forward slashes. However, on Windows, paths use backslashes by default. On line 49, a simple string replace is done to strip the path off of `srcFile`. On Windows, srcDir will contain backslashes, but srcFile will contain forward slashes, so the replace will silently replace nothing. A crash then occurs later since sassFile contains a full path instead of just a filename.
The fix is to convert backslashes in srcDir into forward slashes to make the string replace work across both Windows and non-Windows platforms.
This is better than playground, because it uses most components, while
the playground has just the Page component. This allows us to get a
better feel for the size of the project as a whole.
The Playground and the shrink-ray sample page were borderline identical.
This lets us remove the shrink-ray-build folder
Simplify playground's compiled asset locations slightly - now all build
assets go in /playground/build rather than some in build, .cache and
assets. This allows us to gitignore a single folder rather than 3.
Prior to this version of eslint-plugin-shopify some rules were
inadvertently disabled due to ordering of plugins causing prior plugins
to be disabled. This has now been fixed so we can see errors for things
that were problematic.
* Stop ignoring /tests and /playground as plugins no longer crash on
those files
* Remove folder-specific eslint files as they don't do anything
* Use `eslint-ignore no-console` at the top of scripts to avoid having
to add it to every line
* Add an override targeting the playground to avoid needing to include
the eslint-disable in the file (and thus in the PR template)
* 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
* Format various files
* Wider reaching lint/format
The autoformat tools should format the same files you should run into in
your editor. Previously we weren't catching js files, json files and any
ts files outside the src folder.
Update lint:js command to include the whole folder, not just src
Update format:prettier command to include json files.
Fix linting issues raised by checking more files.
* Deploy script: ensure all @shopify/* packages are pulled from the public registry
Fixes an issue where `@shopify/react-html` versions above 1.0.0 wouldn't be found when running `yarn upgrade ...`, because yarn would attempt to fetch available versions from the internal npm registry where this package also exists, but not with the correct versions.
* Use single quotes