-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Newsletter: Remove newsletter byline setting feature flag (#37997)
- Loading branch information
Showing
2 changed files
with
110 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,10 +162,6 @@ const EmailSettings = props => { | |
const exampleEmail = | ||
subscriptionReplyTo !== 'author' ? '[email protected]' : '[email protected]'; | ||
|
||
//Check for feature flag | ||
const urlParams = new URLSearchParams( window.location.search ); | ||
const isBylineEnabled = urlParams.get( 'enable-byline' ) === 'true'; | ||
|
||
return ( | ||
<SettingsCard | ||
{ ...props } | ||
|
@@ -199,123 +195,121 @@ const EmailSettings = props => { | |
onChange={ handleEnableFeaturedImageInEmailToggleChange } | ||
/> | ||
</SettingsGroup> | ||
{ isBylineEnabled && ( | ||
<SettingsGroup | ||
hasChild | ||
disableInOfflineMode | ||
disableInSiteConnectionMode | ||
module={ subscriptionsModule } | ||
className="newsletter-group" | ||
> | ||
<FormLegend className="jp-form-label-wide"> | ||
{ __( 'Email byline', 'jetpack' ) } | ||
<Chip type="new" text={ __( 'New', 'jetpack' ) } /> | ||
</FormLegend> | ||
<p> | ||
{ __( | ||
'Customize the information you want to display below your post title in emails.', | ||
'jetpack' | ||
) } | ||
</p> | ||
<BylinePreview | ||
isGravatarEnabled={ bylineState.isGravatarEnabled } | ||
isAuthorEnabled={ bylineState.isAuthorEnabled } | ||
isPostDateEnabled={ bylineState.isPostDateEnabled } | ||
gravatar={ gravatar } | ||
displayName={ displayName } | ||
dateExample={ dateExample } | ||
/> | ||
<div className="email-settings__gravatar"> | ||
<ToggleControl | ||
disabled={ gravatarInputDisabled } | ||
checked={ isGravatarEnabled } | ||
toogling={ isSavingAnyOption( [ GRAVATER_OPTION ] ) } | ||
label={ | ||
<span className="jp-form-toggle-explanation"> | ||
{ __( 'Show author avatar on your emails', 'jetpack' ) } | ||
</span> | ||
} | ||
onChange={ handleEnableGravatarToggleChange } | ||
/> | ||
{ bylineState.isGravatarEnabled && ( | ||
<div className="email-settings__help-info"> | ||
<div className="email-settings__gravatar-help-info"> | ||
<img src={ gravatar } className="email-settings__gravatar-image" alt="" /> | ||
<div> | ||
<div className="email-settings__gravatar-help-text"> | ||
{ __( | ||
'We use Gravatar, a service that associates an avatar image with your primary email address.', | ||
'jetpack' | ||
) } | ||
</div> | ||
<JetpackButton | ||
isExternalLink={ true } | ||
href="https://gravatar.com/profile/avatars" | ||
variant="secondary" | ||
size="small" | ||
> | ||
{ __( 'Update your Gravatar', 'jetpack' ) } | ||
</JetpackButton> | ||
</div> | ||
</div> | ||
</div> | ||
) } | ||
<SupportInfo | ||
text={ sprintf( | ||
// translators: %s is the user's email address | ||
__( | ||
"The avatar comes from Gravatar, a universal avatar service. Your image may also appear on other sites using Gravatar when you're logged in with %s.", | ||
'jetpack' | ||
), | ||
) } | ||
privacyLink="https://support.gravatar.com/account/data-privacy/" | ||
/> | ||
</div> | ||
<ToggleControl | ||
disabled={ authorInputDisabled } | ||
checked={ isAuthorEnabled } | ||
toogling={ isSavingAnyOption( [ AUTHOR_OPTION ] ) } | ||
label={ | ||
<span className="jp-form-toggle-explanation"> | ||
{ __( 'Show author display name', 'jetpack' ) } | ||
</span> | ||
} | ||
onChange={ handleEnableAuthorToggleChange } | ||
/> | ||
|
||
<SettingsGroup | ||
hasChild | ||
disableInOfflineMode | ||
disableInSiteConnectionMode | ||
module={ subscriptionsModule } | ||
className="newsletter-group" | ||
> | ||
<FormLegend className="jp-form-label-wide"> | ||
{ __( 'Email byline', 'jetpack' ) } | ||
<Chip type="new" text={ __( 'New', 'jetpack' ) } /> | ||
</FormLegend> | ||
<p> | ||
{ __( | ||
'Customize the information you want to display below your post title in emails.', | ||
'jetpack' | ||
) } | ||
</p> | ||
<BylinePreview | ||
isGravatarEnabled={ bylineState.isGravatarEnabled } | ||
isAuthorEnabled={ bylineState.isAuthorEnabled } | ||
isPostDateEnabled={ bylineState.isPostDateEnabled } | ||
gravatar={ gravatar } | ||
displayName={ displayName } | ||
dateExample={ dateExample } | ||
/> | ||
<div className="email-settings__gravatar"> | ||
<ToggleControl | ||
disabled={ postDateInputDisabled } | ||
checked={ isPostDateEnabled } | ||
toogling={ isSavingAnyOption( [ POST_DATE_OPTION ] ) } | ||
disabled={ gravatarInputDisabled } | ||
checked={ isGravatarEnabled } | ||
toogling={ isSavingAnyOption( [ GRAVATER_OPTION ] ) } | ||
label={ | ||
<span className="jp-form-toggle-explanation"> | ||
{ __( 'Add the post date', 'jetpack' ) } | ||
{ __( 'Show author avatar on your emails', 'jetpack' ) } | ||
</span> | ||
} | ||
onChange={ handleEnablePostDateToggleChange } | ||
onChange={ handleEnableGravatarToggleChange } | ||
/> | ||
{ bylineState.isPostDateEnabled && ( | ||
{ bylineState.isGravatarEnabled && ( | ||
<div className="email-settings__help-info"> | ||
{ createInterpolateElement( | ||
__( | ||
'You can customize the date format in your site’s <settingsLink>general settings</settingsLink>', | ||
'jetpack' | ||
), | ||
{ | ||
settingsLink: ( | ||
<JetpackButton | ||
variant="link" | ||
isExternalLink={ true } | ||
href={ adminUrl + 'options-general.php' } | ||
/> | ||
), | ||
} | ||
) } | ||
<div className="email-settings__gravatar-help-info"> | ||
<img src={ gravatar } className="email-settings__gravatar-image" alt="" /> | ||
<div> | ||
<div className="email-settings__gravatar-help-text"> | ||
{ __( | ||
'We use Gravatar, a service that associates an avatar image with your primary email address.', | ||
'jetpack' | ||
) } | ||
</div> | ||
<JetpackButton | ||
isExternalLink={ true } | ||
href="https://gravatar.com/profile/avatars" | ||
variant="secondary" | ||
size="small" | ||
> | ||
{ __( 'Update your Gravatar', 'jetpack' ) } | ||
</JetpackButton> | ||
</div> | ||
</div> | ||
</div> | ||
) } | ||
</SettingsGroup> | ||
) } | ||
<SupportInfo | ||
text={ sprintf( | ||
// translators: %s is the user's email address | ||
__( | ||
"The avatar comes from Gravatar, a universal avatar service. Your image may also appear on other sites using Gravatar when you're logged in with %s.", | ||
'jetpack' | ||
), | ||
) } | ||
privacyLink="https://support.gravatar.com/account/data-privacy/" | ||
/> | ||
</div> | ||
<ToggleControl | ||
disabled={ authorInputDisabled } | ||
checked={ isAuthorEnabled } | ||
toogling={ isSavingAnyOption( [ AUTHOR_OPTION ] ) } | ||
label={ | ||
<span className="jp-form-toggle-explanation"> | ||
{ __( 'Show author display name', 'jetpack' ) } | ||
</span> | ||
} | ||
onChange={ handleEnableAuthorToggleChange } | ||
/> | ||
|
||
<ToggleControl | ||
disabled={ postDateInputDisabled } | ||
checked={ isPostDateEnabled } | ||
toogling={ isSavingAnyOption( [ POST_DATE_OPTION ] ) } | ||
label={ | ||
<span className="jp-form-toggle-explanation"> | ||
{ __( 'Add the post date', 'jetpack' ) } | ||
</span> | ||
} | ||
onChange={ handleEnablePostDateToggleChange } | ||
/> | ||
{ bylineState.isPostDateEnabled && ( | ||
<div className="email-settings__help-info"> | ||
{ createInterpolateElement( | ||
__( | ||
'You can customize the date format in your site’s <settingsLink>general settings</settingsLink>', | ||
'jetpack' | ||
), | ||
{ | ||
settingsLink: ( | ||
<JetpackButton | ||
variant="link" | ||
isExternalLink={ true } | ||
href={ adminUrl + 'options-general.php' } | ||
/> | ||
), | ||
} | ||
) } | ||
</div> | ||
) } | ||
</SettingsGroup> | ||
<SettingsGroup | ||
hasChild | ||
disableInOfflineMode | ||
|
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/update-remove-newsletter-byline-setting-feature-flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: enhancement | ||
|
||
Newsletter: Now you can manage how your newsletter byline appears to your users |