fix(editor): replace broken image toolbar popovers with custom dialogs#114
Merged
fix(editor): replace broken image toolbar popovers with custom dialogs#114
Conversation
…alogs BlockNote's built-in FileCaptionButton and FileRenameButton use Radix UI Popovers inside the FormattingToolbar's Floating UI popover, causing the toolbar to dismiss when the inner popover opens (Popover-in-Popover issue). Replace these with custom Dialog-based components (base-ui) rendered at the Editor level so they survive toolbar unmount cycles. Also replace the download button (window.open blocked in Tauri) with a Rust-backed download_file command that handles both local asset and remote URLs. Remove unused replace/toggle-preview items from the toolbar. Toolbar order: Rename → Edit Caption → Download → Delete → Align Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #40
FileCaptionButtonandFileRenameButton(Radix UI Popovers nested inside Floating UI popover — "Popover-in-Popover" issue causes toolbar dismissal) with custom@base-ui/react/dialog-based components rendered at the Editor levelFileDownloadButton(window.openblocked in Tauri) with a Rust-backeddownload_filecommand that handles both local asset URLs and remote HTTP URLsreplaceFileButtonandfilePreviewButtonfrom the toolbarChanges
CaptionButton.tsxCaptionDialog.tsxRenameButton.tsxRenameDialog.tsxDownloadButton.tsxdownload_filecommandEditor.tsxfile_io.rsdownload_fileTauri commandlib.rsdownload_filein invoke handlerTest plan
🤖 Generated with Claude Code