Fix attributes modal incorrect notice (#40976)

* Remove modal copy

* Fix styles

* Add changelog

* Fix build error
This commit is contained in:
Fernando Marichal 2023-10-31 13:18:32 -03:00 committed by GitHub
parent 335284b31b
commit bae33f34de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Fix attributes modal incorrect notice #40976

View File

@ -99,10 +99,6 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
`You can change the attribute's name in <link>Attributes</link>.`, `You can change the attribute's name in <link>Attributes</link>.`,
'woocommerce' 'woocommerce'
), ),
newAttributeModalNotice: __(
'By default, attributes are filterable and visible on the product page. You can change these settings for each attribute separately later.',
'woocommerce'
),
attributeRemoveConfirmationMessage: __( attributeRemoveConfirmationMessage: __(
'Remove this attribute?', 'Remove this attribute?',
'woocommerce' 'woocommerce'
@ -293,7 +289,6 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
<NewAttributeModal <NewAttributeModal
title={ uiStrings.newAttributeModalTitle } title={ uiStrings.newAttributeModalTitle }
description={ uiStrings.newAttributeModalDescription } description={ uiStrings.newAttributeModalDescription }
notice={ uiStrings.newAttributeModalNotice }
onCancel={ () => { onCancel={ () => {
closeNewModal(); closeNewModal();
onNewModalCancel(); onNewModalCancel();

View File

@ -1,5 +1,5 @@
.woocommerce-new-attribute-modal { .woocommerce-new-attribute-modal {
min-width: 50%; min-width: 75%;
.components-notice.is-info { .components-notice.is-info {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;

View File

@ -60,10 +60,7 @@ type AttributeForm = {
export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( { export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( {
title = __( 'Add attributes', 'woocommerce' ), title = __( 'Add attributes', 'woocommerce' ),
description = '', description = '',
notice = __( notice,
'By default, attributes are filterable and visible on the product page. You can change these settings for each attribute separately later.',
'woocommerce'
),
attributeLabel = __( 'Attribute', 'woocommerce' ), attributeLabel = __( 'Attribute', 'woocommerce' ),
valueLabel = __( 'Values', 'woocommerce' ), valueLabel = __( 'Values', 'woocommerce' ),
attributePlaceholder = __( 'Search or create attribute', 'woocommerce' ), attributePlaceholder = __( 'Search or create attribute', 'woocommerce' ),