From d3cc1d71bd3a5477c82ff8d7a0965e0cc3b1d01b Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Wed, 20 Dec 2023 17:58:46 +0100 Subject: [PATCH] Social Links: add Bluesky logo --- .../block-library/src/social-link/icons/bluesky.js | 10 ++++++++++ packages/block-library/src/social-link/icons/index.js | 1 + packages/block-library/src/social-link/index.php | 4 ++++ .../src/social-link/socials-with-bg.scss | 5 +++++ .../src/social-link/socials-without-bg.scss | 4 ++++ packages/block-library/src/social-link/variations.js | 7 +++++++ .../fixtures/blocks/core__social-link-bluesky.html | 1 + .../fixtures/blocks/core__social-link-bluesky.json | 11 +++++++++++ .../blocks/core__social-link-bluesky.parsed.json | 11 +++++++++++ .../blocks/core__social-link-bluesky.serialized.html | 1 + 10 files changed, 55 insertions(+) create mode 100644 packages/block-library/src/social-link/icons/bluesky.js create mode 100644 test/integration/fixtures/blocks/core__social-link-bluesky.html create mode 100644 test/integration/fixtures/blocks/core__social-link-bluesky.json create mode 100644 test/integration/fixtures/blocks/core__social-link-bluesky.parsed.json create mode 100644 test/integration/fixtures/blocks/core__social-link-bluesky.serialized.html diff --git a/packages/block-library/src/social-link/icons/bluesky.js b/packages/block-library/src/social-link/icons/bluesky.js new file mode 100644 index 00000000000000..b80e2f0eb85b28 --- /dev/null +++ b/packages/block-library/src/social-link/icons/bluesky.js @@ -0,0 +1,10 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/primitives'; + +export const BlueskyIcon = () => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/index.js b/packages/block-library/src/social-link/icons/index.js index 46c8c6d5acc6ef..422ff6f02dd20e 100644 --- a/packages/block-library/src/social-link/icons/index.js +++ b/packages/block-library/src/social-link/icons/index.js @@ -1,6 +1,7 @@ export * from './amazon'; export * from './bandcamp'; export * from './behance'; +export * from './bluesky'; export * from './chain'; export * from './codepen'; export * from './deviantart'; diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index b203a662822f59..9b803e1441c6c6 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -142,6 +142,10 @@ function block_core_social_link_services( $service = '', $field = '' ) { 'name' => 'Behance', 'icon' => '', ), + 'bluesky' => array( + 'name' => 'Bluesky', + 'icon' => '', + ), 'chain' => array( 'name' => 'Link', 'icon' => '', diff --git a/packages/block-library/src/social-link/socials-with-bg.scss b/packages/block-library/src/social-link/socials-with-bg.scss index 6a5906483b5dfb..760bebcee767c5 100644 --- a/packages/block-library/src/social-link/socials-with-bg.scss +++ b/packages/block-library/src/social-link/socials-with-bg.scss @@ -18,6 +18,11 @@ color: #fff; } +.wp-social-link-bluesky { + background-color: #0085ff; + color: #fff; +} + .wp-social-link-codepen { background-color: #1e1f26; color: #fff; diff --git a/packages/block-library/src/social-link/socials-without-bg.scss b/packages/block-library/src/social-link/socials-without-bg.scss index 85e0c4f6af4d71..50721b44d89845 100644 --- a/packages/block-library/src/social-link/socials-without-bg.scss +++ b/packages/block-library/src/social-link/socials-without-bg.scss @@ -10,6 +10,10 @@ color: #0757fe; } +.wp-social-link-bluesky { + color: #0085ff; +} + .wp-social-link-codepen { color: #1e1f26; } diff --git a/packages/block-library/src/social-link/variations.js b/packages/block-library/src/social-link/variations.js index af3219d2084c82..65e876338924c6 100644 --- a/packages/block-library/src/social-link/variations.js +++ b/packages/block-library/src/social-link/variations.js @@ -5,6 +5,7 @@ import { AmazonIcon, BandcampIcon, BehanceIcon, + BlueskyIcon, ChainIcon, CodepenIcon, DeviantArtIcon, @@ -83,6 +84,12 @@ const variations = [ title: 'Behance', icon: BehanceIcon, }, + { + name: 'bluesky', + attributes: { service: 'bluesky' }, + title: 'Bluesky', + icon: BlueskyIcon, + }, { name: 'chain', attributes: { service: 'chain' }, diff --git a/test/integration/fixtures/blocks/core__social-link-bluesky.html b/test/integration/fixtures/blocks/core__social-link-bluesky.html new file mode 100644 index 00000000000000..3189c247c825fb --- /dev/null +++ b/test/integration/fixtures/blocks/core__social-link-bluesky.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__social-link-bluesky.json b/test/integration/fixtures/blocks/core__social-link-bluesky.json new file mode 100644 index 00000000000000..334725c6441810 --- /dev/null +++ b/test/integration/fixtures/blocks/core__social-link-bluesky.json @@ -0,0 +1,11 @@ +[ + { + "name": "core/social-link", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "service": "threads" + }, + "innerBlocks": [] + } +] diff --git a/test/integration/fixtures/blocks/core__social-link-bluesky.parsed.json b/test/integration/fixtures/blocks/core__social-link-bluesky.parsed.json new file mode 100644 index 00000000000000..31274f0ac3e943 --- /dev/null +++ b/test/integration/fixtures/blocks/core__social-link-bluesky.parsed.json @@ -0,0 +1,11 @@ +[ + { + "blockName": "core/social-link-threads", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "", + "innerContent": [] + } +] diff --git a/test/integration/fixtures/blocks/core__social-link-bluesky.serialized.html b/test/integration/fixtures/blocks/core__social-link-bluesky.serialized.html new file mode 100644 index 00000000000000..cc93afc92ce47b --- /dev/null +++ b/test/integration/fixtures/blocks/core__social-link-bluesky.serialized.html @@ -0,0 +1 @@ +