Repository navigation
fix(island): a loose robot docks at any place, a robot-only pill moves the island - #54
Merged
Merged
Conversation
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.
Two gesture fixes for the island and its robot.
A loose robot docks at any place
Before, a robot dropped on the desktop went back into the island only near the island's saved place. With the island saved at the bottom left, a robot brought back to the top stayed loose.
island::dock_place(area, scale, centre, current)returns the place a dropped robot docks into. The island's own place is tried first, so a drop where it docked before keeps the island put. Otherwise, a drop withinDOCK_REACHof the top or bottom edge docks there, and the left, middle or right third of that edge picks the side. A drop in the middle of the screen docks nowhere.Dropped.dockedis now that place instead of a yes or no. The page savesrobots: 'island'and the place, plus the screen when it changed (landPatch).A robot-only pill moves the island
With Settings showing the robot alone at rest, the collapsed pill is almost all face, so nearly every drag pulled the robot out instead of moving the island.
pillRest: "robot", or idle with no words): a drag anywhere moves the island. A still press of 400 ms (under 4 px) arms the pull: the robot grows to 114 % (transform only, no animation with reduced motion), and the drag that follows pulls it out. Let go after arming without dragging, nothing happens.lib/island/hold.svelte.ts, tested.Checks
bun run check: 0 errors, 0 warnings.vitest: 77 files, 556 tests.cargo test: 93 tests.