fix(mods): a drag in the Mods tab stops at the loads-last line #3235
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3235
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/mods-drag-split"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
In the Mods tab, a mod could be dragged (or moved with the keys or a controller) past the mods marked Loads last (#3192). The list showed it there, then snapped back, because the loader refuses that move. To see it on
main: with two mods of your own and one withorder = "last", drag the first one below the last one and let go. Nothing changes.Now the held mod stops at the line between the two groups, as in the launcher (MagicBeanDev/LongshotLauncher#418).
BoxwithonReordertakes a new optionalreorderSplit: its children before that index and those from it on are ordered apart. The kit'sReorderListtakes it assplit, so any mod can use it.Read
game/crates/ui/src/core/reorder.rsfirst (bounds), thenops.rs,kit.tsxandmods-tab/src/main.tsx.Testing
Tested: Linux, RTX 3090, driver 620.70.06, from the
kokiri-startsave, in a headless gamescope window, with three file-only mods (two ordinary, then one withorder = "last"). The mouse dragged the first mod far past the end of the list.splitline taken out of the Mods tab (asmainhas it): the saved order did not change.test/other moved down (at the next start)).test/late: added while the game runs (off: switch it on in the Mods tab)).The game run was on the head before a rebase over one commit of
main(#3209, pause menu buttons).Checks:
mise run testbefore that rebase: 886 passed, 12 failed, 13 skipped. The same 12 fail onmainand here after it:test_lifter(Clippy "large array defined as const" in host-sys, and a build-driver test),test_present_acquire_ahead,test_present_held_image,test_present_image_free,test_present_geometry_trace,test_dlssg,test_ui_renderer,test_sync_watch_event,test_turf_budget,test_vk_draw_overhead_lean,test_no_game_title,test_no_map_reload.cargo test -p game-ui195 passed (with the newno_item_crosses_a_lists_split).cargo test -p modtool testing_game::39 passed, 1 failed, 2 ignored; the failure isthe_menu_passes_its_tests(layout, "the developer page"), which fails the same way onmain.cargo fmt --check,schema-gen --check,ffi-gen --checkand Clippy ongame-uipass.Still to test:
Measurements
Nothing to measure: it changes which places a held list item can take.
Risks
A list with no
reorderSplitbehaves as before.reorderSplitis a new optional property of the mod UI API; nothing existing changes meaning. A revert is enough. Nothing changes in saves, settings or caches.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.mainand here, for a change that shows on screen. (Not taken yet: the run needed a window for the mouse, and its frame dumps leave the menu out.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Linux, RTX 3090, driver 620.70.06, kokiri-start: dragged a mod past a loads-last mod; it was saved just above it. With the split taken out, as main has it, the order did not change.
4e90e30aa45cec70ceadWIP: fix(mods): a drag in the Mods tab stops at the loads-last lineto fix(mods): a drag in the Mods tab stops at the loads-last line