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

Site Editor: Rename left sidebar → block library #26517

Merged
merged 1 commit into from
Nov 9, 2020
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
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/block-icon/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Block Icon

The BlockIcon component provides an icon for blocks in different places in the editor: the toolbar of a selected block, the placeholders of certain blocks (gallery, image), the block insertion panel of the editor or the left sidebar.
The BlockIcon component provides an icon for blocks in different places in the editor: the toolbar of a selected block, the placeholders of certain blocks (gallery, image), the block insertion panel of the editor or the secondary sidebar.

The rendered an [Icon](https://github.com/WordPress/gutenberg/tree/master/packages/components/src/icon) component with default styles.

Expand All @@ -26,4 +26,4 @@ const MyBlockIcon = () => <BlockIcon icon={ icon } />

## Related components

Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [`BlockEditorProvider`](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/provider/README.md) in the components tree.
Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [`BlockEditorProvider`](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/provider/README.md) in the components tree.
6 changes: 3 additions & 3 deletions packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import ActionsPanel from './actions-panel';
import PopoverWrapper from './popover-wrapper';

const interfaceLabels = {
leftSidebar: __( 'Block library' ),
secondarySidebar: __( 'Block library' ),
/* translators: accessibility text for the editor top bar landmark region. */
header: __( 'Editor top bar' ),
/* translators: accessibility text for the editor content landmark region. */
Expand Down Expand Up @@ -149,7 +149,7 @@ function Layout() {
}, [ isInserterOpened, isHugeViewport ] );

// Local state for save panel.
// Note 'thruthy' callback implies an open panel.
// Note 'truthy' callback implies an open panel.
const [
entitiesSavedStatesCallback,
setEntitiesSavedStatesCallback,
Expand Down Expand Up @@ -185,7 +185,7 @@ function Layout() {
}
/>
}
leftSidebar={
secondarySidebar={
mode === 'visual' &&
isInserterOpened && (
<PopoverWrapper
Expand Down
4 changes: 2 additions & 2 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import GlobalStylesProvider from './global-styles-provider';
import NavigationSidebar from '../navigation-sidebar';

const interfaceLabels = {
leftSidebar: __( 'Block Library' ),
secondarySidebar: __( 'Block Library' ),
drawer: __( 'Navigation Sidebar' ),
};

Expand Down Expand Up @@ -221,7 +221,7 @@ function Editor() {
drawer={
<NavigationSidebar />
}
leftSidebar={
secondarySidebar={
isInserterOpen ? (
<div className="edit-site-editor__inserter-panel">
<div className="edit-site-editor__inserter-panel-header">
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-widgets/src/components/layout/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Interface( { blockEditorSettings } ) {
<InterfaceSkeleton
labels={ interfaceLabels }
header={ <Header /> }
leftSidebar={
secondarySidebar={
isInserterOpened && (
<PopoverWrapper
className="edit-widgets-layout__inserter-panel-popover-wrapper"
Expand Down
14 changes: 7 additions & 7 deletions packages/interface/src/components/interface-skeleton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function InterfaceSkeleton( {
footer,
header,
sidebar,
leftSidebar,
secondarySidebar,
content,
drawer,
actions,
Expand All @@ -44,8 +44,8 @@ function InterfaceSkeleton( {
header: __( 'Header' ),
/* translators: accessibility text for the content landmark region. */
body: __( 'Content' ),
/* translators: accessibility text for the left sidebar landmark region. */
leftSidebar: __( 'Left sidebar' ),
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar: __( 'Block Library' ),
/* translators: accessibility text for the settings landmark region. */
sidebar: __( 'Settings' ),
/* translators: accessibility text for the publish landmark region. */
Expand Down Expand Up @@ -84,14 +84,14 @@ function InterfaceSkeleton( {
</div>
) }
<div className="interface-interface-skeleton__body">
{ !! leftSidebar && (
{ !! secondarySidebar && (
<div
className="interface-interface-skeleton__left-sidebar"
className="interface-interface-skeleton__secondary-sidebar"
role="region"
aria-label={ mergedLabels.leftSidebar }
aria-label={ mergedLabels.secondarySidebar }
tabIndex="-1"
>
{ leftSidebar }
{ secondarySidebar }
</div>
) }
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ html.interface-interface-skeleton__html-container {

}

.interface-interface-skeleton__left-sidebar,
.interface-interface-skeleton__secondary-sidebar,
.interface-interface-skeleton__sidebar {
display: block;
flex-shrink: 0;
Expand Down Expand Up @@ -113,7 +113,7 @@ html.interface-interface-skeleton__html-container {
}
}

.interface-interface-skeleton__left-sidebar {
.interface-interface-skeleton__secondary-sidebar {
@include break-medium() {
border-right: $border-width solid $gray-200;
}
Expand Down