wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
44.55k stars 1.69k forks source link

Fix scrolling after gocui update #473

Open mark2185 opened 10 months ago

mark2185 commented 10 months ago

This fixes the scrolling caused by a regression in #447 .

It still has some issues regarding highlighting rows, but I'm not overtly interested in diving into gocui given that it's not actively maintained. At least it enables the user to scroll again.

vinkmr commented 9 months ago

Built using go1.21.0 and tested on Ubuntu 20.04. Unfortunately the scrolling bug is still there. :(

mark2185 commented 9 months ago

Ah, I see I've only fixed it for the Image Details pane, thanks.

mark2185 commented 9 months ago

I took the liberty of rebasing onto #478 , give it another spin @vinkmr .

vinkmr commented 9 months ago

Yup. Scroll seems to work for me now.

marcusramberg commented 8 months ago

Would be great to see a new release with this fix, as it severely limits the usability of dive for nix-based images :)

glensc commented 5 months ago

To run this branch

$ gh repo clone https://github.com/wagoodman/dive         
Cloning into 'dive'...
remote: Enumerating objects: 5334, done.
remote: Counting objects: 100% (1258/1258), done.
remote: Compressing objects: 100% (315/315), done.
remote: Total 5334 (delta 1007), reused 1110 (delta 932), pack-reused 4076
Receiving objects: 100% (5334/5334), 5.05 MiB | 5.26 MiB/s, done.
Resolving deltas: 100% (3500/3500), done.

$ cd dive 

$ gh co 473           
From https://github.com/wagoodman/dive
 * [new ref]         refs/pull/473/head -> fix/scrolling-contents
Switched to branch 'fix/scrolling-contents'

$ go run main.go php:7.2-fpm
MauriceArikoglu commented 5 months ago

@wagoodman @mark2185 whats missing for this PR to get merged? Want to offer help 🤝

mehmetumit commented 5 months ago

Seems like these lines need to be fixed in order to pass ci check

runtime/ui/view/layer.go:298:14: Error return value of `v.vm.Update` is not checked (errcheck)
                v.vm.Update(v.constrainedRealEstate)
                           ^
runtime/ui/viewmodel/layer_set_state.go:42:26: func `(*LayerSetState).height` is unused (unused)
func (vm *LayerSetState) height() int {
                         ^
runtime/ui/view/layer.go:153:17: func `(*Layer).height` is unused (unused)
func (v *Layer) height() uint {
                ^
black-snow commented 3 months ago

Please release this - super annoying bug.

ruffsl commented 3 months ago

I just had to rebase this PR on top of the current head ( 925cdd86482edec42185794620a1e616b79bbee5 ) of main branch to work around something similar to this:

Thanks for the patch!

MauriceArikoglu commented 2 months ago

Any update? @wagoodman @mehmetumit @mark2185 can you fix the mentioned ci issues?

LaTrissTitude commented 2 months ago

Would be great for this fix to reach the next release

black-snow commented 2 months ago

Sadly, the logs have expired already.

pov1ba commented 2 months ago

You can still see what was the issue here. https://github.com/wagoodman/dive/actions/runs/6391362920?pr=473

I made another pull request based on this one here, #520, that should hopefully pass all the checks. I just need someone to review and approve it now.

Will be nice if we can finally have this fix in new versions.