-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Fixed progress UI to adapt to terminal width #13519
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
base: main
Are you sure you want to change the base?
Conversation
d5f751b to
1175c65
Compare
1175c65 to
80c34f6
Compare
|
updated (with a fix) and some tests added |
this is the exact issue this PR expect to fix :'( |
80c34f6 to
0974167
Compare
|
Found (yet another) but computing, as status alignment was computed without considering other status strings may have a distinct length 😅 - test case added |
|
This no longer truncates or messes up lines. I'll check some more and be back :) EDIT: pulling and running works - also for multiple images $ ./docker-compose pull
[+] pull 2/2
✔ Image debian:latest Pulled 7.4s
$ ./docker-compose run -it --rm debian bash
[+] 1/1te 1/1
✔ Network build_default Created 0.0s
Container build-debian-run-a7d669391344 Creating
Container build-debian-run-a7d669391344 Created
root@22ae48ef1546:/#
exit
$ ./docker-compose pull
[+] pull 4/4
✔ Image ubuntu:latest Pulled 2.4s
✔ Image debian:12 Pulled 7.5sHowever, there's no progress anymore. There is progress when building though: |
Signed-off-by: Nicolas De Loof <[email protected]>
|
.. then found another issue in test due to |
0974167 to
edbf4e3
Compare
cc @ndeloof |






What I did
Rewrote tty progress UI to be more deterministic regarding terminal width and height.
New logic is:
lineDatastruct to collect data to be formatted on terminalnote: sub task rendering (layers details during push/pull) has been removed to keep this beast (relatively) simple.
I tried to make the code bit more structured to get a more deterministic rendering, still this is all based on manual padding computation and string concatenations... We should look into an alternative TUI using https://github.com/charmbracelet/bubbles or comparable
Related issue
fixes #13474
also fixes #10256 by dropping extra lines if terminal height is too low
(not mandatory) A picture of a cute animal, if possible in relation to what you did