Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding field active_at and using it to sort panes #294

Merged

Conversation

dantepippi
Copy link
Contributor

Using last activity time to determine which pane was previously active when moving back to a direction.

Closes #230

@dantepippi
Copy link
Contributor Author

Just wanted to confirm this. Should I change those failing tests to match the new behavior?
When moving focus to a direction it used to choose the largest overlap but now it will pick the last used pane.

@TheLostLambda
Copy link
Member

@dantepippi Yeah, we'll probably be fine changing tests, but it would be good if we also had a couple of other people test it out so we can be sure the behavior is "correct" before setting it in stone with snapshots. You'll probably need cargo-insta to update the snapshots once we're sure it's working :)

@a-kenji
Copy link
Contributor

a-kenji commented Apr 21, 2021

Hey! Thanks! The behavior seems correct to me.

@imsnif
Copy link
Member

imsnif commented Apr 21, 2021

This is a cool solution and I like the behaviour. :)

@dantepippi
Copy link
Contributor Author

dantepippi commented Apr 21, 2021

This is a cool solution and I like the behaviour. :)

Thank you! I'm going to need some directions on how to adapt the snapshots to modify the tests.

Using last activity time to determine which pane was previously active
when moving back to a direction.

Changing active_at type to Instant
Previous behavior was to go to the largest overlap. Now it should go to
the most recently used pane. Used cargo insta review to update the
snapshots.
@dantepippi dantepippi force-pushed the focus_previous_pane_issue_230 branch from bab5279 to 4f7ad31 Compare April 23, 2021 00:13
@TheLostLambda
Copy link
Member

@dantepippi Stellar work! Nicely done tackling the testing system too, that's no easy beast to tame 😅 Consider it merged!

@TheLostLambda TheLostLambda merged commit 63da95c into zellij-org:main Apr 23, 2021
@dantepippi dantepippi deleted the focus_previous_pane_issue_230 branch April 23, 2021 14:33
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.

pane should go to previously active when possible
4 participants