Skip to content

Commit

Permalink
Lowercase application icon names (#2434)
Browse files Browse the repository at this point in the history
* chore: remove app icons

* chore: rename icons

* chore: replace icon refs
  • Loading branch information
emmenko authored Dec 17, 2021
1 parent c881fe8 commit 630ee1b
Show file tree
Hide file tree
Showing 42 changed files with 23 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .changeset/hot-beers-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@commercetools-frontend/application-config': patch
'@commercetools-frontend/assets': patch
'playground': patch
---

Lowercase application icons
4 changes: 2 additions & 2 deletions packages/application-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
- Less configuration fields.
- Support for two new variable placeholders:
- `intl`: Given that menu labels are translated, you can reference a translation using the following syntax: `${intl:<local>:<translation_key>}`, for example `${intl:en:Menu.Avengers}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.

> NOTE: This is an opt-in feature and is meant to replace the `menu.json` approach. For now it's fully backwards compatible.
Expand All @@ -198,7 +198,7 @@
{
// ...
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "${intl:en:Menu.StateMachines}",
"labelAllLocales": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/application-config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"type": "object",
"properties": {
"icon": {
"description": "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.",
"description": "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.",
"type": "string"
},
"defaultLabel": {
Expand Down
2 changes: 1 addition & 1 deletion packages/application-config/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export interface JSONSchemaForCustomApplicationConfigurationFiles {
*/
menuLinks?: {
/**
* The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
* The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.
*/
icon: string;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Meta = { processEnv: NodeJS.ProcessEnv; applicationPath: string };
* Allows variable placeholders. Supported types are:
* - `env`: For example `${env:MC_API_URL}`.
* - `intl`: For example `${intl:en:Menu.title}`.
* - `path`: For example `${path:./app.svg}`, or `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
* - `path`: For example `${path:./app.svg}`, or `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.
*/
const variableSyntax = /\${([ ~:\w.'",\-/()@]+?)}/g;
const envRefSyntax = /^env:/g;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "Avengers",
"labelAllLocales": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('providing a config with env variable placeholders', () => {
},
empty: '${env:EMPTY}',
moduleFilePath:
'${path:@commercetools-frontend/assets/application-icons/Rocket.svg}',
'${path:@commercetools-frontend/assets/application-icons/rocket.svg}',
relativeFilePath: '${path:./i18n/data/en.json}',
labelAllLocales: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/application-shell/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
- Less configuration fields.
- Support for two new variable placeholders:
- `intl`: Given that menu labels are translated, you can reference a translation using the following syntax: `${intl:<local>:<translation_key>}`, for example `${intl:en:Menu.Avengers}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.

> NOTE: This is an opt-in feature and is meant to replace the `menu.json` approach. For now it's fully backwards compatible.
Expand All @@ -283,7 +283,7 @@
{
// ...
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "${intl:en:Menu.StateMachines}",
"labelAllLocales": [
{
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions packages/constants/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
- Less configuration fields.
- Support for two new variable placeholders:
- `intl`: Given that menu labels are translated, you can reference a translation using the following syntax: `${intl:<local>:<translation_key>}`, for example `${intl:en:Menu.Avengers}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.

> NOTE: This is an opt-in feature and is meant to replace the `menu.json` approach. For now it's fully backwards compatible.
Expand All @@ -85,7 +85,7 @@
{
// ...
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "${intl:en:Menu.StateMachines}",
"labelAllLocales": [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/cypress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
- Less configuration fields.
- Support for two new variable placeholders:
- `intl`: Given that menu labels are translated, you can reference a translation using the following syntax: `${intl:<local>:<translation_key>}`, for example `${intl:en:Menu.Avengers}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.

> NOTE: This is an opt-in feature and is meant to replace the `menu.json` approach. For now it's fully backwards compatible.
Expand All @@ -200,7 +200,7 @@
{
// ...
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "${intl:en:Menu.StateMachines}",
"labelAllLocales": [
{
Expand Down
4 changes: 2 additions & 2 deletions playground/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
- Less configuration fields.
- Support for two new variable placeholders:
- `intl`: Given that menu labels are translated, you can reference a translation using the following syntax: `${intl:<local>:<translation_key>}`, for example `${intl:en:Menu.Avengers}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/Rocket.svg}`.
- `path`: Reference a file to load the its content and inline it. This is usually useful for SVG icons. The path can be relative to the application folder, for example `${path:./app.svg}`, or from a module, for example `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.

> NOTE: This is an opt-in feature and is meant to replace the `menu.json` approach. For now it's fully backwards compatible.
Expand All @@ -302,7 +302,7 @@
{
// ...
"menuLinks": {
"icon": "${path:@commercetools-frontend/assets/application-icons/Rocket.svg}",
"icon": "${path:@commercetools-frontend/assets/application-icons/rocket.svg}",
"defaultLabel": "${intl:en:Menu.StateMachines}",
"labelAllLocales": [
{
Expand Down
2 changes: 1 addition & 1 deletion playground/custom-application-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const config = {
},
},
menuLinks: {
icon: '${path:@commercetools-frontend/assets/application-icons/Rocket.svg}',
icon: '${path:@commercetools-frontend/assets/application-icons/rocket.svg}',
defaultLabel: '${intl:en:Menu.StateMachines}',
labelAllLocales: [
{
Expand Down

1 comment on commit 630ee1b

@vercel
Copy link

@vercel vercel bot commented on 630ee1b Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.