Skip to content
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
1 change: 1 addition & 0 deletions packages/core/src/editor/Block.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ NESTED BLOCKS

/* HEADINGS*/
[data-content-type="heading"] {
padding-top: 18px;
--level: 3em;
}
[data-content-type="heading"][data-level="2"] {
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/editor/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ inline styles, it is added to the base z-index. */
}

.bn-side-menu[data-block-type="heading"][data-level="1"] {
height: 78px;
height: 108px;
}

.bn-side-menu[data-block-type="heading"][data-level="2"] {
height: 54px;
height: 84px;
}

.bn-side-menu[data-block-type="heading"][data-level="3"] {
height: 37px;
height: 67px;
}
Comment on lines 245 to 255
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add side-menu height overrides for heading levels 4–6.

packages/core/src/editor/Block.css Line 130 applies extra top spacing to all headings, but this file only re-centers side-menu rows for levels 1–3. Levels 4–6 still use the 30px fallback and will be vertically off.

💡 Proposed CSS extension
 .bn-side-menu[data-block-type="heading"][data-level="3"] {
   height: 67px;
 }
+
+.bn-side-menu[data-block-type="heading"][data-level="4"] {
+  height: 60px;
+}
+
+.bn-side-menu[data-block-type="heading"][data-level="5"] {
+  height: 58px;
+}
+
+.bn-side-menu[data-block-type="heading"][data-level="6"] {
+  height: 55px;
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/react/src/editor/styles.css` around lines 245 - 255, The side-menu
misses height overrides for heading levels 4–6 so those rows remain vertically
offset; add selectors matching the existing pattern
(.bn-side-menu[data-block-type="heading"][data-level="4"],
..."[data-level="5"]", "[data-level="6"]) and set explicit height values for
each to re-center the side-menu rows (compute heights the same way you did for
levels 1–3 so they account for the extra top spacing applied in Block.css,
matching the centering logic used in
.bn-side-menu[data-block-type="heading"][data-level="1"/"2"/"3"]).


.bn-side-menu[data-block-type="file"] {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions tests/src/end-to-end/multicolumn/multicolumn.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { test } from "../../setup/setupScript.js";
import {
BULLET_LIST_SELECTOR,
H_ONE_BLOCK_SELECTOR,
MULTI_COLUMN_URL,
} from "../../utils/const.js";
import { BULLET_LIST_SELECTOR, MULTI_COLUMN_URL } from "../../utils/const.js";
import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js";

test.describe.configure({ mode: "serial" });
Expand All @@ -16,10 +12,11 @@ test.describe("Check Multi-Column Behaviour", () => {
test("Check Delete before column", async ({ page }) => {
await focusOnEditor(page);

await page.click(H_ONE_BLOCK_SELECTOR);
await page.keyboard.press("ArrowRight");
await page.keyboard.press("ArrowRight");
await page.keyboard.press("ArrowRight");
await page
// eslint-disable-next-line testing-library/prefer-screen-queries
.getByText("You can have multiple blocks in a column too")
.click({ position: { x: 1, y: 1 } });
await page.keyboard.press("ArrowLeft");

await page.keyboard.press("Delete");

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading