Skip to content

Commit 69fd855

Browse files
authored
experimental: Set the menu items height along with the content mode shortcut and name (#4494)
## Description - 24px height for menu items - drive-by: content mode + shortcut cmd+c ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent 539e083 commit 69fd855

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

apps/builder/app/builder/features/topbar/builder-mode.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export const BuilderModeDropDown = () => {
5555
content: {
5656
icon: <NotebookAndPenIcon />,
5757
description: "Modify the page content",
58-
title: "Build",
59-
shortcut: ["cmd", "shift", "b"],
58+
title: "Content",
59+
shortcut: ["cmd", "shift", "c"],
6060
enabled: isContentModeAllowed,
6161
},
6262
preview: {
@@ -115,10 +115,7 @@ export const BuilderModeDropDown = () => {
115115
onFocus={handleFocus(mode as BuilderMode)}
116116
onBlur={handleBlur}
117117
>
118-
<Flex
119-
css={{ py: theme.spacing[4], px: theme.spacing[5] }}
120-
gap={2}
121-
>
118+
<Flex css={{ px: theme.spacing[3] }} gap={2}>
122119
{icon}
123120
<Box>{title}</Box>
124121
</Flex>

apps/builder/app/builder/features/workspace/canvas-tools/outline/block-instance-outline.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,7 @@ const TemplatesMenu = ({
284284
{...{ [skipInertHandlersAttribute]: true }}
285285
data-yyy
286286
>
287-
<Flex
288-
css={{ py: theme.spacing[4], px: theme.spacing[5] }}
289-
gap={2}
290-
data-xxx
291-
>
287+
<Flex css={{ px: theme.spacing[3] }} gap={2} data-xxx>
292288
{icon}
293289
<Box>{title}</Box>
294290
</Flex>
@@ -301,7 +297,7 @@ const TemplatesMenu = ({
301297
<Grid css={{ width: theme.spacing[25] }}>
302298
<Flex gap={1} css={{ display: hasChildren ? "none" : undefined }}>
303299
<Kbd value={["click"]} />
304-
<Text>to add first</Text>
300+
<Text>to add before</Text>
305301
</Flex>
306302

307303
<Flex

apps/builder/app/builder/shared/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ export const { emitCommand, subscribeCommands } = createCommandsEmitter({
178178
},
179179
},
180180
{
181-
name: "toggleBuildMode",
182-
defaultHotkeys: ["meta+shift+b", "ctrl+shift+b"],
181+
name: "toggleContentMode",
182+
defaultHotkeys: ["meta+shift+c", "ctrl+shift+c"],
183183
handler: () => {
184184
setActiveSidebarPanel("auto");
185185
toggleBuilderMode("content");

0 commit comments

Comments
 (0)