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

Try: Polish labels and consolidate options in preferences. #33133

Merged
merged 4 commits into from
Jul 7, 2021
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
51 changes: 25 additions & 26 deletions packages/edit-post/src/components/preferences-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ export default function PreferencesModal() {
<>
{ isLargeViewport && (
<Section
title={ __( 'Choose your own experience' ) }
title={ __( 'Publishing' ) }
description={ __(
'Change options related to publishing.'
) }
>
<EnablePublishSidebarOption
help={ __(
Expand All @@ -94,7 +97,12 @@ export default function PreferencesModal() {
</Section>
) }

<Section title={ __( 'Decide what to focus on' ) }>
<Section
title={ __( 'Appearance' ) }
description={ __(
'Customize options related to the block editor interface and editing flow.'
) }
>
<EnableFeature
featureName="reducedUI"
help={ __(
Expand All @@ -109,6 +117,18 @@ export default function PreferencesModal() {
) }
label={ __( 'Spotlight mode' ) }
/>
<EnableFeature
featureName="showIconLabels"
help={ __( 'Shows text instead of icons.' ) }
label={ __( 'Display button labels' ) }
/>
<EnableFeature
featureName="themeStyles"
help={ __(
'Make the editor look like your theme.'
) }
label={ __( 'Use theme styles' ) }
/>
{ showBlockBreadcrumbsOption && (
<EnableFeature
featureName="showBlockBreadcrumbs"
Expand All @@ -122,36 +142,15 @@ export default function PreferencesModal() {
</>
),
},
{
name: 'appearance',
tabLabel: __( 'Appearance' ),
content: (
<Section title={ __( 'Choose the way it looks' ) }>
<EnableFeature
featureName="showIconLabels"
help={ __(
'Shows text instead of icons in toolbar.'
) }
label={ __( 'Display button labels' ) }
/>
<EnableFeature
featureName="themeStyles"
help={ __(
'Make the editor look like your theme.'
) }
label={ __( 'Use theme styles' ) }
/>
</Section>
),
},
{
name: 'blocks',
tabLabel: __( 'Blocks' ),
content: (
<>
<Section
title={ __(
'Choose how you interact with blocks'
title={ __( 'Block interactions' ) }
description={ __(
'Customize how you interact with blocks in the block library and editing canvas.'
) }
>
<EnableFeature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ exports[`PreferencesModal should match snapshot when the modal is active large v
"name": "general",
"title": "General",
},
Object {
"name": "appearance",
"title": "Appearance",
},
Object {
"name": "blocks",
"title": "Blocks",
Expand Down Expand Up @@ -56,11 +52,6 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
navigateToMenu="general"
title="General"
/>
<NavigationItem
key="appearance"
navigateToMenu="appearance"
title="Appearance"
/>
<NavigationItem
key="blocks"
navigateToMenu="blocks"
Expand All @@ -80,7 +71,8 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
>
<NavigationItem>
<Section
title="Decide what to focus on"
description="Customize options related to the block editor interface and editing flow."
title="Appearance"
>
<WithSelect(WithDispatch(BaseOption))
featureName="reducedUI"
Expand All @@ -92,34 +84,21 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
help="Highlights the current block and fades other content."
label="Spotlight mode"
/>
<WithSelect(WithDispatch(BaseOption))
featureName="showBlockBreadcrumbs"
help="Shows block breadcrumbs at the bottom of the editor."
label="Display block breadcrumbs"
/>
</Section>
</NavigationItem>
</NavigationMenu>
<NavigationMenu
key="appearance-menu"
menu="appearance"
parentMenu="preferences-menu"
title="Appearance"
>
<NavigationItem>
<Section
title="Choose the way it looks"
>
<WithSelect(WithDispatch(BaseOption))
featureName="showIconLabels"
help="Shows text instead of icons in toolbar."
help="Shows text instead of icons."
label="Display button labels"
/>
<WithSelect(WithDispatch(BaseOption))
featureName="themeStyles"
help="Make the editor look like your theme."
label="Use theme styles"
/>
<WithSelect(WithDispatch(BaseOption))
featureName="showBlockBreadcrumbs"
help="Shows block breadcrumbs at the bottom of the editor."
label="Display block breadcrumbs"
/>
</Section>
</NavigationItem>
</NavigationMenu>
Expand All @@ -131,7 +110,8 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
>
<NavigationItem>
<Section
title="Choose how you interact with blocks"
description="Customize how you interact with blocks in the block library and editing canvas."
title="Block interactions"
>
<WithSelect(WithDispatch(BaseOption))
featureName="mostUsedBlocks"
Expand Down