15.5.0 (2019-12-09)
-
application-components
,application-shell
,i18n
,jest-stylelint-runner
,mc-scripts
,react-notifications
Packages that previously required
@commercetools-frontend/ui-kit
as a peer dependency now require peer dependencies of specific uikit packages.If you keep using
@commercetools-frontend/ui-kit
you don't need to change anything. If you start using specific uikit packages though, you need to make sure you have the proper peer dependencies in place. To make it easier to install the required peer dependencies of a package, you can use theinstall-peerdeps
.application-components
@commercetools-uikit/design-system
@commercetools-uikit/constraints
@commercetools-uikit/primary-button
@commercetools-uikit/secondary-button
@commercetools-uikit/secondary-icon-button
@commercetools-uikit/spacings
@commercetools-uikit/text
application-shell
@commercetools-uikit/avatar
@commercetools-uikit/design-system
@commercetools-uikit/flat-button
@commercetools-uikit/icons
@commercetools-uikit/loading-spinner
@commercetools-uikit/select-input
@commercetools-uikit/spacings
@commercetools-uikit/text
i18n
@commercetools-uikit/i18n
react-notifications
@commercetools-uikit/icon-button
@commercetools-uikit/icons
@commercetools-uikit/spacings
- Other
application-components
mc-html-template
- #1194 fix(deps): update dependency serialize-javascript to v2.1.1 security
- Other
application-components
,application-shell
,babel-preset-mc-app
,i18n
,mc-scripts
,react-notifications
- #1187 fix(deps): update all dependencies (@renovate[bot])
mc-scripts
- #1188 fix(deps): update all dependencies (major) (@renovate[bot])
15.4.2 (2019-11-27)
This release publishes all packages due to an issue with npm during the prior 15.4.1
release.
15.4.1 (2019-11-27)
We recommend using the
15.4.2
release as not all packages within this release managed to be published.
application-shell
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,i18n
,jest-preset-mc-app
,jest-stylelint-runner
,l10n
,mc-scripts
,notifications
,permissions
,react-notifications
,sentry
,url-utils
- #1178 fix(deps): update all dependencies (@renovate[bot])
application-shell
- #1179 chore(deps): update all dependencies (major) (@renovate[bot])
- Other
- #1180 chore(deps): lock file maintenance (@renovate[bot])
15.4.0 (2019-11-22)
application-components
,application-shell
,i18n
,l10n
,mc-scripts
,react-notifications
- #1176 feat(i18n): add Japanese (ja) locale support (@amine-benselim)
15.3.9 (2019-11-20)
permissions
- #1173 refactor: only some subset of demanded DF values should belong to actual DF values (@amine-benselim)
15.3.8 (2019-11-15)
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
- Other
15.3.7 (2019-11-15)
permissions
- #1163 fix the logic of isAuthorized and Authorized (@amine-benselim)
- #1160 Update description in cloudfront example (@torihedden)
15.3.6 (2019-11-13)
application-shell
- #1161 fix(app-shell): passing of flag config ([@tdeekens]
15.3.5 (2019-11-11)
application-shell
- #1159 fix(app-shell): return object with default values ([@tdeekens]
15.3.4 (2019-11-11)
application-shell
jest-preset-mc-app
- Other
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,constants
,i18n
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,notifications
,permissions
,react-notifications
,sdk
,sentry
,url-utils
- #1154 fix(deps): update all dependencies (@renovate[bot])
l10n
- #1155 chore(deps): update all dependencies (major) (@renovate[bot])
15.3.3 (2019-11-05)
application-shell
application-components
,application-shell
,mc-scripts
- #1143 fix(deps): update all dependencies (major) (@renovate[bot])
application-components
,application-shell-connectors
,application-shell
,i18n
,jest-preset-mc-app
,mc-http-server
,mc-scripts
,react-notifications
- #1142 fix(deps): update all dependencies (@renovate[bot])
15.3.2 (2019-11-01)
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,mc-http-server
,mc-scripts
,react-notifications
15.3.1 (2019-10-30)
15.3.0 (2019-10-30)
application-components
,i18n
application-shell
,eslint-config-mc-app
,sentry
- #1121 chore(deps): update all dependencies (major) (@renovate[bot])
application-components
,application-shell
,babel-preset-mc-app
,i18n
,jest-preset-mc-app
,jest-stylelint-runner
,l10n
,mc-scripts
,react-notifications
,sentry
- #1120 chore(deps): update all dependencies (@renovate[bot])
15.2.3 (2019-10-28)
15.2.2 (2019-10-24)
15.2.1 (2019-10-23)
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,i18n
,l10n
,mc-http-server
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
application-shell
15.2.0 (2019-10-22)
application-shell-connectors
In case your are testing a part of the UI that utilises the project-extension-image-regex
connector, you might need to mock the GraphQL request with Apollo. To facilitate this, we expose some test-utils
from the @commercetools-frontend/application-shell-connectors
package.
Below is an example of how to use them:
import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants';
import {
createFetchProjectExtensionImageRegexMock,
createGraphqlResponseForProjectExtensionImageRegexQuery,
} from '@commercetools-frontend/application-shell-connectors/test-utils';
import { renderApp } from '@commercetools-frontend/application-shell/test-utils';
describe('rendering', () => {
it('should render view with images', async () => {
const rendered = renderApp(<App />, {
mocks: [
createFetchProjectExtensionImageRegexMock(),
// ...other mocks
],
});
await waitForElement(() => rendered.getByText('...'));
// ...
});
it('should render view without images', async () => {
const rendered = renderApp(<App />, {
mocks: [
createFetchProjectExtensionImageRegexMock({
result: {
data: createGraphqlResponseForProjectExtensionImageRegexQuery({
projectExtension: {
__typename: 'ProjectExtension',
id: 'project-extension-id',
imageRegex: undefined,
},
}),
},
}),
// ...other mocks
],
});
await waitForElement(() => rendered.getByText('...'));
// ...
});
});
15.1.8 (2019-10-22)
permissions
i18n
- #1093 Translate '/packages/i18n/data/core.json' in 'fr_FR' (@transifex-integration[bot])
- #1094 Translate '/packages/i18n/data/core.json' in 'de' (@transifex-integration[bot])
permissions
i18n
application-shell-connectors
application-shell
application-shell
,jest-preset-mc-app
,l10n
- #1105 chore(deps): update all dependencies (major) (@renovate[bot])
- Other
- #1106 chore(deps): lock file maintenance (@renovate[bot])
- #1090 chore(deps): lock file maintenance (@renovate[bot])
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,react-notifications
,sdk
,sentry
- #1104 chore(deps): update all dependencies (@renovate[bot])
application-shell
application-components
,react-notifications
,sdk
- #1089 fix(deps): update all dependencies (major) (@renovate[bot])
eslint-plugin-testing-library-react
application-components
,application-shell
,babel-preset-mc-app
,i18n
,mc-scripts
,react-notifications
,sdk
- #1088 fix(deps): update all dependencies (@renovate[bot])
15.1.7 (2019-10-11)
application-shell
- #1080 data locale should be one of the project languages (@amine-benselim)
application-components
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,create-mc-app
,eslint-plugin-testing-library-react
,i18n
,jest-preset-mc-app
,l10n
,mc-html-template
,mc-scripts
,notifications
,permissions
,react-notifications
,sentry
,url-utils
- Other
application-shell
,eslint-plugin-testing-library-react
,sentry
- #1054 chore(deps): update all dependencies (major) (@renovate[bot])
actions-global
,application-components
,application-shell-connectors
,application-shell
,i18n
,jest-preset-mc-app
,l10n
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
- #1077 chore(deps): update all dependencies (@renovate[bot])
15.1.6 (2019-09-24)
mc-scripts
application-shell
application-shell-connectors
,application-shell
application-shell-connectors
,application-shell
,permissions
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,eslint-plugin-testing-library-react
,i18n
,jest-preset-mc-app
,l10n
,mc-scripts
,notifications
,permissions
,react-notifications
,sentry
,url-utils
- #1070 chore(deps): update all dependencies (@renovate[bot])
15.1.5 (2019-09-17)
application-components
,application-shell-connectors
,application-shell
,browser-history
,i18n
,jest-preset-mc-app
,mc-scripts
,react-notifications
,sdk
- #1053 chore(deps): update all dependencies (@renovate[bot])
- Other
- #1058 fix: exclude package names causing issues (@tdeekens)
- #1055 chore(deps): lock file maintenance (@renovate[bot])
15.1.4 (2019-09-11)
application-shell-connectors
,permissions
mc-html-template
application-shell-connectors
,application-shell
application-shell
eslint-config-mc-app
,jest-preset-mc-app
,mc-html-template
,mc-scripts
,sentry
- #1040 chore(deps): update all dependencies (major) (@renovate[bot])
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,eslint-plugin-testing-library-react
,i18n
,jest-preset-mc-app
,jest-stylelint-runner
,l10n
,mc-html-template
,mc-scripts
,notifications
,permissions
,react-notifications
,sentry
,url-utils
- #1039 fix(deps): update all dependencies (@renovate[bot])
application-components
,application-shell
,i18n
,jest-preset-mc-app
,mc-scripts
,permissions
,react-notifications
15.1.3 (2019-09-05)
application-shell
l10n
- #1033 Remove unsupported countries (@islam3zzat)
15.1.2 (2019-09-03)
application-shell
15.1.1 (2019-09-03)
15.1.0 (2019-09-02)
mc-html-template
,mc-http-server
,mc-scripts
15.0.0 (2019-09-02)
This release introduces some breaking changes related to minimal dependency versions.
In v14.0.0 we introduced full support for React Hooks, as well as other improvements. In this release we iterate on that and mostly update some of the React dependencies that ship with their Hooks support.
react v16.9
blog postreact-dom v16.9
@testing-library v9
release notesreact-apollo v3
blog posteslint v6
eslint-config-airbnb v14
React v16.9
, together with @testing-library
v9
, fixes act()
by supporting async act()
for testing, among other things. This means that React won't throw any more warnings about updating state asynchronously inside Hooks 🎉
NOTE: if you're getting some errors about possible multiple copies of React installed, you can add a
resolutions
field in yourpackage.json
(only supported byyarn
) that resolves the following dependencies:
{
"resolutions": {
"react": "16.9.0",
"**/react": "16.9.0",
"react-test-renderer": "16.9.0",
"**/react-test-renderer": "16.9.0"
}
}
Another important change is the support for react-apollo
v3
, which ships with React Hooks support.
This means that you can now start using React Hooks to write queries and mutations.
For example, the FetchUser
query can be rewritten as following:
const FetchUser = () => (
<Query
query={LoggedInUserQuery}
variables={{ target: GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND }}
onError={reportErrorToSentry}
>
{({ data, loading, error }) =>
this.props.children({
isLoading: loading,
user: data && data.user,
error,
})
}
</Query>
);
const FetchUser = props => {
const { loading, data, error } = useQuery(LoggedInUserQuery, {
onError: reportErrorToSentry,
variables: { target: GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND },
});
return (
<>
{props.children({ isLoading: loading, user: data && data.user, error })}
</>
);
};
application-components
,application-shell
,eslint-plugin-testing-library-react
- #911 chore: update eslint to v6 (@emmenko)
- #966 chore: update react to v16.9 (@tdeekens)
- #956 chore: update @testing-library/reaact to v9 (@emmenko)
- Other
application-shell
14.6.1 (2019-08-29)
application-shell
,permissions
- #1009 fix: properly pass dataFences from menu to
Authorized.js
(@amine-benselim)
- #1009 fix: properly pass dataFences from menu to
14.6.0 (2019-08-27)
application-components
actions-global
,application-shell-connectors
,constants
,i18n
,permissions
,sdk
,sentry
i18n
- #1003 Translate '/packages/i18n/data/core.json' in 'zh_CN' (@transifex-integration[bot])
- #998 Translate '/packages/i18n/data/core.json' in 'fr_FR' (@transifex-integration[bot])
- #997 Translate '/packages/i18n/data/core.json' in 'es' (@transifex-integration[bot])
- #996 Translate '/packages/i18n/data/core.json' in 'de' (@transifex-integration[bot])
- #995 Translate '/packages/i18n/data/core.json' in 'en' (@transifex-integration[bot])
application-shell
actions-global
,application-components
,application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,l10n
,mc-html-template
,mc-http-server
,mc-scripts
,react-notifications
,sdk
,sentry
14.5.0 (2019-08-20)
application-shell
,constants
,sdk
permissions
application-shell
,constants
,sdk
application-components
,application-shell
,l10n
,react-notifications
14.4.1 (2019-08-14)
actions-global
14.4.0 (2019-08-14)
application-shell-connectors
,application-shell
,permissions
14.3.5 (2019-08-12)
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,mc-scripts
,react-notifications
,sentry
- Other
14.3.4 (2019-08-09)
14.3.3 (2019-08-08)
14.3.2 (2019-08-08)
application-components
,application-shell
,i18n
,react-notifications
- #938 chore: update ui-kit (@montezume)
application-components
application-components
14.3.1 (2019-08-08)
application-shell
,permissions
14.3.0 (2019-08-08)
application-shell
application-shell-connectors
,application-shell
jest-preset-mc-app
,react-notifications
application-components
,assets
application-shell
,react-notifications
permissions
,react-notifications
actions-global
,application-shell-connectors
,browser-history
,constants
,i18n
,jest-preset-mc-app
,l10n
,notifications
,permissions
,react-notifications
,sentry
,url-utils
application-components
,application-shell
,mc-scripts
,react-notifications
application-components
,application-shell
,react-notifications
- #940 fix(website): use default font-family of ui-kit for playground container (@emmenko)
- #934 feat(circleci): snapshot testing for documentation website (@emmenko)
- #933 chore(website): update to gatsby-plugin-mdx, workaround for remark images bug (@emmenko)
14.2.0 (2019-07-29)
mc-scripts
jest-preset-mc-app
storage
- Other
mc-scripts
application-components
,application-shell
,react-notifications
application-components
,application-shell
,i18n
,jest-preset-mc-app
,mc-scripts
,react-notifications
application-components
,application-shell
,jest-preset-mc-app
,mc-http-server
,react-notifications
actions-global
,application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,browser-history
,create-mc-app
,i18n
,jest-preset-mc-app
,jest-stylelint-runner
,l10n
,mc-http-server
,mc-scripts
,notifications
,permissions
,react-notifications
,sdk
,sentry
,url-utils
14.1.1 (2019-07-25)
actions-global
,constants
,notifications
,react-notifications
,sentry
14.1.0 (2019-07-24)
application-shell-connectors
,application-shell
,permissions
notifications
browser-history
14.0.0 (2019-07-18)
This release introduces several breaking changes, as documented below, mostly around React Hooks and our own permission functionality.
You can read the v14 announcement and release tracker here: commercetools#748
In order to support Hooks the following peer dependencies have to be updated:
react >=16.8
react-dom >=16.8
react-intl >=3
(currently still in beta)react-redux >=7
If you need more information about React Hooks, we recommend to have a look at the following resources. Hooks are another way to write components as they come with many benefits:
- https://reactjs.org/docs/hooks-intro.html
- https://egghead.io/courses/simplify-react-apps-with-react-hooks
- https://usehooks.com/
TL;DR; with Hooks code can become more readable, easier to test while often improving performance and reducing bundlesize.
Some of the AppKit packages now export different Hooks (more might come in the future). Here is a quick overview of existing and new Hooks:
actions-global
: provides Hooks to dispatch notifications. Previously we had to bind the action creators usingconnect
fromreact-redux
. Now the binding is done within the Hooks.useShowNotification
useShowApiErrorNotification
useShowUnexpectedErrorNotification
const showSuccessNotification = useShowNotification({
kind: 'success',
domain: DOMAINS.SIDE,
});
showSuccessNotification({ text: 'All good!' });
const showApiErrorNotification = useShowApiErrorNotification();
showApiErrorNotification({ errors });
const showUnexpectedErrorNotification = useShowUnexpectedErrorNotification();
showUnexpectedErrorNotification({ error });
application-shell-connectors
: provides Hooks to connect to the application context.useApplicationContext
const projectName = useApplicationContext(context => context.project.name);
const projectDataLocale = useApplicationContext(context => context.dataLocale);
const user = useApplicationContext(context => context.user);
// ...
l10n
: provides Hooks to get l10n data.useCountries
useCurrencies
useLanguages
useTimeZones
import {
useCountries,
useCurrencies,
useLanguages,
useTimeZones,
} from '@commercetools-frontend/l10n';
const countriesData = useCountries('en');
const currenciesData = useCurrencies('en');
const languagesData = useLanguages('en');
const timeZonesData = useTimeZones('en');
// each `xxxData` value has the following shape:
// {
// isLoading: bool,
// data: Object,
// error: Error
// }
permissions
: provides a Hook to check if the user is authorized to access the given project permissions.useIsAuthorized
const canViewProducts = useIsAuthorized({
demandedPermissions: ['ViewProducts'],
});
Other than that, we also recommend to use Hooks from other libraries:
react
: https://reactjs.org/docs/hooks-reference.htmlreact-intl
: https://github.com/formatjs/react-intl/blob/master/docs/Upgrade-Guide.md#new-useintl-hook-as-an-alternative-of-injectintl-hocreact-redux
: https://react-redux.js.org/next/api/hooks
On July 18, 2019 we migrated the commercetools organizations to our new permissions system (read the announcement). From a technical perspective the following things changed:
ManageProject
permission does not exist anymore. If your code relies on this, you need to change it to one or more of the available resource permissions:
ManageProducts
ViewProducts
ManageCategories
ViewCategories
ManageCustomers
ViewCustomers
ManageCustomerGroups
ViewCustomerGroups
ManageOrders
ViewOrders
ManageProductDiscounts
ViewProductDiscounts
ManageCartDiscounts
ViewCartDiscounts
ManageDiscountCodes
ViewDiscountCodes
ManageProjectSettings
ViewProjectSettings
ManageProductTypes
ViewProductTypes
ManageDeveloperSettings
ViewDeveloperSettings
This change also implies a change in the @commercetools-frontend/application-shell/test-utils
as the permissions
property is now empty. This means that you need to explicitly pass the expected permissions that your application deals with, otherwise tests will fail.
import { renderApp } from '@commercetools-frontend/application-shell/test-utils';
// Before
// Here we don't specify any permission, which will probably cause the test to throw errors
it('should render the app', async () => {
const rendered = renderApp(<MyApplication />);
});
// After
// Here we explicitly specify the permission of the application
it('should render the app', async () => {
const rendered = renderApp(<MyApplication />, {
permissions: {
canManageProducts: true,
canViewProducts: true,
// ...
},
});
});
- the
@commercetools-frontend/permissions
package does not expose the constantspermissions
anymore, as we don't want to keep things coupled between the package and the API. Instead, we recommend to simply list the permissions that your application uses in aconstants.js
file:
// constants.js
export const PERMISSIONS = {
ViewProducts: 'ViewProducts',
ManageProducts: 'ManageProducts',
ViewOrders: 'ViewOrders',
ManageProductTypes: 'ManageProductTypes',
ViewProductTypes: 'ViewProductTypes',
// ...
};
- the
@commercetools-frontend/permissions
package does not expose thehasPermission
function anymore. Instead we recommend to usehasSomePermissions
orhasEveryPermissions
, which accept a list of permissions (you probably weren't using this function anyway).
Other than that, things should work as before.
This release also bumps the peer dependency of @commercetools-frontend/ui-kit >=10
. We recommend to follow the release notes in the UIKit repository.
Apart from the bumped dependency versions documented above, we also bumped other dependencies:
-
@testing-library/react
: previously this was namedreact-testing-library
. We removed thereact-testing-library
peer dependency and defined@testing-library/react >=8
instead.NOTE that upgrading to the latest RTL library might cause some tests to break, depending on how you were querying elements. More info here.
-
@commercetools/enzyme-extensions
: if you write enzyme tests, and use therenderProp
method (available when using our@commercetools-frontend/jest-preset-mc-app
setup), the signature of the API changed now.
// before
wrapper.renderProp('children', { loading: true, data: undefined });
// after
wrapper.renderProp('children')({ loading: true, data: undefined });
We took the chance to also rename different things:
assets
: we renamed the SVG files to have more generic names that reflect the actual image content. #834
Before | After |
---|---|
@commercetools-frontend/assets/images/failed-authentication.svg | @commercetools-frontend/assets/images/locked-diamond.svg |
@commercetools-frontend/assets/images/failed-authorization.svg | @commercetools-frontend/assets/images/folder-full-locked.svg |
@commercetools-frontend/assets/images/image__broken.svg | @commercetools-frontend/assets/images/camera-crossed.svg |
@commercetools-frontend/assets/images/image__missing_image.svg | @commercetools-frontend/assets/images/diagonal-line.svg |
@commercetools-frontend/assets/images/image__no_image.svg | @commercetools-frontend/assets/images/camera.svg |
@commercetools-frontend/assets/images/link-external__broken.svg | @commercetools-frontend/assets/images/camera-chain-broken.svg |
@commercetools-frontend/assets/images/link-external__working.svg | @commercetools-frontend/assets/images/camera-chain.svg |
@commercetools-frontend/assets/images/page-not-found.svg | @commercetools-frontend/assets/images/desert-fox.svg |
@commercetools-frontend/assets/images/project-expired.svg | @commercetools-frontend/assets/images/hourglass.svg |
@commercetools-frontend/assets/images/project-not-initialized.svg | @commercetools-frontend/assets/images/hourglass.svg |
@commercetools-frontend/assets/images/project-suspended.svg | @commercetools-frontend/assets/images/doors-closed.svg |
@commercetools-frontend/assets/images/unexpected-error.svg | @commercetools-frontend/assets/images/icecream.svg |
We removed some exports that are not necessary anymore:
application-components
:ServicePageResponseLayout
(was deprecated)
permissions
:hasPermission
permissions
react-notifications
:GetCustomNotificationComponent
We decided to drop support for IE 11 as we want to reduce the maintenance costs due to transpilation and polyfills. As a result, we dropped those things from our tooling.
The @commercetools-frontend/storage
package has been deprecated and won't be maintained anymore. We recommend to use window.localStorage
directly.
For tests, we use the package jest-localstorage-mock
, which provides mocks for the localStorage
API. It's included in the @commercetools-frontend/jest-preset-mc-app
.
beforeEach(() => {
window.localStorage.setItem.mockClear();
window.localStorage.getItem.mockClear();
window.localStorage.removeItem.mockClear();
window.localStorage.getItem.mockReturnValue('foo');
});
expect(window.localStorage.setItem).toHaveBeenCalledWith('bar');
13.13.3 (2019-07-15)
- Other
actions-global
,application-shell-connectors
,application-shell
,permissions
,react-notifications
13.13.2 (2019-07-11)
13.13.1 (2019-07-11)
mc-html-template
,mc-scripts
jest-preset-mc-app
13.13.0 (2019-07-04)
13.12.3 (2019-07-01)
jest-stylelint-runner
,mc-scripts
application-components
,create-mc-app
,mc-http-server
,mc-scripts
13.12.2 (2019-06-28)
This release does not contain any changes compared to v13.12.1
. However, the v13.12.0
release contained a babel plugin that broke the builds and therefore we had to bundle and bump the version of all packages again to fix it.
13.12.1 (2019-06-27)
babel-preset-mc-app
13.12.0 (2019-06-27)
-
application-components
-
jest-stylelint-runner
Readme- #789 fix(jest-stylelint-runner): include run file (@montezume)
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
application-shell
- #792 fix(app-shell): to support admin service target (@tdeekens)
- #775 chore: move with-mouse-over-state internal (@montezume)
- #776 chore(application-shell): remove usage of deprecated custom property (@montezume)
babel-preset-mc-app
- #791 chore: add babel plugin transform react constant (@montezume)
- Other
actions-global
,application-components
,application-shell-connectors
,application-shell
,browser-history
,constants
,i18n
,l10n
,permissions
,sentry
- #777 fix(website): to use better font sizes scale, fix menu grid row for small screen (@emmenko)
- #768 refactor(website): restructure pages and navigation (@emmenko)
13.11.0 (2019-06-18)
application-shell
,constants
i18n
- #761 Translate '/packages/i18n/data/core.json' in 'en' (@transifex-integration[bot])
application-shell
,permissions
,storage
,url-utils
i18n
- #762 fix(i18n): fix naming bug for french and chinese translations (@montezume)
application-shell
application-components
actions-global
,application-components
,application-shell-connectors
,browser-history
,constants
,permissions
13.10.0 (2019-06-14)
In this new release, we have a few highlights:
- we started migrating some of the packages to TypeScript, so future releases will include type declarations
- we have new Modal Pages components in the
@commercetools-frontend/application-components
package - we have a new command
mc-scripts compile-html ...
to help deploying Merchant Center applications as static apps (check out the playground app to see how we can use it to deploy the app to Zeit Now, more in-depth documentation will follow soon)
application-components
- #735 fix(website): tooltip z-index fix (@montezume)
application-components
- #741 chore: unrevert contexts for app-components storybook. (@montezume)
- #744 feat(website): add intl controller for playground mode (@emmenko)
application-components
,application-shell-connectors
,application-shell
,create-mc-app
,jest-preset-mc-app
,l10n
,mc-scripts
,permissions
,react-notifications
,sdk
i18n
- #729 Translate '/packages/i18n/data/core.json' in 'zh_CN' (@transifex-integration[bot])
application-components
mc-html-template
,mc-http-server
,mc-scripts
application-shell-connectors
,application-shell
,constants
,jest-preset-mc-app
,l10n
,permissions
,react-notifications
,sentry
mc-scripts
l10n
,sentry
- #718 feat(l10n): use typescript (@montezume)
url-utils
- #717 refactor(url-utils): use typescript (@montezume)
sentry
,storage
- #715 feat(storage): use typescript (@montezume)
13.9.1 (2019-06-07)
13.9.0 (2019-06-07)
With this release, each package (besides the tooling related packages) exports a version
field, which can be used to see and track the version of the package being used.
We also introduced a new field applicationName
for the env.json
config file. This field is used to track the version used of e.g. application-shell package, which will help us to monitor and mitigate how we introduce future breaking changes.
In the next major version of app-kit, we will make the field
applicationName
required.
Additionally, we decided to introduce TypeScript to our repository. We will start migrating the packages to use TypeScript and expose type declarations. The sentry
package has already been migrated as a starting point.
application-components
,application-shell
,babel-preset-mc-app
,create-mc-app
,jest-preset-mc-app
,mc-http-server
,mc-scripts
,react-notifications
,sdk
,sentry
application-shell
,sdk
application-shell-connectors
,application-shell
,jest-preset-mc-app
,mc-html-template
,permissions
,sdk
application-shell
13.8.1 (2019-06-04)
mc-scripts
13.8.0 (2019-06-04)
- Other
- #679 chore: remove note and usage of dev mode in webpack for vrt app (@montezume)
- #678 chore: update deps (@emmenko)
mc-scripts
jest-preset-mc-app
,mc-http-server
,mc-scripts
- #664 chore: update deps (@montezume)
13.7.1 (2019-05-24)
13.7.0 (2019-05-23)
application-shell-connectors
,application-shell
,babel-preset-mc-app
,create-mc-app
,jest-preset-mc-app
,mc-scripts
,sdk
,sentry
application-components
,application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,l10n
,mc-scripts
,permissions
- #650 chore: update deps (@montezume)
application-shell
13.6.0 (2019-05-17)
application-components
,application-shell
,i18n
,l10n
,mc-http-server
,mc-scripts
,react-notifications
,sentry
application-shell
application-components
13.5.1 (2019-05-13)
application-components
,application-shell
,jest-preset-mc-app
,mc-scripts
,sentry
application-shell
13.5.0 (2019-05-09)
application-shell
,react-notifications
- #625 fix(application-shell, react-notifications): fix invalid shadow (@montezume)
application-components
- #619 fix(application-components): ui-kit peer dep (@montezume)
application-shell-connectors
,permissions
13.4.2 (2019-05-09)
Now application-components
is relying on version 9.2.0
or newer of @commeretools-frontend/ui-kit
. If you are using an older version, please update that as well.
Also, now that application-shell
no longer uses react-select
version 1, you can remove the CSS import in your app entry point. If your application doesn't explicity use react-select
version 1, you should remove this import.
// remove this next line
import 'react-select/dist/react-select.css';
import React from 'react';
// etc
application-shell
- #621 chore: remove react-select v1 (@montezume)
- #606 👯♀️ chore: update flopflip 👯♀️ (@tdeekens)
application-shell
,react-notifications
- #616 chore: move deprecated custom prop internal (@montezume)
application-shell
- #617 refactor(application-shell): use ui kit select input for locale switcher (@montezume)
- #618 refactor(project-switcher): refactor to use ui kit select input (@montezume)
application-components
- #615 refactor: use non deprecated custom props (@montezume)
13.4.1 (2019-05-03)
13.4.0 (2019-05-03)
i18n
- #600 Translate '/packages/i18n/data/core.json' in 'de' (@transifex-integration[bot])
application-components
,application-shell
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,sdk
,sentry
13.3.9 (2019-05-02)
13.3.8 (2019-04-30)
application-shell
13.3.7 (2019-04-29)
13.3.6 (2019-04-29)
application-components
,babel-preset-mc-app
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
application-components
,babel-preset-mc-app
13.3.5 (2019-04-26)
13.3.4 (2019-04-23)
13.3.3 (2019-04-23)
application-components
,application-shell
,l10n
,react-notifications
,sentry
sentry
13.3.2 (2019-04-18)
13.3.1 (2019-04-17)
application-shell
application-components
,application-shell
,mc-html-template
,mc-http-server
,mc-scripts
,react-notifications
,sdk
,sentry
13.3.0 (2019-04-17)
application-components
,application-shell
,i18n
,react-notifications
application-shell
,assets
,i18n
application-components
jest-preset-mc-app
i18n
application-shell
,i18n
,l10n
application-components
,application-shell
,react-notifications
- #543 chore: use non deprecated custom properties (@montezume)
13.2.0 (2019-04-09)
13.1.0 (2019-04-08)
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,create-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
13.0.2 (2019-04-05)
application-shell
13.0.1 (2019-04-04)
13.0.0 (2019-04-04)
This release introduces a breaking change which however will not entail any migration steps as it only affects internal packages. However, we want to follow strict semver and therefore we should mark it as a major version bump.
In short:
- A new package called
mc-dev-authentication
now contains routes and views for login and logout shared by both thewebpack-dev-server
andmc-http-server
- All routes and components around login and logout have been removed from the
@commercetools-frontend/application-shell
and have been migrated into an internal Merchant Center application - Redirects upon creating an account are not pointing to the account application, where the user can create the first organization + project
For commercetools developers there is more in-depth documentation in our internal repositories. Do not hestitate to reach out for further questions.
application-shell-connectors
,application-shell
,constants
,i18n
,mc-dev-authentication
,mc-http-server
,mc-scripts
application-components
,application-shell
,i18n
,l10n
,mc-scripts
12.2.2 (2019-04-03)
application-shell
- Other
application-components
,application-shell
,jest-preset-mc-app
,l10n
,permissions
,react-notifications
,sentry
12.2.1 (2019-04-01)
12.2.0 (2019-04-01)
12.1.0 (2019-03-29)
application-shell
12.0.0 (2019-03-26)
This release introduces a breaking change on the test-utils
which requires some migration steps. We'll go through them now:
application-shell
The @commercetools-frontend/application-shell/test-utils
render functions have been renamed to avoid naming conflicts with the re-exported properties of react-testing-library
(e.g. render
).
Before | After |
---|---|
render |
renderApp |
renderWithRedux |
renderAppWithRedux |
experimentalRender |
experimentalRenderAppWithRedux |
11.4.0 (2019-03-26)
mc-html-template
application-shell
,babel-preset-mc-app
,i18n
,jest-preset-mc-app
,mc-scripts
application-shell
,sentry
application-components
11.3.0 (2019-03-21)
application-shell
application-shell
11.2.0 (2019-03-18)
mc-scripts
application-shell
,browser-history
,react-notifications
11.1.0 (2019-03-14)
11.0.2 (2019-03-11)
11.0.1 (2019-03-06)
application-shell
application-shell
,react-notifications
11.0.0 (2019-02-28)
NOTE: the breaking change only affects our internal discount application. However, we want to follow strict semver and therefore we should mark it as a major version bump.
application-components
application-shell
,browser-history
jest-preset-mc-app
,mc-scripts
- #402 feat: remove pegjs loader from webpack config (@montezume)
application-shell-connectors
,application-shell
application-shell
,react-notifications
permissions
application-components
- #375 Add Percy VRT tests (@montezume)
i18n
- #405 chore: pull translations skip ci
actions-global
,application-components
,application-shell-connectors
,application-shell
,assets
,babel-preset-mc-app
,browser-history
,constants
,create-mc-app
,eslint-config-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-html-template
,mc-http-server
,mc-scripts
,notifications
,permissions
,react-notifications
,sdk
,sentry
,storage
,url-utils
- #416 docs(readme): update badges skip ci
application-components
10.0.0 (2019-02-26)
This release introduces a breaking change which may entail some migration steps. We'll go through them now:
mc-scripts
- #397 Update uglify plugin / stop shipping es6 code to ie (@montezume)
Previously building an application in production
mode would succeeds, even if you imported vendors that shipped untranspiled code. However, now they will fail, as our uglify plugin does not support es6 code. If you get an error building your production
build, you should pass a list of vendor packages that need to be transpiled to the create-webpack-config-for-production
like below:
const path = require('path');
const createWebpackConfigForProduction = require('@commercetools-frontend/mc-scripts/config/create-webpack-config-for-production');
const distPath = path.resolve(__dirname, 'dist');
const entryPoint = path.resolve(__dirname, 'src/index.js');
// For example, `omit-empty` should be transpiled
const vendorsToTranspile = [/node_modules\/omit-empty/];
const sourceFolders = [path.resolve(__dirname, 'src')];
module.exports = createWebpackConfigForProduction({
distPath,
entryPoint,
sourceFolders,
vendorsToTranspile,
});
- #395 chore: update deps (@montezume)
- #400 drop recompose (@emmenko)
9.0.1 (2019-02-22)
9.0.0 (2019-02-22)
The ui-kit
peer dependency has been bumped to v9.x
.
application-shell
,i18n
application-components
application-components
,application-shell
8.0.0 (2019-02-18)
This release introduces a breaking change which may entail some migration steps. We'll go through them now:
Previously the <ApplicationShell>
had an internal redirect from /:projectKey
to /:projectKey/dashboard
. This redirect is now removed and it's done by our internal proxy router as we are rolling out a new landing page called Welcome screen (/:projectKey/welcome
). However, for development, you need to adjust the redirect as illustrated below:
If you for instance had a:
<Switch>
{process.env.NODE_ENV === 'production' ? null : (
<Redirect from="/:projectKey/dashboard" to="/:projectKey/welcome" />
)}
</Switch>
or any other redirect assuming the dashboard route could have been rendered inadvertently, please change it to:
<Switch>
{process.env.NODE_ENV === 'production' ? null : (
<Redirect exact={true} from="/:projectKey" to="/:projectKey/welcome" />
)}
</Switch>
In short a diff of the change required to the <Redirect />
would be:
<Redirect
+ exact={true}
- from="/:projectKey/dashboard"
+ from="/:projectKey"
to="/:projectKey/xxx"
/>
Given during development you intended to not end up on /<projectKey>
by default.
application-components
,application-shell
,mc-scripts
application-components
,application-shell-connectors
,application-shell
,babel-preset-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
application-components
,application-shell
,mc-scripts
7.3.4 (2019-02-08)
7.3.3 (2019-02-07)
application-shell
7.3.2 (2019-02-06)
application-shell
,babel-preset-mc-app
,jest-preset-mc-app
,mc-scripts
7.3.1 (2019-02-04)
application-shell
7.3.0 (2019-02-01)
mc-http-server
7.2.1 (2019-01-31)
application-components
7.2.0 (2019-01-29)
application-components
,application-shell
,mc-scripts
,react-notifications
application-shell-connectors
,application-shell
7.1.3 (2019-01-25)
- #313 fix(template/starter): add missing react-select css import skip ci
7.1.2 (2019-01-24)
7.1.1 (2019-01-23)
application-shell
7.1.0 (2019-01-22)
application-shell
,react-notifications
- #305 chore: update ui-kit to v7 (@montezume)
The ui-kit
peer dependency now requires to use version 7.x
.
7.0.0 (2019-01-18)
This release contains mostly internal changes that do not affect production environments.
Starting from version 7.0.0
, applications will load the navigation menu items on runtime (the links in the left side navigation in the Merchant Center). This change has the benefit of keeping the navigation items consistent and up-to-date for all running applications, as it's not hardcoded anymore in the ApplicationShell package.
**We recommend to upgrade your applications to this version as soon as possible".
Custom applications will still configure their navigation menu items within the Merchant Center.
When developing locally, you usually work on one application which has its own navigation menu items. It does not make sense to show all other possible navigation links because they don't work.
Therefore, in NODE_ENV=development
mode the navigation menu items are not being fetched (including the custom applications menu items). Instead, you should specify a menu.json
file that will be loaded by the <ApplicationShell>
instead of making the network request.
<ApplicationShell
// ...
DEV_ONLY__loadNavbarMenuConfig={() =>
import('../../../menu.json').then(data => data.default || data)
}
render={() => {}}
/>
This function is only executed in NODE_ENV=development
. We recommend to use import
so that bundlers can create a split point and the menu.json
won't end up in the main bundle in production.
The menu.json
has the following structure:
{
"key": "state-machines",
"uriPath": "state-machines",
"icon": "RocketIcon",
"permissions": ["ViewStates", "ManageStates"],
"featureToggle": null,
"labelAllLocales": [
{
"locale": "en",
"value": "State Machines"
},
{
"locale": "de",
"value": "Zustandsmaschinen"
},
{
"locale": "es",
"value": "Máquinas de estado"
}
],
"submenu": [
{
"key": "state-machines-new",
"uriPath": "state-machines/new",
"permissions": ["ManageStates"],
"featureToggle": null,
"labelAllLocales": [
{
"locale": "en",
"value": "Add State Machine"
},
{
"locale": "de",
"value": "Zustandsmaschine hinzufügen"
},
{
"locale": "es",
"value": "Agregar máquina de estado"
}
]
}
]
}
This is the GraphQL representation of the JSON shape:
type NavbarMenu {
shouldRenderDivider: Boolean!
key: String!
uriPath: String!
icon: String!
labelAllLocales: [LocalizedField!]!
featureToggle: String
permissions: [String!]!
submenu: [BaseMenu!]!
}
type BaseMenu {
key: String!
uriPath: String!
labelAllLocales: [LocalizedField!]!
featureToggle: String
permissions: [String!]!
}
type LocalizedField {
locale: String!
value: String!
}
l10n
- #290 fix(l10n): return correct localized information (@montezume)
application-shell
,i18n
,mc-scripts
application-shell
,babel-preset-mc-app
,mc-scripts
,sdk
application-shell
6.0.1 (2019-01-14)
application-shell
,babel-preset-mc-app
,mc-scripts
,sdk
application-shell
,babel-preset-mc-app
,mc-scripts
,sdk
l10n
- #290 fix(l10n): use correct translated data (@montezume)
6.0.0 (2019-01-13)
ESLint is now a peer dependency in #277. Please make sure that ESLint and all required plugins are installed in your project. You can always check for the required list of plugins in the package.json of eslint-config-mc-app
. In order to install all peer dependencies with a single command run:
$ npx install-peerdeps --dev @commercetools-frontend/eslint-config-mc-app
application-shell-connectors
,application-shell
,eslint-config-mc-app
,i18n
,jest-preset-mc-app
,permissions
,react-notifications
,sdk
,sentry
application-shell
,jest-preset-mc-app
,mc-scripts
,sdk
5.1.1 (2019-01-12)
5.1.0 (2019-01-10)
application-shell
,react-notifications
- #271 chore: update ui-kit and make login submit on enter (@montezume)
-
application-shell
-
application-shell
,react-notifications
- #269 chore: update ui-kit to v6 (@montezume)
-
application-shell
,babel-preset-mc-app
,create-mc-app
,eslint-config-mc-app
,jest-preset-mc-app
,l10n
,mc-html-template
,mc-scripts
,sdk
-
mc-scripts
- #255 fix(deps): update dependency webpack-dev-server to v3.1.14
babel-preset-mc-app
,mc-scripts
application-shell-connectors
,application-shell
5.0.3 (2019-01-04)
application-shell
5.0.2 (2019-01-04)
5.0.1 (2019-01-03)
create-mc-app
5.0.0 (2019-01-03)
We dropped some legacy stuff related to Redux. Please refer to the PR #197 to get more detailed info and to follow the upgrade migration guide.
Furthermore, we dropped support to the following deprecated things:
- format of permissions as objects (
[{ mode: 'manage', resource: 'products' }]
) from the@commercetools-frontend/permissions
package - components to access user and project data
<FetchUser>
and<FetchProject>
from the@commercetools-frontend/application-shell
package
application-shell
- #216 Fix test utils and quick access (@dferber90)
application-shell
application-shell
,permissions
,sdk
actions-global
,application-shell-connectors
,application-shell
,create-mc-app
,notifications
,permissions
,react-notifications
,sdk
actions-global
,application-shell-connectors
,application-shell
,permissions
,react-notifications
create-mc-app
You can now install a starter template with one command:
$ npm install --global @commercetools-frontend/create-mc-app
$ create-mc-app my-new-custom-application-project --template starter
# or
$ npx @commercetools-frontend/create-mc-app my-new-custom-application-project --template starter
application-shell
,i18n
application-shell
,sdk
application-shell-connectors
,application-shell
application-shell
,permissions
When using the @commercetools-frontend/permissions
package, you need to pass a list of permissions as String (e.g. ['ViewProducts']
) to the demandedPermissions
prop instead of using the constants (e.g. [permissions.ViewProducts]
). With that, we can keep the list more flexible and we can avoid doing a release each time we add/remove permissions.
4.4.0 (2018-12-17)
application-shell-connectors
,application-shell
,babel-preset-mc-app
,eslint-config-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-scripts
,react-notifications
,sdk
4.3.0 (2018-12-12)
application-shell
,babel-preset-mc-app
,eslint-config-mc-app
,i18n
,jest-preset-mc-app
,mc-scripts
4.2.0 (2018-12-04)
application-shell
,i18n
application-shell
4.1.0 (2018-12-04)
playground
- #177 chore: remove ui-kit materials transpilation (@montezume)
application-shell-connectors
,application-shell
,jest-preset-mc-app
,sdk
- #178 chore: update deps (@montezume)
4.0.1 (2018-12-01)
i18n
,l10n
application-shell
4.0.0 (2018-11-30)
application-shell
- #153 Remove
Avatar
fromapplication-shell
(@montezume)
- #153 Remove
application-shell
l10n
- #154 Make locale data work with CJS bundle (@montezume)
mc-html-template
,mc-http-server
application-shell
3.1.0 (2018-11-28)
mc-scripts
mc-scripts
application-shell
application-shell
3.0.1 (2018-11-27)
mc-scripts
- #141 fix(mc-scripts): re-arrange postcss plugins to fix color mode with css custom properties (@montezume)
3.0.0 (2018-11-27)
This release updates UI-Kit to version 4, which includes several breaking changes which require some migration steps. This PR can be treated as a migration guide. As well as the migration steps are listed in the Ui-Kit release section.
application-shell
,react-notifications
,mc-scripts
,playground
- #139 chore: update ui-kit to v4.0.0 (@montezume)
2.4.0 (2018-11-26)
- Other
application-shell
,jest-preset-mc-app
i18n
actions-global
,application-shell-connectors
,application-shell
,assets
,babel-preset-mc-app
,browser-history
,constants
,eslint-config-mc-app
,i18n
,jest-preset-mc-app
,l10n
,mc-html-template
,mc-http-server
,mc-scripts
,notifications
,permissions
,react-notifications
,sdk
,sentry
,storage
,url-utils
- #128 feat: add badges. (@montezume)
- Other
application-shell
,react-notifications
2.3.2 (2018-11-22)
2.3.1 (2018-11-22)
i18n
- #117 feat(i18n): fix code splitting for mc-app-kit messages (@montezume)
application-shell
2.3.0 (2018-11-21)
application-shell
,i18n
- #115 Add backwards compatible async messages (@montezume)
2.2.0 (2018-11-21)
application-shell
,i18n
2.1.2 (2018-11-21)
application-shell
,permissions
2.1.1 (2018-11-18)
application-shell-connectors
,application-shell
,babel-preset-mc-app
,eslint-config-mc-app
,jest-preset-mc-app
,l10n
,mc-http-server
,mc-scripts
,permissions
,react-notifications
,sdk
,sentry
2.1.0 (2018-11-17)
application-shell-connectors
,application-shell
- #107 feat(application-shell-connectors): expose ownerId (@montezume)
The project
object in the <ApplicationContext>
now contains the ownerId
, which is the id
of the organization where the project belongs to.
This is just an internal refactoring of the login pages, which are part of the <ApplicationShell>
.
2.0.7 (2018-11-16)
- suǝʞǝǝpʇ (@tdeekens)
2.0.6 (2018-11-15)
2.0.5 (2018-11-14)
application-shell
2.0.4 (2018-11-14)
application-shell
2.0.3 (2018-11-13)
-
application-shell
- #96 fix(application-shell): expose test-utils as cjs instead of es (@montezume)
-
mc-scripts
- #95 fix(mc-scripts): downgrade uglifyjs-webpack-plugin for pegjs fix (@montezume)
2.0.2 (2018-11-13)
-
application-shell
- #91 fix(application-shell): expose test-utils (@dferber90)
2.0.1 (2018-11-13)
-
application-shell
- #90 fix: deprecatedWithProject is now passed the correct parameters (@montezume)
-
jest-preset-mc-app
2.0.0 (2018-11-09)
This release introduces several breaking changes which require some migration steps. We'll go through the list of those now:
The package @commercetools-frontend/application-shell-connectors
used to contain connectors that have now been removed:
- configuration:
injectConfiguration
and<ConfigurationConsumer>
- project-data-locale:
withProjectDataLocale
and<GetProjectDataLocale>
- user-permissions:
withUserPermissions
and<GetUserPermissions>
- user-time-zone:
withUserTimeZone
and<GetUserTimeZone>
As a replacement, we now have a single component, <ApplicationContext>
, and a matching higher order component, withApplicationContext
, that provides all the necessary "global" information about the user
, project
, permissions
, environment
, etc.
For the bravers, we also expose a Hook
useApplicationContext
.
You can find out more on how to access this information in the ApplicationContext
documentation.
<ApplicationContext
render={applicationContext => (
<div>
<h2>{`Hello ${applicationContext.user.firstName}`}</h2>
<p>{`You are currently in project "${applicationContext.project.key}"`}</p>
</div>
)}
/>
You can also use the HOC withApplicationContext
that will inject a applicationContext
prop.
withApplicationContext()(MyComponent);
...or pass a mapping function as the first argument to return custom shape of the injected props
withApplicationContext(applicationContext => ({
projectKey: applicationContext.project && applicationContext.project.key,
userEmail: applicationContext.user && applicationContext.user.email,
}))(MyComponent);
id
email
firstName
lastName
locale
timeZone
key
version
name
countries
currencies
languages
An object containing boolean flags about the permissions of the logged in user for the selected project (e.g. { canViewProducts: true, canManageOrders: false, ... }
)
The selected project locale (from the locale switcher in the AppBar) used to render a localized field of the project data. The available values are based on the project.languages
This object contains application specific environment information defined in the env.json
. The object will then be available on runtime from window.app
. However, to avoid accessing those values globally, we inject this object into the application context.
The following are common fields defined in env.json
. However, each application can provide more specific fields that cannot be documented.
frontendHost
: the host where the Merchant Center application is running (e.g.mc.commercetools.com
)mcApiUrl
: the API URL of the Merchant Center (https://mc-api.commercetools.com
for projects inEU
andhttps://mc-api.commercetools.co
for projects inUS
)location
: the location where the Merchant Center is running, usuallyeu
orus
env
: the environment where the Merchant Center is running, usuallyproduction
orstaging
cdnUrl
: the URL where the static assets are storedservedByProxy
: a flag to indicate if this application is running behind the Merchant Center proxy or not, usuallytrue
for production andfalse
for local development
The prop configuration
of <ApplicationShell>
has been renamed to environment
, to make it less confusing.
All packages now expose named exports and no longer support imports from paths inside the packages.
// Before
import AsyncLocaleData from '@commercetools-frontend/i18n/async-locale-data';
// After
import { AsyncLocaleData } from '@commercetools-frontend/i18n';
This also includes the
<ApplicationShell>
. You now need toimport { ApplicationShell } from '@commercetools-frontend/application-shell';
Previously we were shipping untranspiled code, requiring consumers of the packages to instruct webpack to include those packages in the transpilation process. Now that we ship transpiled code, it's not necessary to include those packages in your webpack source folders anymore:
const path = require('path');
const createWebpackConfigForDevelopment = require('@commercetools-frontend/mc-scripts/config/create-webpack-config-for-development');
const distPath = path.resolve(__dirname, 'dist');
const entryPoint = path.resolve(__dirname, 'src/index.js');
const sourceFolders = [
path.resolve(__dirname, 'src'),
- path.resolve(
- __dirname,
- 'node_modules/@commercetools-frontend/application-shell'
- ),
- // ...plus remove all other `@commercetools-frontend` packages
];
createWebpackConfigForDevelopment({
distPath,
entryPoint,
sourceFolders,
});
-
application-shell
We now expose some test utils from the
application-shell
package to be able to write component tests usingreact-testing-library
. More info in #60. -
assets
A new package has been added,
@commercetools-frontend/assets
, that contains static image assets that can be accessed directly from it'simage
folder. More information can be found in it's READMEIf you are currently accessing these image assets from
ui-kit
, then you can switch over to using them from@commercetools-frontend/assets
, as they will be removed fromui-kit
in a future release.
application-shell
- #76 refactor: drop downshift (@montezume)
1.0.0-rc.3 (2018-11-05)
mc-http-server
react-notifications
application-shell-connectors
,permissions
,react-notifications
,sdk
,sentry
1.0.0-rc.2 (2018-10-26)
application-shell
1.0.0-rc.1 (2018-10-23)
application-shell
- #18 feat(quick-access): support opening quick access when link has focus (@dferber90)
- #24 fix(application-shell): to use expiry not expired in project list (@tdeekens)
- #15 fix(nav-bar): widen expanded navbar to fit spanish support text (@montezume)
application-shell
,react-notifications
- #16 chore: upgrade ui-kit and commitlint (@dferber90)
application-shell
1.0.0-rc.0 (2018-10-16)
The <ApplicationShell>
now requires a prop named applicationMessages
, which is an object containing intl
messages (e.g. { en: {}, de: {} }
).
Each Merchant Center application should now extract its own i18n
messages and pass them to the <ApplicationShell>
.
To extract the intl
messages, use the mc-scripts extract-intl
command:
$ mc-scripts extract-intl --output-path=$(pwd)/i18n/data 'src/**/!(*.spec).js'
1.0.0-beta.36 (2018-10-15)
application-shell
- #8 fix(quick-access): fix cart-discount-list route (@dferber90)
- #1 fix(app-shell/quick-access): missing dep, log if component cannot be loaded (@emmenko)
application-shell
i18n
mc-scripts
1.0.0-beta.35 (2018-10-10)
1.0.0-beta.34 (2018-10-09)
This is the first release after the code has been moved to this public repository. From now we will update the changelog on every new release.
There isn't an official changelog prior to this version.