Skip to content

Commit

Permalink
docs: add release note for v21.8
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Jun 29, 2022
1 parent 4089429 commit c13fd06
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changeset/angry-days-swim.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function MyComponent() {

return (
<div>
<h1>Project images regex: {imageRegex}</h1>
<h1>Project images regex: {JSON.stringify(imageRegex)}</h1>
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions .changeset/quick-plums-wonder.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'@commercetools-frontend/application-shell': patch
---

Fixed aria role names.
Fixed ARIA role names.

We were using invalid role names in some of the component's elements.

Special mention to the element wrapping the notifications as it now uses the aria-live [attribute](https://www.w3.org/TR/wai-aria/#aria-live) (with **polite** value).
Special mention to the element wrapping the notifications as it now uses the `aria-live` [attribute](https://www.w3.org/TR/wai-aria/#aria-live) (with **polite** value).
2 changes: 1 addition & 1 deletion .changeset/quick-rocks-rhyme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@commercetools-frontend/assets': patch
---

Convert entry point to typescript
Convert entry point to typescript.
4 changes: 2 additions & 2 deletions .changeset/red-trainers-behave.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@commercetools-frontend/application-shell": patch
'@commercetools-frontend/application-shell': patch
---

Fix `ApplicationShell` header selectors a11y issues
Fix `<ApplicationShell>` header selectors accessibility issues.
2 changes: 1 addition & 1 deletion .changeset/silver-cobras-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@commercetools-frontend/application-shell-connectors': patch
---

Export `TImageRegexContext` type
Export `TImageRegexContext` type.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,34 @@ This component must be defined in a parent component where children of this comp
| `skip` | `boolean` | - | - | false | Disables loading images configuration. |


### useProjectExtensionImageRegex

A React hook that allows to access the project images configuration.

```jsx highlightLines="4-6"
import { useProjectExtensionImageRegex } from '@commercetools-frontend/application-shell-connectors';

function MyComponent() {
const { isLoading, imageRegex } = useProjectExtensionImageRegex();

if (isLoading) return <LoadingSpinner />;

return (
<div>
<h1>Project images regex: {JSON.stringify(imageRegex)}</h1>
</div>
);
}

function MyApp() {
return (
<ProjectExtensionProviderForImageRegex>
<MyComponent />
</ProjectExtensionProviderForImageRegex>
);
}
```

### GetProjectExtensionImageRegex

Use this component to access the project images configuration, using a `render` prop function.
Expand Down
2 changes: 2 additions & 0 deletions website/src/content/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ npx @commercetools-frontend/create-mc-app \
--template starter
```

If you want to start with a [TypeScript](https://www.typescriptlang.org/) project you can use the `--template=starter-typescript` option. Read more about TypeScript in the [Adding TypeScript](/development/adding-typescript) page.

<Info>

Local development and login are only allowed for users being part of the `Administrators` Team of your Organization. Therefore, choose a Project that is part of an Organization where you are an administrator of.
Expand Down
48 changes: 48 additions & 0 deletions website/src/releases/2022-07/release-v21.8.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
date: 2022-07-04
title: Custom Applications v21.8
description: The Application Kit packages have been released with several new features.
type: feature
topics:
- CLI
- Configuration
- Templates
- UI Components
---

The Application Kit packages have been released with a minor version `v21.8`.

This release includes several new features that we would like to present:

* Official support for developing Custom Applications in [TypeScript](https://www.typescriptlang.org/), including a new starter template. Read more about TypeScript in the [Adding TypeScript](/development/adding-typescript) page.
* New policy option for configuring the `audience` field when [integrating your Custom Application with an external API](/concepts/integrate-with-your-own-api#configuring-the-audience-policy).
* Improved accessibility of different elements to use correct ARIA attributes.
* Simpler and more readable list of time zone data, available from the `@commercetools-frontend/l10n` package.
* New React hook `useProjectExtensionImageRegex` for accessing the project images configuration, available from the `@commercetools-frontend/application-shell-connectors` package.

As always, if you have questions or feedback you can open a [GitHub Discussion](https://github.com/commercetools/merchant-center-application-kit/discussions) or a [GitHub Issue](https://github.com/commercetools/merchant-center-application-kit/issues).

<!--more-->

# Deprecations

The `mc-scripts` CLI has deprecated some entry points.

Importing the function `createPostcssConfig` from the main entry point `@commercetools-frontend/mc-scripts` is now deprecated. Use the entry point `@commercetools-frontend/mc-scripts/postcss` instead.

```diff
const {
createPostcssConfig,
-} = require('@commercetools-frontend/mc-scripts');
+} = require('@commercetools-frontend/mc-scripts/postcss');
```

Importing the functions `createWebpackConfigForDevelopment` and `createWebpackConfigForProduction` from the main entry point `@commercetools-frontend/mc-scripts` is now deprecated. Use the entry point `@commercetools-frontend/mc-scripts/webpack` instead.

```diff
const {
createWebpackConfigForDevelopment,
createWebpackConfigForProduction,
-} = require('@commercetools-frontend/mc-scripts');
+} = require('@commercetools-frontend/mc-scripts/webpack');
```

0 comments on commit c13fd06

Please sign in to comment.