Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(content-distribution): update icon to broadcast #214

Merged
merged 4 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/content-distribution/class-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static function add_distribution_column( $columns, $post_type ) {
$columns['content_distribution'] = sprintf(
'<span title="%1$s">%2$s <span class="screen-reader-text">%1$s</span></span>',
esc_attr__( 'Content Distribution', 'newspack-network' ),
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" style="margin: -2px 0 -6px;"><path d="M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"></path></svg>'
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" style="margin: -2px 0 -6px;"><path d="M11.2 13h1.5v7h-1.5v-7ZM7.4 5.6l.5-.5L6.8 4l-.5.5c-3.1 3.1-3.1 8.2 0 11.3l.5.5 1.1-1.1-.5-.5c-2.5-2.5-2.5-6.7 0-9.2Zm2.7 1.6L9 6.1l-.5.5c-2 2-2 5.1 0 7.1l.5.5 1.1-1.1-.5-.5c-1.4-1.4-1.4-3.6 0-4.9l.5-.5Zm1.9 2c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1ZM17.1 4 16 5.1l.5.5c2.5 2.5 2.5 6.7 0 9.2l-.5.5 1.1 1.1.5-.5c3.1-3.1 3.1-8.2 0-11.3l-.5-.5Zm-1.6 2.7-.5-.5-1.1 1.1.5.5c1.4 1.4 1.4 3.6 0 4.9l-.5.5 1.1 1.1.5-.5c2-2 2-5.1 0-7.1Z" fill="#406ebc"></path></svg>'
);
return $columns;
}
Expand Down Expand Up @@ -266,7 +266,7 @@ public static function add_posts_column_styles() {
display: inline-block;
}
.wp-list-table .column-content_distribution a svg {
fill: #2271b1;
fill: currentcolor;
}
</style>
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { PluginSidebar } from '@wordpress/editor';
import { Flex, Panel, PanelBody } from '@wordpress/components';
import { globe } from '@wordpress/icons';
import { broadcast } from '../../icons';

/**
* Internal dependencies.
Expand All @@ -15,7 +15,7 @@ const ContentDistributionPanel = ({ header, body, footer, buttons }) => {
return (
<PluginSidebar
name="newspack-network-content-distribution-panel"
icon={ globe }
icon={ broadcast }
title={ __( 'Distribute', 'newspack-network' ) }
className="newspack-network-content-distribution-panel"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@
margin: 0;
}
}

.editor-header {
.components-button.is-pressed {
path[fill="#406ebc"] {
fill: currentColor;
}
}
}
4 changes: 2 additions & 2 deletions src/content-distribution/incoming-post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { __, sprintf } from '@wordpress/i18n';
import { useEffect, useState } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
import { Button, __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
import { globe } from '@wordpress/icons';
import { broadcast } from '../../icons';
import { registerPlugin } from '@wordpress/plugins';

/**
Expand Down Expand Up @@ -179,5 +179,5 @@ function IncomingPost() {

registerPlugin( 'newspack-network-incoming-post', {
render: IncomingPost,
icon: globe,
icon: broadcast,
} );
4 changes: 2 additions & 2 deletions src/content-distribution/outgoing-post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { sprintf, __, _n } from '@wordpress/i18n';
import { useState, useEffect } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { CheckboxControl, TextControl, Button } from '@wordpress/components';
import { globe } from '@wordpress/icons';
import { broadcast } from '../../icons';
import { registerPlugin } from '@wordpress/plugins';

/**
Expand Down Expand Up @@ -246,5 +246,5 @@ function OutgoingPost() {

registerPlugin( 'newspack-network-outgoing-post', {
render: OutgoingPost,
icon: globe,
icon: broadcast,
} );
15 changes: 15 additions & 0 deletions src/icons/broadcast.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const broadcast = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
d="M11.2 13h1.5v7h-1.5v-7ZM7.4 5.6l.5-.5L6.8 4l-.5.5c-3.1 3.1-3.1 8.2 0 11.3l.5.5 1.1-1.1-.5-.5c-2.5-2.5-2.5-6.7 0-9.2Zm2.7 1.6L9 6.1l-.5.5c-2 2-2 5.1 0 7.1l.5.5 1.1-1.1-.5-.5c-1.4-1.4-1.4-3.6 0-4.9l.5-.5Zm1.9 2c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1ZM17.1 4 16 5.1l.5.5c2.5 2.5 2.5 6.7 0 9.2l-.5.5 1.1 1.1.5-.5c3.1-3.1 3.1-8.2 0-11.3l-.5-.5Zm-1.6 2.7-.5-.5-1.1 1.1.5.5c1.4 1.4 1.4 3.6 0 4.9l-.5.5 1.1 1.1.5-.5c2-2 2-5.1 0-7.1Z"
fill="#406ebc"
/>
</SVG>
);

export default broadcast;
1 change: 1 addition & 0 deletions src/icons/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as drafts } from './drafts';
export { default as published } from './published';
export { default as broadcast } from './broadcast';
export { default as pending } from './pending';