Repository navigation
Grid: the selection outline stays visible when extended to the last row (#687) - #767
Merged
Merged
Conversation
…ow (storytold#687) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
Member
|
Merged — thank you @vangel76 for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft |
arcanii
added a commit
to arcanii/DevCraft
that referenced
this pull request
Oct 13, 2026
…k's hooks, and the outline drawn with upstream's outline_bands Upstream 84acf62, 407 commits since the merge before, and no release among them (still 0.6.1): AutoComplete for cell values with its switch on the Options page, a horizontal scrollbar in the sheet tab bar and an All Sheets navigator, rows that grow to their tallest font, the recent list's "modified" column (the fork's own storytold#463, now upstream's), a selection outline that keeps its sides round a whole column, many fixes to XLSX and XLS round trips, number formats, functions and PDF output, and Serbian as an interface language. Two conflicts, both settled as the fork's rule says: upstream's code, and the hook put back. - crates/ui-egui/src/lib.rs, UiState and its Default: upstream added `autocomplete` on the line the fork's field stood on. Upstream's first, the fork's `aniefork` after it. - crates/ui-egui/src/grid.rs, paint_selection: upstream replaced its stroked rectangle with four filled sides cut to the screen (`outline_bands`, its storytold#767), where the fork's hook stands. The hook stays, and the fork's `selection::paint_outline` now draws its own ring with `outline_bands`: where the outline lies and how wide it is are still the fork's, and it has upstream's fix. Nothing else in the app calls that function, so without this the build fails on an unused one. Every hook is in place after the merge, counted file by file before and after. Outside the fork's own files the result differs from upstream by the hooks alone: 72 lines added and 17 changed, in ten files. Checked on the result: fmt, clippy, all 1867 tests of the workspace, assets, layers, wasm, parity and keytips. The keytips step failed in the gate's own run on line endings only (the merge checked the generated table out with CRLF and the check compares bytes); regenerated, it is upstream's file to the byte, and the step passes. ROADMAP-aniefork.md has the sync table, the hooks table, what conflicted, and the log. Co-Authored-By: Claude Opus 5.5 <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.
Fixes #687
Root cause
The selection outline was a single
rect_strokeof the whole current area. Extended to the last row the rectangle is ~20 million points tall; at that size f32 precision is about 2 points, and the tessellated left/right sides vanish while the fill (plain rectangles) still shows.Changes
grid.rs: the outline is now four filled bands (outline_bands) cut to the pane's clip rect (plus a small margin), so no geometry is far from the viewport. Same width (2) and position as the oldStrokeKind::Middlestroke onoutline.expand(0.5). Non-finite rects draw nothing.Tests
cargo test -p gridcraft-ui-egui --lib outline_band(2 tests: whole-column outline keeps left/right/top sides within the viewport; out-of-view and NaN rects draw nothing)cargo clippy -p gridcraft-ui-egui --lib -- -D warnings,cargo fmt -p gridcraft-ui-eguiNot done / unverified
paint_selectionwith its ownoutline_sides(already pixel-snapped); if In-cell editing: the highlight stays on the cell while the text runs past it #549 lands, the huge-range clipping must be applied to its sides too. Grid: extending the selection from the keyboard scrolls its moving end into view (#762) #763 (scroll into view) touches other lines but is complementary; it does not fix this.🤖 Generated with Claude Code