docs: Update docs with mobile PR stack changes - #3097
matthewlipski wants to merge 3 commits into
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (15)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesThe pull request updates BlockNote documentation and examples. It documents focus APIs, portal registration, mobile Formatting Toolbar behavior, viewport configuration, portal targets, styling, and content-query results. No functional implementation changes are described. Editor UI documentation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. A rabbit reads the toolbar guide, Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
|
YousefED
left a comment
There was a problem hiding this comment.
Some generic feedback on the docs @ https://blocknote-website-git-mobile-docs-update-typecell.vercel.app/docs/
- The Android meta workaround is now listed on getting started, but the iOS scroll-container on the mobile formatting toolbar area. wdyt, might be better to make consistent?
- instead of terms like "it's good practice", I'd say "we recommend"
- The warning goes into explaining technicalities.
It's pinned to the visual viewport with position: fixed, so multiple containers would overlap each other. Wrap all your scrollable page content in one.I'm not sure this is useful. Less is more?
I would say the current structure is better tbh. Setting the meta tag is non-invasive, easy, and has no real down sides so it's applicable to everyone and hence makes sense to put in "Getting Started". The iOS scroll container fix is however more involved and should be a decision made by the developer, therefore won't be applicable to everyone in a way that a "Getting Started" section imo should be.
Sure, will fix
Think I agree, will remove the technical explanation |
Getting Started now states what a reader gets for free, then the two
things their app should do, each with the reason it matters: the viewport
meta tag lays the page out above the keyboard, and on iOS, which ignores
that tag, the scroll container layout does the same job.
On the Formatting Toolbar page:
- Browser limitations no longer opens by telling readers to add the meta
tag, which the Getting Started guide has them do one paragraph before
following the link here. It now states the precondition instead.
- The scroll container's placement is a recommendation ("directly inside
<body>") rather than a requirement to be a direct child of <body>,
which is not true (position: fixed resolves against the viewport at any
depth) and which no app rendering into a framework root could meet.
- Restored that the mobile toolbar has the same items as the regular one
and is enabled by default, and dropped the sentence announcing that a
workaround exists right before the paragraph giving it.
The vanilla guide says what breaks without registerPortalElement instead
of pointing at isWithinEditor, which the docs never introduce.
Agree, but the way it was setup there wasn't any incentive for developers to click through to the mobile experience to get the best iOS user experience. Addressed this in the last commit |
Summary
This PR updates the docs for all changes in the #2939 PR stack. Created a separate PR to ease review.
Rationale
Ensures we didn't miss documenting any changes from the stack. The addition of the mobile formatting toolbar is the most obvious change, but there were a number of smaller supporting changes which flew under that radar.
Changes
N/A
Impact
N/A
Testing
N/A
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit
useEditorFocus,onFocusChange, andisFocused(), including editor UI focus.