Repository navigation
feat(ui): the Browser fills the Maps or Layouts row being dragged and draws its drop line across the list (#2956) - #2964
Conversation
… draws its drop line across the list (opengeos#2956)
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI found no bugs, security issues, performance problems or AGENTS.md breaks in this change. I posted no inline comments, since nothing here needs one. No earlier review threads exist on this PR, so none were left alone. BugsNone found. I checked the pieces the change depends on:
I could not compile or run the tests, because I have no shell. I took the PR's reported check results as given. I also could not confirm the SecurityNone. The change takes no external input. PerformanceNone. Each Browser row reserves one QualityLeft for the release quality pass, not posted inline:
AGENTS.mdNo breaks found. The change adds no user-visible strings, changes no command or saved state, and adds no long-running work. It needs no schema update, and the desktop and browser paths both use the same egui code, so wasm is covered. The PR body states which surfaces it reaches, includes before and after screenshots, and says touch is out of scope (#2958). Change sizeCompared: the whole PR against main (merge base ced7c3d to PR head 91b9e34).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Code reviewI reviewed the three changed files against the base branch and the staged AGENTS.md. There are no prior review threads on this PR, so no earlier concerns were left alone. Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared with the base branch: the whole PR against main (merge base ced7c3d to PR head 91b9e34).
|
… width, and the guide paragraph is reflowed (opengeos#2956)
Code reviewI reviewed the three changed files against the base-branch AGENTS.md, read the surrounding code ( Bugs: None found. The fill is painted behind the row through a reserved Security: None found. Performance: None material. Each row now adds one Quality: Nothing worth an inline comment. The new test's pixel thresholds ( AGENTS.md: No breaks found.
Prior reviews: There are no existing threads on this PR, so no earlier concerns were left alone. Change sizeCompared with the base: the whole PR against main (merge base ced7c3d to PR head fbd364d).
|
Summary
Dragging a map or layout row in the Browser (#2829) now looks like dragging a tab or a layer:
drag_tabalready says which item is dragged; the Browser threw that answer away).ui.set_min_width(ui.available_width()), aslayer_rowallocates its rows), so the drop line thattab_dropdraws from the last row's rectangle spans the list too, instead of being as wide as the last row's name.While a tab is dragged on the strip, its row in the Browser is filled too: both share one drag payload.
No new state, no command change, and
tab_dropis untouched. It reaches the desktop app and the browser build (both run this egui code); the command line, Python, the assistant and scripts see nothing, and undo is unchanged (a move is still onemap.moveorlayout.move).Not in this PR: the drop line's inset (2 px in
tab_drop, 8 px inlayer_drop), which is a separate look question; the shared edge-scroll helper is #2957 and touch is #2958.Testing
a_browser_row_being_dragged_is_filled_and_its_drop_line_spans_the_list(crates/ui-egui/tests/smoke.rs): reads the frame's shapes. Before the drag nothing is filled or drawn; for a map (M3held overWorld's upper half), the map in view (WorldoverM3) and a layout (L2overL1), exactly one hover-filled rect at least 120 pt wide sits on the dragged row and one accent line at least 120 pt wide is drawn; after the drop and the pointer leaving, neither. On the previous code it failed with the dragged row not filled (0 fills, expected 1).checks.sh 2956 rustgis-ui-egui: fmt, clippy, nextest (9596 passed), doctests, layers andschema --checkall exit 0.dragging_browser_rows_reorders_maps_or_layouts_in_one_undo_step,a_row_dragged_to_the_edge_of_a_long_browser_scrolls_it,dragging_a_view_tab_reorders_maps_or_layouts_in_one_undo_step,a_tab_dragged_to_the_edge_of_a_crowded_strip_scrolls_it) pass unchanged.ui_shotbefore and after, under UI evidence.UI evidence
Before (left) and after (right), a map row of the Maps list dragged over the first row (
ui_shot, 1000 × 680 pt at 2×): the dragged rowAfricais filled and the drop line spans the list instead of the width of the nameWorld.The map in view (
World) dragged: its row is filled too.Related issue
Closes #2956.
Summary by CodeRabbit