Repository navigation
fix(ui): on a touch screen, a swipe over the model builder's tools scrolls them (#3034) - #3049
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the full diff (two files, about 100 added and 12 removed lines), the helpers it relies on in I found no bugs, security issues or performance problems. The touch flow is consistent with the helpers from #3032 and with the Bugs: none found. Security: none found. Performance: none found. Quality:
AGENTS.md: no rule breaks found. Both new helpers are shared, not desktop-only, so the wasm build is unaffected. No commands, saved formats or assets change. Layering is unchanged. The PR states that the phone interface ( Surfaces: the change reaches the desktop and web model builder. It has no command, ribbon, Assistant or MCP surface, so there is nothing to undo or document there. Confidence overall: high that the diff is correct as written. The main unverified point is that egui clears the drag payload on release, which the existing drop code already relies on. Change sizeCompared with the base branch: the whole PR against main (merge base f1cb392 to PR head 80faa28).
|
Code reviewFindings for PR #3049 (touch swipe over the model builder's tool palette). I read the full diff, the helpers in Bugs: None found. I traced the payload path ( Security: None. The change is UI-only and adds no parsing or I/O. Performance: None. Quality:
AGENTS.md: No rule breaks found. Checked:
Twins checked:
Prior reviews: The two threads on Change sizeCompared with
|
|
On the test helpers: leaving |
📖 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 reviewReviewed the 2-file diff ( Bugs: none found. I checked these paths and they look correct:
Security: none. The change is UI-only and touches no input parsing, commands, files or saved formats. Performance: none. The payload check runs once per visible row per frame, which is negligible. Quality:
AGENTS.md: no breaks found.
Twins checked:
Prior reviews: there was one thread, a quality concern that Change sizeCompared with the base branch: the whole PR against main (merge base f1cb392 to PR head 94e1986).
|
|
On the two summary points: the shared test-support module is answered above. On rows sharing a tool id: they would paint the label at the same pointer position, and a drop carries only the id, so nothing changes. |
Summary
On a touch screen, a swipe that starts on a row of the model builder's tool list now scrolls the list. It used to take the tool under the finger and drag it, because each row senses a drag inside a scroll area (
palette_ui,modelbuilder.rs).+ Inputand+ Outputare unchanged: they sit above the list, where nothing scrolls.This reaches the desktop and web interface, where the model builder lives; no command, undo step or saved format changes.
The rows use the three helpers #3032 added for the lists that reorder (
reorder_sense,reorder_drag,yield_touch_draginwidgets.rs). The name following the pointer is now drawn while the drag payload is the row's, not whileresp.dragged(): after a long press egui has let go of the row's own drag. The helpers keep their names; renaming them would touch every caller for no change in behaviour.Testing
New tests in
modelbuilder.rs, with the touch events as winit reports them:a_swipe_over_the_palette_scrolls_and_adds_no_tool(failed before: the swipe dropped Buffer on the canvas)a_long_press_then_a_move_drops_a_tool_on_the_canvas(failed before: nothing was dropped; also checks that a long press alone adds nothing, that the list stays still while the tool is carried, that a secondary-button drag adds nothing, and that the drop lands where a mouse drag lands)a_tap_on_a_palette_tool_adds_it(passes before and after)the_input_and_output_buttons_drag_onto_the_canvas(mouse and finger, with the name following the pointer; fails if the buttons start no drag)The touch and mouse drag helpers of the
panes.rstests are nowpub(crate)so these tests share them.a_wrapped_map_title_is_sized_for_its_drawn_linesinrustgis-engine, which this PR does not touch ([Bug]: a layout title test fails on Windows, macOS and some Linux: its map names fit the title box in other fonts #3043, fix in test(layout): the wrapped map title test picks its names in the installed fonts (#3043) #3045). Its clippy run found an unused parameter, since removed; clippy and the model builder and touch tests (25) pass on the final commit.ui_shot: a mouse drag of Dissolve onto the canvas, mid-drag and after the drop, renders pixel for pixel as onmain.Not tried on a device.
UI evidence
No visible UI change.
Related issue
Closes #3034
Summary by CodeRabbit