Skip to content

Commit

Permalink
Social Change/move auto conversion notice up (#33106)
Browse files Browse the repository at this point in the history
* Move auto-conversion notice to the other notices

* changelog

* Fixup versions

* Update text in notice
  • Loading branch information
gmjuhasz authored Sep 15, 2023
1 parent 3dfbeb3 commit 42e13f4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Move auto-conversion notice near the Instagram one
2 changes: 1 addition & 1 deletion projects/js-packages/publicize-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-publicize-components",
"version": "0.37.1-alpha",
"version": "0.38.0-alpha",
"description": "A library of JS components required by the Publicize editor plugin",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/publicize-components/#readme",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,33 @@ export default function PublicizeForm( {
) }
</Notice>
) }
{ shouldAutoConvert &&
showValidationNotice &&
mediaId &&
shouldShowNotice( NOTICES.autoConversion ) && (
<Notice
type={ 'warning' }
actions={ [
<Button onClick={ onAutoConversionNoticeDismiss } key="dismiss" variant="primary">
{ __( 'Got it', 'jetpack' ) }
</Button>,
<Button
className={ styles[ 'change-settings-button' ] }
key="change-settings"
href={ adminUrl || jetpackSharingSettingsUrl }
target="_blank"
rel="noreferrer noopener"
>
{ __( 'Change settings', 'jetpack' ) }
</Button>,
] }
>
{ __(
'When your post is published, the selected image will be converted for maximum compatibility across your connected social networks.',
'jetpack'
) }
</Notice>
) }
</>
);

Expand Down Expand Up @@ -418,39 +445,6 @@ export default function PublicizeForm( {
)
: null
}
CustomNotice={
shouldAutoConvert &&
showValidationNotice &&
mediaId &&
shouldShowNotice( NOTICES.autoConversion ) && (
<Notice
type={ 'warning' }
actions={ [
<Button
onClick={ onAutoConversionNoticeDismiss }
key="dismiss"
variant="primary"
>
{ __( 'Got it', 'jetpack' ) }
</Button>,
<Button
className={ styles[ 'change-settings-button' ] }
key="change-settings"
href={ adminUrl || jetpackSharingSettingsUrl }
target="_blank"
rel="noreferrer noopener"
>
{ __( 'Change settings', 'jetpack' ) }
</Button>,
] }
>
{ __(
'When your post is published, this image will be converted for maximum compatibility across your connected social networks.',
'jetpack'
) }
</Notice>
)
}
/>
) }
</Fragment>
Expand Down

0 comments on commit 42e13f4

Please sign in to comment.