cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.7k stars 79 forks source link

tableview scrollbar is positioned slightly out of position on first layout #797

Open kkoreilly opened 8 months ago

kkoreilly commented 8 months ago

Discussed in https://github.com/goki/goki/discussions/791

Originally posted by **ddkwork** January 12, 2024 When the horizontal and vertical scroll bars appear in the layout at the same time, when the mouse wheel scrolls up and down, the horizontal scroll bar should be manually dragged instead of the horizontal scroll bar scrolling at the same time as the vertical scroll bar is scrolling, because when this behavior occurs, the controls in the entire layout look at the center of the window or the right side of the window, and cannot visually preview all the controls on the layout. Recurrence: This can be seen by scrolling the mouse after loading the code on the app's global settings page, code editor, or gide's split layout.
kkoreilly commented 8 months ago

Fixed in 739eb36370769e3abebea6a2806d220f9b67a7fe.

kkoreilly commented 8 months ago

I am aware of the vertical scrollbar issue and will work on fixing it soon.

kkoreilly commented 8 months ago

Also, I will consider the automatic pop-up menu opening on hover.

rcoreilly commented 8 months ago

Looks to be specific to TableView (probably also SliceView), which has a vertical scrollbar managed by SliceGrid. This should be positioned a bit further to the left.

If you F5 or resize the window it puts the scroll in the right place, so the logic is correct in there at some level. The first show layout is not correct. I tried increasing render.go SceneShowIters from 2 to 3, 4 and it didn't fix it. Will require more detailed investigation..

kkoreilly commented 7 months ago

I can reproduce the issue on my computer, so I shouldn't need that. I will work on fixing this soon.

kkoreilly commented 7 months ago

Yep, the async demo definitely helped reveal a lot of issues. We will release v1 of core after we finish all of the v1 milestone issues, which you can see here. We will definitely work on fixing this scrollbar bug soon.

kkoreilly commented 7 months ago

We improved some of the table view scrolling logic recently; can you test it and see whether the issue still happens? If it does, can you give specific instructions on how to reproduce it?

kkoreilly commented 7 months ago

Can you try an earlier version of core (from yesterday, for example) and see if the Vulkan issue still happens? Just to confirm, the scrollbar issue is fixed, right? I will be available to debug on your computer in a few hours.

kkoreilly commented 7 months ago

We can absolutely fix Vulkan and get it working on Windows; please do not despair. Vulkan is used in many games and high performance apps on Windows and other platforms. I am confident that I will be able to fix Vulkan soon, and I will debug it on your computer later today. I am sorry for the continuing difficulties that these Vulkan issues have caused.

ddkwork commented 7 months ago

I'm going to go out to work to earn money tomorrow, and I can't play the computer at any time, is it convenient for you to debug today?

---Original--- From: @.> Date: Sun, Feb 25, 2024 10:29 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

We can absolutely fix Vulkan and get it working on Windows; please do not despair. Vulkan is used in many games and high performance apps on Windows and other platforms. I am confident that I will be able to fix Vulkan soon, and I will debug it on your computer later today. I am sorry for the continuing difficulties that these Vulkan issues have caused.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

a.m 11:02 now to me

---Original--- From: @.> Date: Sun, Feb 25, 2024 10:29 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

We can absolutely fix Vulkan and get it working on Windows; please do not despair. Vulkan is used in many games and high performance apps on Windows and other platforms. I am confident that I will be able to fix Vulkan soon, and I will debug it on your computer later today. I am sorry for the continuing difficulties that these Vulkan issues have caused.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

The vertical scrollbar doesn't work and can't be dragged

---Original--- From: @.> Date: Sun, Feb 25, 2024 10:29 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

We can absolutely fix Vulkan and get it working on Windows; please do not despair. Vulkan is used in many games and high performance apps on Windows and other platforms. I am confident that I will be able to fix Vulkan soon, and I will debug it on your computer later today. I am sorry for the continuing difficulties that these Vulkan issues have caused.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kkoreilly commented 7 months ago

I can not debug right now, but I might be able to in a couple of hours.

ddkwork commented 7 months ago

I can not debug right now, but I might be able to in a couple of hours.

It's great, I just received a call from my third uncle, I don't have to work for the time being, and I have more time to study and test core in the next period, and I'm currently unemployed, which is very bad

kkoreilly commented 7 months ago

OK, I should be available to debug this later today.

ddkwork commented 7 months ago

ok

---Original--- From: @.> Date: Mon, Feb 26, 2024 00:49 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

OK, I should be available to debug this later today.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

OK, I should be available to debug this later today.

Hello, I seem to have found a stable implementation, please connect to my computer, if you see that it works, let's change the code, https://github.com/vulkan-go/asche

ddkwork commented 7 months ago

I've been running it for half an hour and no panic, https://github.com/vulkan-go/demos/blob/master/vulkandraw%2Fvulkandraw_glfw%2Fmain.go

kkoreilly commented 7 months ago

I am ready to debug this on your computer now; I believe you that it does not panic with asche, and I will focus on figuring out a fix to the crash in Cogent Core based on how they structure their system.

ddkwork commented 7 months ago

1670379990

---Original--- From: @.> Date: Mon, Feb 26, 2024 12:30 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

I am ready to debug this on your computer now; I believe you that it does not panic with asche, and I will focus on figuring out a fix to the crash in Cogent Core based on how they structure their system.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

Retry

---Original--- From: @.> Date: Mon, Feb 26, 2024 12:30 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

I am ready to debug this on your computer now; I believe you that it does not panic with asche, and I will focus on figuring out a fix to the crash in Cogent Core based on how they structure their system.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

Pc slowly now, wait me

---Original--- From: @.> Date: Mon, Feb 26, 2024 12:30 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

I am ready to debug this on your computer now; I believe you that it does not panic with asche, and I will focus on figuring out a fix to the crash in Cogent Core based on how they structure their system.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 7 months ago

I will restart. I .can not do

---Original--- From: @.> Date: Mon, Feb 26, 2024 12:30 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)

I am ready to debug this on your computer now; I believe you that it does not panic with asche, and I will focus on figuring out a fix to the crash in Cogent Core based on how they structure their system.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kkoreilly commented 7 months ago

I am currently debugging on a different computer than usual (a MacBook), which is probably why it is not working well. I should be available to debug it on my normal computer later today.

kkoreilly commented 7 months ago

I am sorry, but I can not debug this now, but I will definitely be able to debug this tomorrow, and I will make sure that we finally get this fixed.

kkoreilly commented 7 months ago

I am ready to debug on your computer whenever you are.

kkoreilly commented 7 months ago

It is a long example, but it successfully reproduces the issue on my computer. Thank you for providing this, and I will work on fixing this bug as soon as possible.

kkoreilly commented 7 months ago

so can you enlarge the default minimum width and height of the vertical scrollbar a little bit? Especially the height, it's too small

Yes, I will.

kkoreilly commented 7 months ago

I will work on simulating events in my unit tests.

kkoreilly commented 7 months ago

We do not need to mock anything for our unit tests. Our unit testing infrastructure is already working using an offscreen driver API and image assertion using the image-based core scene paradigm. I just need to finish getting the event handling logic working and then write all of the unit tests for these issues. I am planning to work on this very soon, so you do not need to do anything.