Skip to content

docs: improve demo on mobile, remove heyo (blo-1013)#2590

Merged
YousefED merged 2 commits intomainfrom
docs/demo-mobile
Mar 25, 2026
Merged

docs: improve demo on mobile, remove heyo (blo-1013)#2590
YousefED merged 2 commits intomainfrom
docs/demo-mobile

Conversation

@YousefED
Copy link
Collaborator

@YousefED YousefED commented Mar 24, 2026

Summary

  • improve mobile demo
  • remove heyo integration

Summary by CodeRabbit

  • Improvements
    • Responsive layout refinements enhance experience on smaller screens
    • Sidebar behavior now intelligently adapts based on device viewport width
    • Export menu interaction improved with enhanced accessibility and focus handling
    • Removed external embed dependencies for a cleaner, streamlined interface

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Mar 24, 2026 6:37pm
blocknote-website Ready Ready Preview Mar 24, 2026 6:37pm

Request Review

@YousefED YousefED changed the title improve demo on mobile, remove heyo (blo-1013) docs: improve demo on mobile, remove heyo (blo-1013) Mar 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9927089f-dc95-4b17-9f9b-fdedb9f8d0f6

📥 Commits

Reviewing files that changed from the base of the PR and between bba36ba and 66b5009.

📒 Files selected for processing (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (1)
  • .gitignore

📝 Walkthrough

Walkthrough

The pull request enhances the demo editor's responsiveness for smaller screens, refactors the export dropdown from CSS-controlled to conditionally rendered based on state, removes external HeYo embed scripts from the demo and pricing pages, and adds .claude to gitignore.

Changes

Cohort / File(s) Summary
Responsive demo UI updates
docs/app/demo/_components/DemoEditor.tsx, docs/app/demo/_components/EditorMenu.tsx
DemoEditor height and header layout now adapt to screen size (500px default, 700px on sm; flex-col to flex-row). EditorMenu export dropdown converted from CSS hover-based to conditionally rendered via exportOpen state with blur handler; button labels and separators hidden on small screens.
External embed removal
docs/app/demo/page.tsx, docs/app/pricing/page.tsx
Removed async script tags that loaded HeYo embed functionality from both pages.
Configuration
.gitignore
Added .claude to version control exclusions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Poem

A rabbit hops through screens so small,
Now layouts dance and respond to all!
With dropdowns clever and embeds removed,
The demo editor's responsive groove.
.claude tucked away in the git-ignore night! 🐰✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal, covering only Summary with two brief bullet points; most required sections (Rationale, Changes, Impact, Testing, Checklist) are missing. Expand the description to include Rationale, detailed Changes, Impact assessment, Testing methodology, and completion of the provided checklist template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: improving mobile demo responsiveness and removing HeYo integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/demo-mobile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2590

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2590

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2590

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2590

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2590

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2590

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2590

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2590

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2590

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2590

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2590

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2590

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2590

commit: 66b5009

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.claude/worktrees/emoji-fixes (1)

15-16: ⚠️ Potential issue | 🟠 Major

Avoid pinning a WIP subproject commit in this PR.

The referenced commit message explicitly says unresolved work remains. Pulling that pointer into this PR risks shipping incomplete behavior unrelated to BLO-1013.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/worktrees/emoji-fixes around lines 15 - 16, The PR includes a pinned
subproject commit with the WIP commit message "WIP: Still need to decouple emoji
height cap from GridSuggestionMenu, add native emoji source for PDF exporter,
and align data sources" from the emoji-fixes worktree; remove that pinned
subproject reference from the commit set (don’t update the submodule pointer to
this WIP SHA), and instead either point the submodule to a stable non-WIP commit
or omit the submodule change entirely so this PR only contains changes for
BLO-1013; locate the submodule update in your commit that references the
emoji-fixes worktree/WIP message and revert that change or replace it with a
clean commit hash before pushing the branch.
.claude/worktrees/fix-pr-2553-port (1)

1-20: ⚠️ Potential issue | 🟠 Major

Remove empty .claude/worktrees subproject pointers from this PR.

These .claude/worktrees/ entries are empty git subproject pointers with no content, zero references in the codebase, and unrelated to the PR objective (mobile demo improvements and Heyo removal). They appear to be development workspace artifacts that should not be committed. Remove all three entries (.claude/worktrees/emoji-fixes, fix-pr-2553-port, and toggle-block-bugs-blo-1018) to keep the PR focused and auditable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/worktrees/fix-pr-2553-port around lines 1 - 20, The PR includes
empty git subproject pointers under .claude/worktrees (emoji-fixes,
fix-pr-2553-port, toggle-block-bugs-blo-1018) that are unrelated to the change;
remove those entries from the branch by deleting the .claude/worktrees/* entries
from the repo index and commit the deletion (e.g. remove the subproject pointer
files or run git rm on those paths and commit), ensuring no other files are
touched and the tests/snapshots changes remain; verify the removals no longer
appear in git status or the PR diff before pushing.
🧹 Nitpick comments (1)
docs/app/demo/_components/EditorMenu.tsx (1)

82-121: Consider adding basic accessibility attributes to the dropdown.

The click-based dropdown works well, but could benefit from accessibility improvements for screen reader users and keyboard navigation.

♿ Optional: Add ARIA attributes
-          <div className="relative" ref={exportRef} onBlur={handleBlur}>
+          <div className="relative" ref={exportRef} onBlur={handleBlur} role="group">
             <button
               className="flex items-center gap-1 rounded-md border border-stone-200 bg-white px-2 py-1 text-xs hover:bg-stone-50"
               disabled={disabled}
               onClick={() => setExportOpen(!exportOpen)}
+              aria-expanded={exportOpen}
+              aria-haspopup="menu"
             >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/app/demo/_components/EditorMenu.tsx` around lines 82 - 121, The Export
dropdown lacks ARIA and keyboard support: update the toggle button (the element
using exportRef, exportOpen, setExportOpen) to include aria-haspopup="menu" and
aria-expanded={exportOpen}, add an onKeyDown handler to open/close with
Enter/Space and close on Escape, mark the popup container with role="menu" and
each option button with role="menuitem" and tabIndex={0}, and ensure the
handleBlur/focus management moves focus into/out of the menu so keyboard users
can navigate the items and the menu closes on blur or Escape; use the existing
onExport calls from the menuitem buttons to keep behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/app/demo/_components/DemoEditor.tsx`:
- Around line 190-193: The state initialization for sidebarOpen in DemoEditor
causes an SSR/client mismatch because it reads window during init; change the
useState initializer to a constant true (useState(true)) and add a useEffect in
the DemoEditor component that on mount reads window.innerWidth (>=768) and calls
setSidebarOpen accordingly; reference the existing sidebarOpen/setSidebarOpen
useState and update logic so the client adjusts after mount rather than during
SSR.

---

Outside diff comments:
In @.claude/worktrees/emoji-fixes:
- Around line 15-16: The PR includes a pinned subproject commit with the WIP
commit message "WIP: Still need to decouple emoji height cap from
GridSuggestionMenu, add native emoji source for PDF exporter, and align data
sources" from the emoji-fixes worktree; remove that pinned subproject reference
from the commit set (don’t update the submodule pointer to this WIP SHA), and
instead either point the submodule to a stable non-WIP commit or omit the
submodule change entirely so this PR only contains changes for BLO-1013; locate
the submodule update in your commit that references the emoji-fixes worktree/WIP
message and revert that change or replace it with a clean commit hash before
pushing the branch.

In @.claude/worktrees/fix-pr-2553-port:
- Around line 1-20: The PR includes empty git subproject pointers under
.claude/worktrees (emoji-fixes, fix-pr-2553-port, toggle-block-bugs-blo-1018)
that are unrelated to the change; remove those entries from the branch by
deleting the .claude/worktrees/* entries from the repo index and commit the
deletion (e.g. remove the subproject pointer files or run git rm on those paths
and commit), ensuring no other files are touched and the tests/snapshots changes
remain; verify the removals no longer appear in git status or the PR diff before
pushing.

---

Nitpick comments:
In `@docs/app/demo/_components/EditorMenu.tsx`:
- Around line 82-121: The Export dropdown lacks ARIA and keyboard support:
update the toggle button (the element using exportRef, exportOpen,
setExportOpen) to include aria-haspopup="menu" and aria-expanded={exportOpen},
add an onKeyDown handler to open/close with Enter/Space and close on Escape,
mark the popup container with role="menu" and each option button with
role="menuitem" and tabIndex={0}, and ensure the handleBlur/focus management
moves focus into/out of the menu so keyboard users can navigate the items and
the menu closes on blur or Escape; use the existing onExport calls from the
menuitem buttons to keep behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fb56ed28-447b-4a91-9cae-3439273ff9e5

📥 Commits

Reviewing files that changed from the base of the PR and between af3737a and bba36ba.

📒 Files selected for processing (7)
  • .claude/worktrees/emoji-fixes
  • .claude/worktrees/fix-pr-2553-port
  • .claude/worktrees/toggle-block-bugs-blo-1018
  • docs/app/demo/_components/DemoEditor.tsx
  • docs/app/demo/_components/EditorMenu.tsx
  • docs/app/demo/page.tsx
  • docs/app/pricing/page.tsx
💤 Files with no reviewable changes (2)
  • docs/app/demo/page.tsx
  • docs/app/pricing/page.tsx

Comment on lines +190 to +193
const [sidebarOpen, setSidebarOpen] = useState(() => {
if (typeof window === "undefined") return true;
return window.innerWidth >= 768;
});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Potential hydration mismatch on mobile devices.

During SSR, window is undefined, so sidebarOpen initializes to true. On client hydration for viewports < 768px, the initial state becomes false. This can cause a React hydration mismatch warning.

Consider deferring the width check to a useEffect to avoid SSR/client state divergence:

🛠️ Suggested fix to avoid hydration mismatch
-  const [sidebarOpen, setSidebarOpen] = useState(() => {
-    if (typeof window === "undefined") return true;
-    return window.innerWidth >= 768;
-  });
+  const [sidebarOpen, setSidebarOpen] = useState(true);
+
+  useEffect(() => {
+    if (window.innerWidth < 768) {
+      setSidebarOpen(false);
+    }
+  }, []);

This ensures SSR and initial client render both start with true, then adjusts based on viewport width after mount.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const [sidebarOpen, setSidebarOpen] = useState(() => {
if (typeof window === "undefined") return true;
return window.innerWidth >= 768;
});
const [sidebarOpen, setSidebarOpen] = useState(true);
useEffect(() => {
if (window.innerWidth < 768) {
setSidebarOpen(false);
}
}, []);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/app/demo/_components/DemoEditor.tsx` around lines 190 - 193, The state
initialization for sidebarOpen in DemoEditor causes an SSR/client mismatch
because it reads window during init; change the useState initializer to a
constant true (useState(true)) and add a useEffect in the DemoEditor component
that on mount reads window.innerWidth (>=768) and calls setSidebarOpen
accordingly; reference the existing sidebarOpen/setSidebarOpen useState and
update logic so the client adjusts after mount rather than during SSR.

Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

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

go ahead & add this when you want

@YousefED YousefED merged commit e519f9c into main Mar 25, 2026
23 checks passed
@YousefED YousefED deleted the docs/demo-mobile branch March 25, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants