Skip to content

Commit fc9a737

Browse files
committed
Changes per review
1 parent a95e107 commit fc9a737

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

docs/manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,12 @@
15171517
"markdown_source": "../packages/blocks/README.md",
15181518
"parent": "packages"
15191519
},
1520+
{
1521+
"title": "@wordpress/boot",
1522+
"slug": "packages-boot",
1523+
"markdown_source": "../packages/boot/README.md",
1524+
"parent": "packages"
1525+
},
15201526
{
15211527
"title": "@wordpress/browserslist-config",
15221528
"slug": "packages-browserslist-config",

packages/boot/src/components/app/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* WordPress dependencies
33
*/
4-
import { createRoot } from '@wordpress/element';
4+
import { createRoot, StrictMode } from '@wordpress/element';
55
import { dispatch } from '@wordpress/data';
66

77
/**
@@ -16,9 +16,6 @@ function App() {
1616
}
1717

1818
export async function init( menuItems: MenuItem[] ) {
19-
// Import the store to ensure it's registered
20-
await import( '../../store' );
21-
2219
// Register menu items
2320
menuItems.forEach( ( menuItem ) => {
2421
// @ts-ignore
@@ -29,6 +26,10 @@ export async function init( menuItems: MenuItem[] ) {
2926
const rootElement = document.getElementById( 'gutenberg-boot-app' );
3027
if ( rootElement ) {
3128
const root = createRoot( rootElement );
32-
root.render( <App /> );
29+
root.render(
30+
<StrictMode>
31+
<App />
32+
</StrictMode>
33+
);
3334
}
3435
}

packages/boot/src/components/site-hub/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { __ } from '@wordpress/i18n';
1212
import { store as coreStore } from '@wordpress/core-data';
1313
import { decodeEntities } from '@wordpress/html-entities';
1414
import { search } from '@wordpress/icons';
15-
import { rawShortcut } from '@wordpress/keycodes';
15+
import { displayShortcut } from '@wordpress/keycodes';
1616
// @ts-expect-error Commands is not typed properly.
1717
import { store as commandsStore } from '@wordpress/commands';
1818
import { filterURLForDisplay } from '@wordpress/url';
@@ -40,8 +40,6 @@ function SiteHub() {
4040
};
4141
}, [] );
4242
const { open: openCommandCenter } = useDispatch( commandsStore );
43-
const label = __( 'Open command palette' );
44-
const shortcutAria = rawShortcut.primary( 'k' );
4543

4644
return (
4745
<div className="boot-site-hub">
@@ -58,8 +56,8 @@ function SiteHub() {
5856
icon={ search }
5957
onClick={ () => openCommandCenter() }
6058
size="compact"
61-
label={ label }
62-
aria-keyshortcuts={ shortcutAria }
59+
label={ __( 'Open command palette' ) }
60+
shortcut={ displayShortcut.primary( 'k' ) }
6361
/>
6462
</HStack>
6563
</div>

0 commit comments

Comments
 (0)