From 5b4ff7184431f43073aeafa14742e96cdf256dca Mon Sep 17 00:00:00 2001 From: Sareh Heidari Date: Thu, 19 Sep 2019 17:17:26 +0100 Subject: [PATCH 1/5] Add BBC Scotland SVG --- .../utilities/psammead-assets/CHANGELOG.md | 1 + .../utilities/psammead-assets/index.test.jsx | 1 + .../psammead-assets/package-lock.json | 2 +- .../utilities/psammead-assets/package.json | 2 +- .../utilities/psammead-assets/src/svgs.jsx | 1 + .../psammead-assets/src/svgs/scotland.jsx | 23 +++++++++++++++++++ 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 packages/utilities/psammead-assets/src/svgs/scotland.jsx diff --git a/packages/utilities/psammead-assets/CHANGELOG.md b/packages/utilities/psammead-assets/CHANGELOG.md index e6a6740a2a..87f956ebca 100644 --- a/packages/utilities/psammead-assets/CHANGELOG.md +++ b/packages/utilities/psammead-assets/CHANGELOG.md @@ -3,6 +3,7 @@ | Version | Description | |---------|-------------| +| 2.4.0 | [PR#x](https://github.com/bbc/psammead/pull/x) Add SVG for BBC Scotland | | 2.3.0 | [PR#2115](https://github.com/bbc/psammead/pull/2115) Added media icons SVGs | | 2.2.4 | [PR#1942](https://github.com/bbc/psammead/pull/1942) Talos - Bump React to 16.9.0 | | 2.2.3 | [PR#1847](https://github.com/bbc/psammead/pull/1847) Fixed Telugu typos | diff --git a/packages/utilities/psammead-assets/index.test.jsx b/packages/utilities/psammead-assets/index.test.jsx index ca1a614323..4ebaed433b 100644 --- a/packages/utilities/psammead-assets/index.test.jsx +++ b/packages/utilities/psammead-assets/index.test.jsx @@ -34,6 +34,7 @@ const svgsExpectedExports = { portuguese: 'object', punjabi: 'object', russian: 'object', + scotland: 'object', serbian: 'object', sinhala: 'object', somali: 'object', diff --git a/packages/utilities/psammead-assets/package-lock.json b/packages/utilities/psammead-assets/package-lock.json index 2e167b7d27..399cd2f403 100644 --- a/packages/utilities/psammead-assets/package-lock.json +++ b/packages/utilities/psammead-assets/package-lock.json @@ -1,5 +1,5 @@ { "name": "@bbc/psammead-assets", - "version": "2.3.0", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/packages/utilities/psammead-assets/package.json b/packages/utilities/psammead-assets/package.json index af3915b1fa..6b8016ef03 100644 --- a/packages/utilities/psammead-assets/package.json +++ b/packages/utilities/psammead-assets/package.json @@ -1,6 +1,6 @@ { "name": "@bbc/psammead-assets", - "version": "2.3.0", + "version": "2.4.0", "sideEffects": false, "description": "A collection of common assets that are likely to be required by many Psammead components or users, such as SVGs or small scripts.", "repository": { diff --git a/packages/utilities/psammead-assets/src/svgs.jsx b/packages/utilities/psammead-assets/src/svgs.jsx index e24e4ca1d9..3d29d97b82 100644 --- a/packages/utilities/psammead-assets/src/svgs.jsx +++ b/packages/utilities/psammead-assets/src/svgs.jsx @@ -26,6 +26,7 @@ export pidgin from './svgs/pidgin'; export portuguese from './svgs/portuguese'; export punjabi from './svgs/punjabi'; export russian from './svgs/russian'; +export scotland from './svgs/scotland'; export serbian from './svgs/serbian'; export sinhala from './svgs/sinhala'; export somali from './svgs/somali'; diff --git a/packages/utilities/psammead-assets/src/svgs/scotland.jsx b/packages/utilities/psammead-assets/src/svgs/scotland.jsx new file mode 100644 index 0000000000..7a15bb90df --- /dev/null +++ b/packages/utilities/psammead-assets/src/svgs/scotland.jsx @@ -0,0 +1,23 @@ +import React from 'react'; + +const scotland = { + group: ( + + + + + + ), + ratio: 7.3396, + viewbox: { + height: 24, + width: 176.15, + }, +}; + +export default scotland; From 06587991758ccc4df79f3c5fde4418a40b8b752b Mon Sep 17 00:00:00 2001 From: Sareh Heidari Date: Thu, 19 Sep 2019 17:17:56 +0100 Subject: [PATCH 2/5] Update readme --- packages/utilities/psammead-assets/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utilities/psammead-assets/README.md b/packages/utilities/psammead-assets/README.md index 8dedb1fd08..30c974c401 100644 --- a/packages/utilities/psammead-assets/README.md +++ b/packages/utilities/psammead-assets/README.md @@ -15,7 +15,7 @@ npm install @bbc/psammead-assets --save ## Usage ```jsx -import { BBC_BLOCKS, news} from '@bbc/psammead-assets/svgs'; +import { BBC_BLOCKS, news } from '@bbc/psammead-assets/svgs'; import { AMP_SCRIPT } from '@bbc/psammead-assets/amp-boilerplate'; ``` @@ -24,7 +24,7 @@ import { AMP_SCRIPT } from '@bbc/psammead-assets/amp-boilerplate'; Service brand SVGs, like `news`, are objects that contains an svg group, viewbox, ratio and height; -This package currently has brand SVGs for the BBC services `igbo`, `news`, `persian`, `pidgin`, `thai` and `yoruba`. +This package currently has brand SVGs for the BBC News World Services as well as for BBC News, BBS Scotland. | Property | Type | Required | Default | Example | From 03f56617798fe8b7af754b0161aa1a412f20c442 Mon Sep 17 00:00:00 2001 From: Sareh Date: Thu, 19 Sep 2019 17:22:30 +0100 Subject: [PATCH 3/5] Update CHANGELOG.md --- packages/utilities/psammead-assets/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utilities/psammead-assets/CHANGELOG.md b/packages/utilities/psammead-assets/CHANGELOG.md index 87f956ebca..5d6305ae80 100644 --- a/packages/utilities/psammead-assets/CHANGELOG.md +++ b/packages/utilities/psammead-assets/CHANGELOG.md @@ -3,7 +3,7 @@ | Version | Description | |---------|-------------| -| 2.4.0 | [PR#x](https://github.com/bbc/psammead/pull/x) Add SVG for BBC Scotland | +| 2.4.0 | [PR#2192](https://github.com/bbc/psammead/pull/2192) Add SVG for BBC Scotland | | 2.3.0 | [PR#2115](https://github.com/bbc/psammead/pull/2115) Added media icons SVGs | | 2.2.4 | [PR#1942](https://github.com/bbc/psammead/pull/1942) Talos - Bump React to 16.9.0 | | 2.2.3 | [PR#1847](https://github.com/bbc/psammead/pull/1847) Fixed Telugu typos | From e366fd3e879c9139478fd417ec4e9d7e847b4ba5 Mon Sep 17 00:00:00 2001 From: Sareh Date: Thu, 19 Sep 2019 17:22:59 +0100 Subject: [PATCH 4/5] Typo fix --- packages/utilities/psammead-assets/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utilities/psammead-assets/README.md b/packages/utilities/psammead-assets/README.md index 30c974c401..1c7fb93d58 100644 --- a/packages/utilities/psammead-assets/README.md +++ b/packages/utilities/psammead-assets/README.md @@ -24,7 +24,7 @@ import { AMP_SCRIPT } from '@bbc/psammead-assets/amp-boilerplate'; Service brand SVGs, like `news`, are objects that contains an svg group, viewbox, ratio and height; -This package currently has brand SVGs for the BBC News World Services as well as for BBC News, BBS Scotland. +This package currently has brand SVGs for the BBC News World Services as well as for BBC News, BBC Scotland. | Property | Type | Required | Default | Example | From 9838234484dd617717370cf8da56f7464f719f87 Mon Sep 17 00:00:00 2001 From: Sareh Heidari Date: Thu, 19 Sep 2019 17:35:15 +0100 Subject: [PATCH 5/5] Add scotland snapshot --- .../src/__snapshots__/svgs.test.jsx.snap | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/utilities/psammead-assets/src/__snapshots__/svgs.test.jsx.snap b/packages/utilities/psammead-assets/src/__snapshots__/svgs.test.jsx.snap index 02bf143814..e0c0ecffa2 100644 --- a/packages/utilities/psammead-assets/src/__snapshots__/svgs.test.jsx.snap +++ b/packages/utilities/psammead-assets/src/__snapshots__/svgs.test.jsx.snap @@ -806,6 +806,29 @@ exports[`russian SVG should render correctly 1`] = ` `; +exports[`scotland SVG should render correctly 1`] = ` + + + + + + + +`; + exports[`serbian SVG should render correctly 1`] = `