tmuxp icon indicating copy to clipboard operation
tmuxp copied to clipboard

Fix layout related issues #737, #667, #704

Open nvasilas opened this issue 3 years ago • 3 comments

Use tmux default session size 80x24 when creating a new session

nvasilas avatar Aug 07 '22 15:08 nvasilas

@nvasilas Can you take a look at the tests?

It looks like this may need a version conditional from libtmux.common, example:

  • https://github.com/tmux-python/tmuxp/blob/ad6d30b7c0ed26df1160deb53092b913ae690651/tmuxp/cli/load.py#L165
  • https://github.com/tmux-python/tmuxp/blob/9a627f6949c945ad3427b3c559e0705042d0b0e8/tests/test_workspacebuilder.py#L255

tony avatar Aug 07 '22 17:08 tony

Docs on related functions: https://libtmux.git-pull.com/reference/common.html?highlight=has_gt_version#libtmux.common.has_gt_version

tony avatar Aug 07 '22 17:08 tony

@tony Sure mate I 'll fix them.

nvasilas avatar Aug 08 '22 16:08 nvasilas

@nvasilas I rebased your branch via GitHub's rebase button (git pull --rebase --autostash to pull the changes)

The changes include basic mypy support #786

tony avatar Aug 14 '22 09:08 tony

Codecov Report

Merging #793 (28c4366) into master (b70cd70) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #793   +/-   ##
=======================================
  Coverage   75.19%   75.19%           
=======================================
  Files          18       18           
  Lines        1431     1431           
  Branches      337      336    -1     
=======================================
  Hits         1076     1076           
  Misses        267      267           
  Partials       88       88           
Impacted Files Coverage Δ
tmuxp/workspacebuilder.py 85.29% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 18 '22 17:08 codecov[bot]

@nvasilas It really works. Nice.

Tested by doing pip install -e ~/path/to/your/tmuxp/branch and doing tmuxp load ./workspacefile.yaml -L another-tmux-server.

Master: b70cd70: Layout is scrunched This PR: Maintains the layout!

tony avatar Aug 21 '22 21:08 tony

@nvasilas Thank you for this!

Live in v1.13.1

PyPI, GitHub Tag

Any better?

I will reach out to users in the other issues as well

tony avatar Aug 21 '22 21:08 tony

@nvasilas I am deliberating fully reversing the change while we understand the problem better. You can recreate the same PR again, but it's my fault since my tests didn't catch the issues - so I feel bad

The reason why I may reverse it (v1.13.2 and v1.13.3) is it had more of an effect on users with certain kinds of sessions than we both thought it would (#800)

If you have more ideas on this - I am all ears - a bulk of my effort is improving libtmux so issues like this are easier to diagnose. The experience is going to get better, and we'll improve at catching these issues, I promise.

In #809 I added a test for us to check for tmux spacing issues

tony avatar Sep 10 '22 22:09 tony

@nvasilas I've started a new issue at #815 the opportunity arises you'd like to collab (sorry about retracting on this PR, it is my 100% my mess up)

tony avatar Sep 11 '22 16:09 tony

@tony Sorry mate I was abroad and I wasn't able to follow the recent changes. I introduced the bug with my PR and reverting it was the best choice. So, no worries. When I get some free time I will try to find a proper fix.

nvasilas avatar Sep 14 '22 09:09 nvasilas

@nvasilas I will keep you apprised either way 👍 (and vice-versa, hopefully!)

tony avatar Sep 17 '22 18:09 tony