Skip to content

ui: slide up, down, left and right use the full amount of space now#287

Open
skiesel wants to merge 1 commit into
eaburns:masterfrom
skiesel:Issue-239
Open

ui: slide up, down, left and right use the full amount of space now#287
skiesel wants to merge 1 commit into
eaburns:masterfrom
skiesel:Issue-239

Conversation

@skiesel

@skiesel skiesel commented Apr 26, 2016

Copy link
Copy Markdown
Collaborator

…rather than only delta increments

Fixes #239

@eaburns

eaburns commented Apr 26, 2016

Copy link
Copy Markdown
Owner

Remove the "could be multiplication" comments. You got it right. There is no guarantee that they will all remain the same.

Other than that, I just want to think if there is a way to test it.

@eaburns

eaburns commented Apr 26, 2016

Copy link
Copy Markdown
Owner

Checkout window_test.go. It has a bunch of tests for UI interactions like clicking and dragging etc. I think you can test these in there.

Test vertical sliding by making a window that is 3.5*minHeight. It should fit 3 frames with a tiny bit of slop. Then send a 1-click to the middle frame (run the tests with -race — it's so easy to get a race condition here if you don't add wait(w) in various places, like between interacting with a frame and reading a frame's center point, center(sheet0)). The test should check that the clicked frame (wait(w) between the click and checking this) bounding box grew by some amount, but not by as much as minHeight. Double check that it was actually hitting both vertical cases using go test -coverprofile=c && go tool cover -html=c.

Phew.

For the horizontal case — well, let's get a test working for the vertical case first, while I think about this.

@eaburns

eaburns commented Apr 30, 2016

Copy link
Copy Markdown
Owner

Ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants