Repository navigation
feat(ui): a middle click closes a tab (#1853) - #1920
Merged
Merged
Conversation
mtlcl410
force-pushed
the
feat/middle-click-closes-tab
branch
from
October 13, 2026 22:37
f21e9c6 to
664d2cb
Compare
As in Acrobat and browsers. A document tab with unsaved changes asks first, through the same close request as its close button; the Combine files tab closes too. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz
mtlcl410
force-pushed
the
feat/middle-click-closes-tab
branch
from
October 14, 2026 04:46
664d2cb to
5d81968
Compare
Member
|
Thank you @mtlcl410 for closing tabs with a middle click! It's merged into main now. If you haven't already, please come and join us on Discord: https://discord.gg/artcraft |
iRehmanAhmad
added a commit
to iRehmanAhmad/Rehman-PDF
that referenced
this pull request
Oct 20, 2026
…y pass - Merge of upstream tag v0.9.0 (645016a) into main (1da0c60): engine/render security and feature updates, vi locale added; fork identity kept (ur locale + reverse_rtl + corpus, trademark strip, app id, T-007/T-009 ATTRIBUTION state; assets gate green, 275 assets). - Design pass: upstream organize_panel removed - the T-003 canvas action bar is the shipped Organize (PM decision); PageSelectionInput::show and DocView::organize_range removed with it (parse kept for the control channel); the panel's two upstream shape tests removed with it. - Tab strip: upstream behaviours ported into the T-003 strip - middle-click closes a tab (storytold#1920), tab drop-line clamped into the clip rect in front of the first tab (storytold#2278); Home / combine_tab.focused handling verified present. the_edit_tab_turns_on_edit_text_and_images adapted to pick the mode tab by position (the fork's mode bar has two 'Edit' nodes); assertions unchanged. - Excluded from this push: .github/workflows/ (token lacks workflow scope) - upstream's ci.yml changes and nix.yml stay at main's current state; the owner applies them manually. - QA: full ui-egui suite - only GPU-env 'No adapter found' failures remain (no GPU on the test VM); cargo check --workspace clean; clippy -D warnings clean on the touched crate; cargo xtask assets + layers green. Second parent is the v0.9.0 tag commit, so the merge topology is preserved.
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.
What this changes
Fixes #1853. A middle click on a tab closes it, as in Acrobat and browsers.
close = Some(i)→Action::Close→request_close_tab), so a document with unsaved changes asks first instead of closing.Middle-button auto-scroll (
autoscroll.rs) only starts inside the document viewport, so it doesn't see a click on the tab strip.Response::middle_clickedis egui's own per-button click tracking on the tab's existing click sense.How you verified it
cargo fmt --checkcargo clippy -p pdfcraft-ui-egui -j 2 --all-targets -- -D warningscargo test -p pdfcraft-ui-egui -j 2 --test ui: 45 of 46 pass. The one failure,dropping_a_pdf_on_the_window_opens_it, fails onmainon Windows without this change too: it runs a fixed three frames after the drop while the background open worker (Desktop: prepare large PDFs off the UI thread #1493) is still preparing the document. test(ui): extend native opening and continuation regression coverage #1764 already fixes it with await_for.Test.
a_middle_click_closes_the_tab(kittest) opens two documents, middle-clicks the first tab and requires that only the second remains, with no close prompt. It then edits the remaining document, middle-clicks its tab and requires that it is still open and a close request is pending.With
chrome.rsreverted the test fails:left: 2, right: 1(both tabs still open).Never-crash
unwrap/expect/indexing outside testsunsafeProvenance
Security
Parity and reach
parity/entry describes tab gestures, so none changes. Not a headless operation, so no automation tool.🤖 Generated with Claude Code