Skip to content

Commit

Permalink
Save Panel: Remove connections icon and fix padding (#62542)
Browse files Browse the repository at this point in the history
* Remove connections icon and fix padding

* Reuse Global Styles changes design for meta changes

* Update test

Co-authored-by: artemiomorales <artemiosans@git.wordpress.org>
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
6 people authored and ellatrix committed Jun 18, 2024
1 parent 37cd980 commit 0c11bd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/**
* WordPress dependencies
*/
import { Icon, CheckboxControl, Flex, PanelRow } from '@wordpress/components';
import { CheckboxControl, PanelRow } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { decodeEntities } from '@wordpress/html-entities';
import { connection } from '@wordpress/icons';

/**
* Internal dependencies
Expand Down Expand Up @@ -60,18 +59,9 @@ export default function EntityRecordItem( { record, checked, onChange } ) {
/>
</PanelRow>
{ hasPostMetaChanges && (
<PanelRow>
<Flex className="entities-saved-states__post-meta">
<Icon
className="entities-saved-states__connections-icon"
icon={ connection }
size={ 24 }
/>
<span className="entities-saved-states__bindings-text">
{ __( 'Post Meta.' ) }
</span>
</Flex>
</PanelRow>
<ul className="entities-saved-states__changes">
<li>{ __( 'Post Meta.' ) }</li>
</ul>
) }
</>
);
Expand Down
13 changes: 0 additions & 13 deletions packages/editor/src/components/entities-saved-states/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,3 @@
margin-bottom: $grid-unit-05;
}
}

.entities-saved-states__post-meta {
margin-left: $grid-unit-30;
align-items: center;
}

.entities-saved-states__connections-icon {
flex-grow: 0;
}

.entities-saved-states__bindings-text {
flex-grow: 1;
}
2 changes: 1 addition & 1 deletion test/e2e/specs/editor/various/publish-panel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ test.describe( 'Post publish panel', () => {
await expect( publishPanel ).toBeVisible();

const postMetaPanel = publishPanel.locator(
'.entities-saved-states__post-meta'
'.entities-saved-states__changes'
);

await expect( postMetaPanel ).toBeVisible();
Expand Down

0 comments on commit 0c11bd9

Please sign in to comment.