Skip to content

Commit

Permalink
Try: Polish labels and consolidate options in preferences. (#33133)
Browse files Browse the repository at this point in the history
* Try: Polish labels and consolidate options in preferences.

* Fix typo.

* Rephrase text labels option.

* Update snapshots.
  • Loading branch information
jasmussen authored and sarayourfriend committed Jul 15, 2021
1 parent cc28b4d commit d859bae
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 56 deletions.
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

0 comments on commit d859bae

Please sign in to comment.