tableview scrollbar is positioned slightly out of position on first layout

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.

Fixed in 739eb36370769e3abebea6a2806d220f9b67a7fe.

Fixed in 739eb36370769e3abebea6a2806d220f9b67a7fe.

After testing the fix, it is still not possible to hold down the left mouse button to drag the vertical scrollbar, there is such a scenario that will often use this feature: when the table is very large, the mouse wheel will waste time and cannot scroll to the bottom of the table at one time, so we need both the mouse wheel feature and the left mouse button to press and drag. A bit off the visual is that the area where the cursor gets focus is always off the area drawn by the scrollbar, both horizontally and vertically, which can be confusing when using the scrollbar for the first time, and repeated testing has found that we need to trigger the cursor focus in the area that is about 2/5 off the scrollbar for subsequent dragging.

I propose that the scrollbar drawing area and the scrollbar up and down 1/5 of the area should actively set the focus of the cursor to trigger the draggable hand slap indicator icon, similar to the visual convenience of the operation There is also a variety of pop-up menus, if the mouse enters the first-level pop-up menu, the second-level menu will automatically pop up much better, and so on, which will reduce the user's multiple clicks on the pop-up menu operation ...

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

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

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

I found that the code is required to reproduce the bug, I can't describe the process in English, please see the code and gif
https://github.com/HyperDbg/gui

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

I forgot to say an operation to reproduce the bug: click on the global settings to adjust the values of zoom and space to force the bug to be triggered, because if I don't operate this, I test it like this, sometimes it is normal and sometimes it is abnormal

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..

Hello, I now have a scenario that reproduces the incorrect focus of the vertical scrollbar: load a very large json into the structview, at this point the vertical scrollbar is small, and when we pull at it, nothing happens. Happily, the UI is very smooth, because this json has more than 80MB, which is the capture record saved yesterday to test whether the long-term operation triggers the vulkan bug. Do you have time to test it from anydesk? Or I upload json to the network and the ui occasionally freezes. If I can, I'd like to join your github organization, and then you create a new private repository for the organization, and I'll upload the packet capture module to the repository.

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

thanks
---Original---
From: @.>
Date: Mon, Feb 12, 2024 14:12 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
I can reproduce the issue on my computer, so I shouldn't need that. I will work on fixing this soon.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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

Now that the core has reached a usable state, I feel that it can be used for any production project, such as developing financial accounting software or something, and the scroll bar is the last minor flaw. Thank you for this time of restoration, the current use of core porting of previous projects and future projects is full of great recognition and recognition. Maybe we should release core to asomeone as soon as possible, more people involved in testing will make it more perfect, so that bugs and performance issues can be found on more platforms, and I'm surprised that sync demo I made actually caused so many bugs, hehe. MAP competition, empty slices, empty pointers, and check-in stuttering, it's really an impressive demo.

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.

good, I will keep the current fork to test again https://github.com/cogentcore/core/discussions/858 for a period of time, after 2-3 days the map will no longer trigger and null pointers, after asserting that the problem no longer appears, the commit other than the fork will be reset and keep in sync with you, when the time comes, I will also go to see if the problem in the milestone can be reproduced and participate in your solution, However, I found that I still don't understand the English translation of many issues.
---Original---
From: @.>
Date: Fri, Feb 23, 2024 09:42 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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?

Sorry I fell asleep, I just refreshed the commit, the first thing was to test vulkan, and found that I went to click on the header to sort while running the mini script, and after trying twice, I got the cgo system signal error during the time of adding to the 1300-1700 line, and the third time was to let the mini script operate, I didn't go to manipulate anything in the window, and ran to about 3,000 lines The most primitive panic came: vulkan exceeded the host memory. I have to test these commits well, and then test the scrollbar problem, and the last time I finally fixed it, I tried to make it run 30,000 lines, 50,000 lines or finish, 100,000 lines, and it was safe.
---Original---
From: @.>
Date: Sun, Feb 25, 2024 04:33 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

I seem to see the same function call, come on, andesk, adding code as you thought earlier should fix it<PHONE_NUMBER>
---Original---
From: @.>
Date: Sun, Feb 25, 2024 04:33 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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?

<EMAIL_ADDRESS>#gosetup
GOPATH=C:\Users\Admin\go #gosetup
<EMAIL_ADDRESS>build -o C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___3go_build_cogentcore_org_core_examples_async.exe cogentcore.org/core/examples/async #gosetup
C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___3go_build_cogentcore_org_core_examples_async.exe
2024/02/25 09:04:42 panic: vulkan error: vulkan error: out of device memory (-2)
2024/02/25 09:04:42
2024/02/25 09:04:42 ----- START OF STACK TRACE: -----
2024/02/25 09:04:42 goroutine 21 [running]:
runtime/debug.Stack()
        C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/debug/stack.go:24 +0x5e
cogentcore.org/core/goosi.HandleRecoverBase({0x7ff738b4de20, 0xc10b77a840})
        C:/Users/Admin/Desktop/core/goosi/recover.go:49 +0x4b
cogentcore.org/core/gi.HandleRecover({0x7ff738b4de20, 0xc10b77a840})
        C:/Users/Admin/Desktop/core/gi/recover.go:32 +0x4b
cogentcore.org/core/gi.(*RenderWin).EventLoop.func1()
        C:/Users/Admin/Desktop/core/gi/renderwin.go:555 +0x24
panic({0x7ff738b4de20?, 0xc10b77a840?})
        C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/panic.go:770 +0x132
cogentcore.org/core/vgpu.IfPanic(...)
        C:/Users/Admin/Desktop/core/vgpu/errors.go:39
cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc00035a580)
        C:/Users/Admin/Desktop/core/vgpu/surface.go:263 +0x91a
cogentcore.org/core/vgpu.(*Surface).AcquireNextImage(0xc00035a580)
        C:/Users/Admin/Desktop/core/vgpu/surface.go:360 +0xdf
cogentcore.org/core/vgpu/vdraw.(*Drawer).StartDraw(0xc00036e008, 0x0)
        C:/Users/Admin/Desktop/core/vgpu/vdraw/draw.go:236 +0xd7
cogentcore.org/core/gi.(*RenderWin).DrawScenes(0xc0002a60f0)
        C:/Users/Admin/Desktop/core/gi/renderwin.go:993 +0x262
cogentcore.org/core/gi.(*RenderWin).RenderWindow(0xc0002a60f0)
        C:/Users/Admin/Desktop/core/gi/renderwin.go:957 +0x3b9
cogentcore.org/core/gi.(*RenderWin).HandleWindowEvents(0xc0002a60f0, {0x7ff73909bb40, 0xc109f097a0})
        C:/Users/Admin/Desktop/core/gi/renderwin.go:619 +0x5ac
cogentcore.org/core/gi.(*RenderWin).HandleEvent(0xc0002a60f0, {0x7ff73909bb40, 0xc109f097a0})
        C:/Users/Admin/Desktop/core/gi/renderwin.go:603 +0x11c
cogentcore.org/core/gi.(*RenderWin).EventLoop(0xc0002a60f0)
        C:/Users/Admin/Desktop/core/gi/renderwin.go:569 +0x125
created by cogentcore.org/core/gi.(*RenderWin).GoStartEventLoop in goroutine 1
        C:/Users/Admin/Desktop/core/gi/renderwin.go:523 +0xa5

2024/02/25 09:04:42 ----- END OF STACK TRACE -----
2024/02/25 09:04:42 SAVED CRASH LOG TO C:\Users\Admin\AppData\Roaming\Async Updating\crash-logs\crash_2024-02-25_09-04-42
2024/02/25 09:04:42 panic: vulkan error: vulkan error: out of device memory (-2)
2024/02/25 09:04:42
2024/02/25 09:04:42 ----- START OF STACK TRACE: -----
2024/02/25 09:04:42 goroutine 1 [running, locked to thread]:
runtime/debug.Stack()
        C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/debug/stack.go:24 +0x5e
cogentcore.org/core/goosi.HandleRecoverBase({0x7ff738b4de20, 0xc10d653bc0})
        C:/Users/Admin/Desktop/core/goosi/recover.go:49 +0x4b
cogentcore.org/core/gi.HandleRecover({0x7ff738b4de20, 0xc10d653bc0})
        C:/Users/Admin/Desktop/core/gi/recover.go:32 +0x4b
cogentcore.org/core/gi.Wait.func1()
        C:/Users/Admin/Desktop/core/gi/renderwin.go:36 +0x24
panic({0x7ff738b4de20?, 0xc10d653bc0?})
        C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/panic.go:770 +0x132
cogentcore.org/core/vgpu.IfPanic(...)
        C:/Users/Admin/Desktop/core/vgpu/errors.go:39
cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc10ca77ce0)
        C:/Users/Admin/Desktop/core/vgpu/surface.go:263 +0x91a
cogentcore.org/core/vgpu.(*Surface).Init(0xc10ca77ce0, 0xc0001fb408, 0x7ff738b13780?)
        C:/Users/Admin/Desktop/core/vgpu/surface.go:119 +0x165
cogentcore.org/core/vgpu.NewSurface(0xc0001fb408, 0x1c84026bee0)
        C:/Users/Admin/Desktop/core/vgpu/surface.go:68 +0x45
cogentcore.org/core/goosi/driver/desktop.(*App).NewWindow.func2()
        C:/Users/Admin/Desktop/core/goosi/driver/desktop/app.go:139 +0x87
cogentcore.org/core/goosi/driver/desktop.(*App).MainLoop(0x7ff7397d9cc0)
        C:/Users/Admin/Desktop/core/goosi/driver/desktop/app.go:68 +0x102
cogentcore.org/core/gi.Wait()
        C:/Users/Admin/Desktop/core/gi/renderwin.go:42 +0x4b
cogentcore.org/core/gi.(*Stage).Wait(...)
        C:/Users/Admin/Desktop/core/gi/stage.go:302
cogentcore.org/core/gi.(*Body).RunMainWindow(0x7ff738b61240?)
        C:/Users/Admin/Desktop/core/gi/mainstage.go:38 +0x2b
main.main()
        C:/Users/Admin/Desktop/core/examples/async/async.go:45 +0x2c5

2024/02/25 09:04:42 ----- END OF STACK TRACE -----
2024/02/25 09:04:42 SAVED CRASH LOG TO C:\Users\Admin\AppData\Roaming\Async Updating\crash-logs\crash_2024-02-25_09-04-42

进程 已完成，退出代码为 0

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.

I just tried resetting to the previous commit and it still panics, I feel like I'm in a panic state myself, I feel like I'm going to crash
---Original---
From: @.>
Date: Sun, Feb 25, 2024 10:14 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

I'm going to delete the version I added map to now and load mitmproxy to load the big json packet capture record file to test the scrollbar, before according to my default idea is to maintain the map version for a period of time, and test the concurrency problem of all widgets except the table for a long time, but vulkan's problem makes me feel very frustrated, delete it. If so, can you make it clear to the user to choose the backend? Or, like gio, it automatically selects the corresponding rendering environment for the platform, and gio can run on Windows pe. I'm very skeptical about the stability of vulkan under Windows, I don't know how many games call vulkan under Windows, and whether there are any relevant reports to refer to. According to your previous fix, the source code logic of the vulkan sdk has been broken to cater to Windows, but we can't satisfy it.
---Original---
From: @.>
Date: Sun, Feb 25, 2024 10:14 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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.

No, you've done a great job, and a lot of developers don't want to waste their time on testing, but you're more persistent and persuasive with you, and I appreciate your precise control over your code.
---Original---
From: @.>
Date: Sun, Feb 25, 2024 10:29 AM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

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<EMAIL_ADDRESS>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: @.***>

a.m 11:02 now to me
---Original---
From: @.>
Date: Sun, Feb 25, 2024 10:29 AM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

The vertical scrollbar doesn't work and can't be dragged
---Original---
From: @.>
Date: Sun, Feb 25, 2024 10:29 AM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

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

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, and I don't have to work anymore, and I have more time to study and test core in the next time, and I'm currently unemployed, which is bad

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

ok
---Original---
From: @.>
Date: Mon, Feb 26, 2024 00:49 AM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

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

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

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.

1670379990
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

Retry
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

Pc slowly now, wait me
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

I will restart. I .can not do
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

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.

I know what the reason is.,Serious memory leak after pulling the latest commit.,You connect to andesk again.,But you can't execute Python scripts for the time being.,As soon as the execution system is stuck, you can only restart.
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

Are you online now ?
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:30 PM
To: @.>;
Cc<EMAIL_ADDRESS>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: @.***>

Please retry anydedk, men from 160mb up to 4072mb, so now we can not run Python, it will be kill system
---Original---
From: @.>
Date: Mon, Feb 26, 2024 12:58 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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.

Hello, I don't know what the reason is, now the memory is no longer leaking, the system is not stuck, I feel like Goland is doing the trick, now you can debug, you can panic every time, come on anydesk, id is the previous one

1670379990

1670379990

Now that the system is back to normal, I'm going to show how every panic compares to that other library working fine, maybe we can refactor the vgpu logic from there, and the other one is to demonstrate the vertical scrollbar not working

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.

ok
---Original---
From: @.>
Date: Mon, Feb 26, 2024 15:28 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.

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

1670379990
---Original---
From: @.>
Date: Tue, Feb 27, 2024 07:30 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
I am ready to debug on your computer whenever you are.
—
Reply to this email directly, view it on GitHub, or unsubscribe.

The demo is ready and the code is a bit long, but it may not trigger this bug if it is not a short code with nested layout. If you need to streamline the demo code again, please let me know
package main

import (
	"bytes"
	"cogentcore.org/core/colors"
	"cogentcore.org/core/events"
	"cogentcore.org/core/gi"
	"cogentcore.org/core/giv"
	"cogentcore.org/core/icons"
	"cogentcore.org/core/ki"
	"cogentcore.org/core/styles"
	"cogentcore.org/core/texteditor"
	"fmt"
	"net/http"
	"time"
)

//go:generate core generate
//go:generate core build -v -t android/arm64
//go:generate core build -v -t windows/amd64
//go:generate go build .
//go:generate go install .
//go:generate svg embed-image 1.png

func main() {
	b := gi.NewBody("mitmproxy")

	hSplits := gi.NewSplits(b)

	leftFrame := gi.NewFrame(hSplits)

	tableView := giv.NewTableView(leftFrame, "tableView")
	tableView.SetReadOnly(true)
	tableView.SetSlice(&packets)

	b.AddAppBar(func(tb *gi.Toolbar) {
		chooser := tb.AppChooser()
		chooser.AddItemsFunc(func() {
			chooser.Items = append(chooser.Items, gi.ChooserItem{
				Value:   "search result",
				Label:   "",
				Icon:    icons.Search,
				Tooltip: "filter content",
				Func: func() {
					//mylog.Info("todo search table")
				},
				SeparatorBefore: false,
			})
		})
		// gi.NewTextField(tb).SetPlaceholder("filter content").AddClearButton().SetLeadingIcon(icons.Search)
		gi.NewButton(tb).SetTooltip("Cleaner").SetIcon("cleaner").OnClick(func(e events.Event) {
			resetPackets()
			go update(tableView)
		})
		gi.NewButton(tb).SetTooltip("Replay").SetIcon("replay")
		gi.NewButton(tb).SetTooltip("Edit").SetIcon("edit")
		gi.NewButton(tb).SetTooltip("Submit").SetIcon("submit")
		gi.NewButton(tb).SetTooltip("Rec").SetIcon("rec")
		gi.NewButton(tb).SetTooltip("Vpn").SetIcon("vpn")
		gi.NewButton(tb).SetTooltip("Rootca").SetIcon("rootca")
		gi.NewButton(tb).SetTooltip("Ssl").SetIcon("ssl3")
		gi.NewButton(tb).SetTooltip("Setting").SetIcon("setting")
		gi.NewButton(tb).SetTooltip("logView").SetIcon("Charles") // todo
		gi.NewButton(tb).SetTooltip("script").SetIcon("Charles")  // todo
		gi.NewButton(tb).SetTooltip("About").SetIcon("about")
	})

	tableView.AddContextMenu(func(m *gi.Scene) {
		gi.NewButton(m).SetText("copy row")
		gi.NewButton(m).SetText("copy Column")
		gi.NewButton(m).SetText("new packet")
		gi.NewButton(m).SetText("new packet container")
		gi.NewButton(m).SetText("save to json").OnClick(func(e events.Event) {
			//indent, err := json.MarshalIndent(packets, "", " ")
			//if err != nil {
			//	panic(err)
			//}
			//stream.WriteTruncate("packets.json", indent)
		})
		gi.NewButton(m).SetText("load from json")
	})
	rightFrame := gi.NewFrame(hSplits)
	vSplits := NewVSplits(rightFrame)

	reqFrame := gi.NewTabs(vSplits)

	ReqBodyDecoder := &BodyDecoderView{
		HttpDump:       NewEditor(reqFrame.NewTab("HttpDump"), "request HttpDump"),
		Payload:        NewEditor(reqFrame.NewTab("Payload"), "request Payload"),
		PayloadHexDump: NewEditor(reqFrame.NewTab("PayloadHexDump"), "request PayloadHexDump"),
		UnitTest:       NewEditor(reqFrame.NewTab("UnitTest"), "request UnitTest"),
		SteamAesKey:    NewEditor(reqFrame.NewTab("SteamAesKey"), "request SteamAesKey"),
		Steam:          NewEditor(reqFrame.NewTab("Steam"), "request Steam"),
		ProtoBuf:       NewEditor(reqFrame.NewTab("ProtoBuf"), "request ProtoBuf"),
		Tdf:            NewEditor(reqFrame.NewTab("Tdf"), "request Tdf"),
		Taf:            NewEditor(reqFrame.NewTab("Taf"), "request Taf"),
		Acc:            NewEditor(reqFrame.NewTab("Acc"), "request Acc"),
		Websocket:      NewEditor(reqFrame.NewTab("Websocket"), "request Websocket"),
		Msgpack:        NewEditor(reqFrame.NewTab("Msgpack"), "request Msgpack"),
	}
	respFrame := gi.NewTabs(vSplits)
	RespBodyDecoder := &BodyDecoderView{
		HttpDump:       NewEditor(respFrame.NewTab("HttpDump"), "response HttpDump"),
		Payload:        NewEditor(respFrame.NewTab("Payload"), "response Payload"),
		PayloadHexDump: NewEditor(respFrame.NewTab("PayloadHexDump"), "response PayloadHexDump"),
		UnitTest:       NewEditor(respFrame.NewTab("UnitTest"), "response UnitTest"),
		SteamAesKey:    NewEditor(respFrame.NewTab("SteamAesKey"), "response SteamAesKey"),
		Steam:          NewEditor(respFrame.NewTab("Steam"), "response Steam"),
		ProtoBuf:       NewEditor(respFrame.NewTab("ProtoBuf"), "response ProtoBuf"),
		Tdf:            NewEditor(respFrame.NewTab("Tdf"), "response Tdf"),
		Taf:            NewEditor(respFrame.NewTab("Taf"), "response Taf"),
		Acc:            NewEditor(respFrame.NewTab("Acc"), "response Acc"),
		Websocket:      NewEditor(respFrame.NewTab("Websocket"), "response Websocket"),
		Msgpack:        NewEditor(respFrame.NewTab("Msgpack"), "response Msgpack"),
	}

	tableView.OnSelect(func(e events.Event) { // todo  逻辑上这里应该是耗时了，导致选中行卡顿
		if len(packets) == 0 {
			return
		}
		p := packets[tableView.SelIdx]
		// switch p.StreamDirection {
		// case packet.Inbound:
		SetEditorBuf(ReqBodyDecoder.HttpDump, p.ReqBodyDecoder.HttpDump)
		SetEditorBuf(ReqBodyDecoder.Payload, p.ReqBodyDecoder.Payload)
		ReqBodyDecoder.UnitTest.Buf.Hi.Lang = "Go"
		//ReqBodyDecoder.UnitTest.Buf.OpenFS(samplefile, "gomitmproxy.go")

		SetEditorBuf(ReqBodyDecoder.UnitTest, p.ReqBodyDecoder.UnitTest)
		SetEditorBuf(ReqBodyDecoder.SteamAesKey, p.ReqBodyDecoder.SteamAesKey)
		SetEditorBuf(ReqBodyDecoder.Steam, p.ReqBodyDecoder.Steam)
		SetEditorBuf(ReqBodyDecoder.ProtoBuf, p.ReqBodyDecoder.ProtoBuf)
		SetEditorBuf(ReqBodyDecoder.Tdf, p.ReqBodyDecoder.Tdf)
		SetEditorBuf(ReqBodyDecoder.Taf, p.ReqBodyDecoder.Taf)
		SetEditorBuf(ReqBodyDecoder.Acc, p.ReqBodyDecoder.Acc)
		SetEditorBuf(ReqBodyDecoder.Websocket, p.ReqBodyDecoder.Websocket)
		SetEditorBuf(ReqBodyDecoder.Msgpack, p.ReqBodyDecoder.Msgpack)
		// case packet.Outbound:
		SetEditorBuf(RespBodyDecoder.HttpDump, p.RespBodyDecoder.HttpDump)
		SetEditorBuf(RespBodyDecoder.Payload, p.RespBodyDecoder.Payload)
		// SetEditorBuf(RespBodyDecoder.UnitTest,p.RespBodyDecoder.UnitTest)
		SetEditorBuf(RespBodyDecoder.SteamAesKey, p.RespBodyDecoder.SteamAesKey)
		SetEditorBuf(RespBodyDecoder.Steam, p.RespBodyDecoder.Steam)
		SetEditorBuf(RespBodyDecoder.ProtoBuf, p.RespBodyDecoder.ProtoBuf)
		SetEditorBuf(RespBodyDecoder.Tdf, p.RespBodyDecoder.Tdf)
		SetEditorBuf(RespBodyDecoder.Taf, p.RespBodyDecoder.Taf)
		SetEditorBuf(RespBodyDecoder.Acc, p.RespBodyDecoder.Acc)
		SetEditorBuf(RespBodyDecoder.Websocket, p.RespBodyDecoder.Websocket)
		SetEditorBuf(RespBodyDecoder.Msgpack, p.RespBodyDecoder.Msgpack)
		//}
		//todo set more and set cell width and packet type icon
	})

	hSplits.SetSplits(.6, .4)

	b.OnShow(func(e events.Event) { go packetTable(tableView) })

	b.RunMainWindow()
}

func resetPackets() { packets = packets[:0] }

var packets = make([]*Packet, 0, 80000)

func packetTable(tableView *giv.TableView) {
	for range 1000 {
		packets = append(packets, &Packet{
			EditData: EditData{
				Scheme:        "https",
				Method:        http.MethodPost,
				Host:          "www.google.com",
				Path:          "/cmsocket",
				ContentType:   "application/json",
				ContentLength: 10,
				Status:        fmt.Sprint(http.StatusOK),
				Note:          "this is a note",
				Process:       "xx.exe",
				PadTime:       1,
			},
			ReqBodyDecoder: BodyDecoder{
				HttpDump:       "11",
				Payload:        nil,
				PayloadHexDump: "11",
				UnitTest:       "package main",
				SteamAesKey:    nil,
				Steam:          "11",
				ProtoBuf:       "11",
				Tdf:            "11",
				Taf:            "11",
				Acc:            "11",
				Websocket:      "11",
				Msgpack:        "11",
			},
			RespBodyDecoder: BodyDecoder{
				HttpDump:       "11",
				Payload:        nil,
				PayloadHexDump: "11",
				UnitTest:       "package main",
				SteamAesKey:    nil,
				Steam:          "11",
				ProtoBuf:       "11",
				Tdf:            "11",
				Taf:            "11",
				Acc:            "11",
				Websocket:      "11",
				Msgpack:        "11",
			},
			WebsocketStatus: "22",
		})
		update(tableView)
		if len(packets) > 0 {
			tableView.ScrollToIdx(len(packets) - 1)
		}
	}
}

func update(tableView *giv.TableView) {
	updt := tableView.UpdateStartAsync()
	tableView.UpdateWidgets()
	tableView.UpdateEndAsyncLayout(updt)
}

type (
	BodyDecoderView struct {
		HttpDump       *Editor
		Payload        *Editor
		PayloadHexDump *Editor
		UnitTest       *Editor
		SteamAesKey    *Editor
		Steam          *Editor
		ProtoBuf       *Editor
		Tdf            *Editor
		Taf            *Editor
		Acc            *Editor
		Websocket      *Editor
		Msgpack        *Editor
	}
)

type (
	Packet struct { //gti:add
		EditData
		ReqBodyDecoder  BodyDecoder
		RespBodyDecoder BodyDecoder
		WebsocketStatus string // todo 增加类型别名和实现fmt的字符串方法
	}
	EditData struct {
		Scheme        string        // 请求协议
		Method        string        // 请求方式
		Host          string        // 请求主机
		Path          string        // 请求路径
		ContentType   string        // 收发都有
		ContentLength int           // 收发都有
		Status        string        // 返回的状态码文本
		Note          string        // 注释
		Process       string        // 进程
		PadTime       time.Duration // 请求到返回耗时
	}
	BodyDecoder struct {
		HttpDump       string // 收发都有
		Payload        []byte // 收发都有
		PayloadHexDump string // 收发都有
		UnitTest       string // 模拟请求
		SteamAesKey    []byte // 请求
		Steam          string // 收发都有
		ProtoBuf       string // 收发都有
		Tdf            string // 收发都有
		Taf            string // 收发都有
		Acc            string // 收发都有
		Websocket      string // 收发都有
		Msgpack        string // 收发都有
	}
)

func NewVSplits(parent ki.Ki) *gi.Splits { // Horizontal and vertical
	splits := gi.NewSplits(parent)
	splits.Style(func(s *styles.Style) {
		s.Direction = styles.Column
		s.Background = colors.C(colors.Scheme.SurfaceContainerLow)
	})
	return splits
}

type Editor struct {
	*texteditor.Editor
	*texteditor.Buf
}

func NewEditor(parent ki.Ki, tooltip string, name ...string) *Editor {
	if len(name) > 0 {
		tooltip += " " + name[0]
	}
	return &Editor{
		Editor: texteditor.NewEditor(parent, name...).SetTooltip(tooltip),
		Buf:    texteditor.NewBuf(),
	}
}

func SetEditorBuf[T Type](e *Editor, data T) {
	e.Buf.Hi.Style = "emacs"
	e.Buf.Hi.Lang = "Go"
	e.Buf.SetText(New(data).Bytes())
	e.Editor.SetBuf(e.Buf)
}

type (
	BinaryType interface{ ~[]byte | ~*bytes.Buffer }
	Type       interface{ string | BinaryType }
	Stream     struct{ *bytes.Buffer }
)

func New[T Type](s T) *Stream {
	switch s := any(s).(type) {
	case []byte:
		return &Stream{bytes.NewBuffer(s)}
	case *bytes.Buffer:
		return &Stream{s}
	case string:
		return &Stream{Buffer: bytes.NewBufferString(s)}

	default:
		return &Stream{Buffer: &bytes.Buffer{}}
	}
}

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.

Thank you so much, you finally reproduced it
---Original---
From: @.>
Date: Tue, Feb 27, 2024 09:47 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

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.

Also, when the table is crammed with many rows, the scrollbar seems to set its minimum height logically in such a way that the number of rows/the height of the rows - some mysterious value. As a result, the vertical scrollbar is too small in this scene, and the mouse finds its position a bit difficult to manipulate, so can you enlarge the default minimum width and height of the vertical scrollbar a little bit? Especially the height, it's too small

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.

thanks
---Original---
From: @.>
Date: Tue, Feb 27, 2024 15:02 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

Does the unit test simulate this layout while inserting rows while assert the dimensions of the scrollbar and events catch the anomaly? For example, after the unit test function mocks the behavior of "scroll to the bottom of each line of active execution", the pos of the assert scrollbar at this time, etc., I would like to see how you implement this kind of "simulated execution, simulated click" and so on.

I will work on simulating events in my unit tests.

ok
---Original---
From: @.>
Date: Sun, Mar 3, 2024 15:58 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [cogentcore/core] tableview scrollbar is positioned slightly outof position on first layout (Issue #797)
I will work on simulating events in my unit tests.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

maybe we need a mock api，see
https://github.com/apernet/hysteria/blob/master/core%2Fserver%2Fmock_udpEventLogger.go

Hi, I have prepared a mock data but it won't populate the parameters and assertions, I need you to demonstrate it once, here are the commands and the generated code:
···go
//go:generate go install github.com/vektra/mockery/v2@latest
//go:generate mockery --all --with-expecter --inpackage
```go
<details><summary>Details</summary>
<p>

// Code generated by mockery v2.42.0. DO NOT EDIT.

package giv

import (
	events "cogentcore.org/core/events"
	gi "cogentcore.org/core/gi"

	mimedata "cogentcore.org/core/mimedata"

	mock "github.com/stretchr/testify/mock"

	styles "cogentcore.org/core/styles"
)

// MockSliceViewer is an autogenerated mock type for the SliceViewer type
type MockSliceViewer struct {
	mock.Mock
}

type MockSliceViewer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockSliceViewer) EXPECT() *MockSliceViewer_Expecter {
	return &MockSliceViewer_Expecter{mock: &_m.Mock}
}

// AsSliceViewBase provides a mock function with given fields:
func (_m *MockSliceViewer) AsSliceViewBase() *SliceViewBase {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for AsSliceViewBase")
	}

	var r0 *SliceViewBase
	if rf, ok := ret.Get(0).(func() *SliceViewBase); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*SliceViewBase)
		}
	}

	return r0
}

// MockSliceViewer_AsSliceViewBase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsSliceViewBase'
type MockSliceViewer_AsSliceViewBase_Call struct {
	*mock.Call
}

// AsSliceViewBase is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) AsSliceViewBase() *MockSliceViewer_AsSliceViewBase_Call {
	return &MockSliceViewer_AsSliceViewBase_Call{Call: _e.mock.On("AsSliceViewBase")}
}

func (_c *MockSliceViewer_AsSliceViewBase_Call) Run(run func()) *MockSliceViewer_AsSliceViewBase_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_AsSliceViewBase_Call) Return(_a0 *SliceViewBase) *MockSliceViewer_AsSliceViewBase_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_AsSliceViewBase_Call) RunAndReturn(run func() *SliceViewBase) *MockSliceViewer_AsSliceViewBase_Call {
	_c.Call.Return(run)
	return _c
}

// ConfigRows provides a mock function with given fields:
func (_m *MockSliceViewer) ConfigRows() {
	_m.Called()
}

// MockSliceViewer_ConfigRows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigRows'
type MockSliceViewer_ConfigRows_Call struct {
	*mock.Call
}

// ConfigRows is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) ConfigRows() *MockSliceViewer_ConfigRows_Call {
	return &MockSliceViewer_ConfigRows_Call{Call: _e.mock.On("ConfigRows")}
}

func (_c *MockSliceViewer_ConfigRows_Call) Run(run func()) *MockSliceViewer_ConfigRows_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_ConfigRows_Call) Return() *MockSliceViewer_ConfigRows_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_ConfigRows_Call) RunAndReturn(run func()) *MockSliceViewer_ConfigRows_Call {
	_c.Call.Return(run)
	return _c
}

// CopySelToMime provides a mock function with given fields:
func (_m *MockSliceViewer) CopySelToMime() mimedata.Mimes {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for CopySelToMime")
	}

	var r0 mimedata.Mimes
	if rf, ok := ret.Get(0).(func() mimedata.Mimes); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(mimedata.Mimes)
		}
	}

	return r0
}

// MockSliceViewer_CopySelToMime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopySelToMime'
type MockSliceViewer_CopySelToMime_Call struct {
	*mock.Call
}

// CopySelToMime is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) CopySelToMime() *MockSliceViewer_CopySelToMime_Call {
	return &MockSliceViewer_CopySelToMime_Call{Call: _e.mock.On("CopySelToMime")}
}

func (_c *MockSliceViewer_CopySelToMime_Call) Run(run func()) *MockSliceViewer_CopySelToMime_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_CopySelToMime_Call) Return(_a0 mimedata.Mimes) *MockSliceViewer_CopySelToMime_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_CopySelToMime_Call) RunAndReturn(run func() mimedata.Mimes) *MockSliceViewer_CopySelToMime_Call {
	_c.Call.Return(run)
	return _c
}

// DragDrop provides a mock function with given fields: e
func (_m *MockSliceViewer) DragDrop(e events.Event) {
	_m.Called(e)
}

// MockSliceViewer_DragDrop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DragDrop'
type MockSliceViewer_DragDrop_Call struct {
	*mock.Call
}

// DragDrop is a helper method to define mock.On call
//   - e events.Event
func (_e *MockSliceViewer_Expecter) DragDrop(e interface{}) *MockSliceViewer_DragDrop_Call {
	return &MockSliceViewer_DragDrop_Call{Call: _e.mock.On("DragDrop", e)}
}

func (_c *MockSliceViewer_DragDrop_Call) Run(run func(e events.Event)) *MockSliceViewer_DragDrop_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(events.Event))
	})
	return _c
}

func (_c *MockSliceViewer_DragDrop_Call) Return() *MockSliceViewer_DragDrop_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_DragDrop_Call) RunAndReturn(run func(events.Event)) *MockSliceViewer_DragDrop_Call {
	_c.Call.Return(run)
	return _c
}

// DragStart provides a mock function with given fields: e
func (_m *MockSliceViewer) DragStart(e events.Event) {
	_m.Called(e)
}

// MockSliceViewer_DragStart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DragStart'
type MockSliceViewer_DragStart_Call struct {
	*mock.Call
}

// DragStart is a helper method to define mock.On call
//   - e events.Event
func (_e *MockSliceViewer_Expecter) DragStart(e interface{}) *MockSliceViewer_DragStart_Call {
	return &MockSliceViewer_DragStart_Call{Call: _e.mock.On("DragStart", e)}
}

func (_c *MockSliceViewer_DragStart_Call) Run(run func(e events.Event)) *MockSliceViewer_DragStart_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(events.Event))
	})
	return _c
}

func (_c *MockSliceViewer_DragStart_Call) Return() *MockSliceViewer_DragStart_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_DragStart_Call) RunAndReturn(run func(events.Event)) *MockSliceViewer_DragStart_Call {
	_c.Call.Return(run)
	return _c
}

// DropDeleteSource provides a mock function with given fields: e
func (_m *MockSliceViewer) DropDeleteSource(e events.Event) {
	_m.Called(e)
}

// MockSliceViewer_DropDeleteSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDeleteSource'
type MockSliceViewer_DropDeleteSource_Call struct {
	*mock.Call
}

// DropDeleteSource is a helper method to define mock.On call
//   - e events.Event
func (_e *MockSliceViewer_Expecter) DropDeleteSource(e interface{}) *MockSliceViewer_DropDeleteSource_Call {
	return &MockSliceViewer_DropDeleteSource_Call{Call: _e.mock.On("DropDeleteSource", e)}
}

func (_c *MockSliceViewer_DropDeleteSource_Call) Run(run func(e events.Event)) *MockSliceViewer_DropDeleteSource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(events.Event))
	})
	return _c
}

func (_c *MockSliceViewer_DropDeleteSource_Call) Return() *MockSliceViewer_DropDeleteSource_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_DropDeleteSource_Call) RunAndReturn(run func(events.Event)) *MockSliceViewer_DropDeleteSource_Call {
	_c.Call.Return(run)
	return _c
}

// DropFinalize provides a mock function with given fields: de
func (_m *MockSliceViewer) DropFinalize(de *events.DragDrop) {
	_m.Called(de)
}

// MockSliceViewer_DropFinalize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropFinalize'
type MockSliceViewer_DropFinalize_Call struct {
	*mock.Call
}

// DropFinalize is a helper method to define mock.On call
//   - de *events.DragDrop
func (_e *MockSliceViewer_Expecter) DropFinalize(de interface{}) *MockSliceViewer_DropFinalize_Call {
	return &MockSliceViewer_DropFinalize_Call{Call: _e.mock.On("DropFinalize", de)}
}

func (_c *MockSliceViewer_DropFinalize_Call) Run(run func(de *events.DragDrop)) *MockSliceViewer_DropFinalize_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*events.DragDrop))
	})
	return _c
}

func (_c *MockSliceViewer_DropFinalize_Call) Return() *MockSliceViewer_DropFinalize_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_DropFinalize_Call) RunAndReturn(run func(*events.DragDrop)) *MockSliceViewer_DropFinalize_Call {
	_c.Call.Return(run)
	return _c
}

// HasStyleFunc provides a mock function with given fields:
func (_m *MockSliceViewer) HasStyleFunc() bool {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for HasStyleFunc")
	}

	var r0 bool
	if rf, ok := ret.Get(0).(func() bool); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// MockSliceViewer_HasStyleFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasStyleFunc'
type MockSliceViewer_HasStyleFunc_Call struct {
	*mock.Call
}

// HasStyleFunc is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) HasStyleFunc() *MockSliceViewer_HasStyleFunc_Call {
	return &MockSliceViewer_HasStyleFunc_Call{Call: _e.mock.On("HasStyleFunc")}
}

func (_c *MockSliceViewer_HasStyleFunc_Call) Run(run func()) *MockSliceViewer_HasStyleFunc_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_HasStyleFunc_Call) Return(_a0 bool) *MockSliceViewer_HasStyleFunc_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_HasStyleFunc_Call) RunAndReturn(run func() bool) *MockSliceViewer_HasStyleFunc_Call {
	_c.Call.Return(run)
	return _c
}

// MakePasteMenu provides a mock function with given fields: m, md, idx, mod, fun
func (_m *MockSliceViewer) MakePasteMenu(m *gi.Scene, md mimedata.Mimes, idx int, mod events.DropMods, fun func()) {
	_m.Called(m, md, idx, mod, fun)
}

// MockSliceViewer_MakePasteMenu_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MakePasteMenu'
type MockSliceViewer_MakePasteMenu_Call struct {
	*mock.Call
}

// MakePasteMenu is a helper method to define mock.On call
//   - m *gi.Scene
//   - md mimedata.Mimes
//   - idx int
//   - mod events.DropMods
//   - fun func()
func (_e *MockSliceViewer_Expecter) MakePasteMenu(m interface{}, md interface{}, idx interface{}, mod interface{}, fun interface{}) *MockSliceViewer_MakePasteMenu_Call {
	return &MockSliceViewer_MakePasteMenu_Call{Call: _e.mock.On("MakePasteMenu", m, md, idx, mod, fun)}
}

func (_c *MockSliceViewer_MakePasteMenu_Call) Run(run func(m *gi.Scene, md mimedata.Mimes, idx int, mod events.DropMods, fun func())) *MockSliceViewer_MakePasteMenu_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*gi.Scene), args[1].(mimedata.Mimes), args[2].(int), args[3].(events.DropMods), args[4].(func()))
	})
	return _c
}

func (_c *MockSliceViewer_MakePasteMenu_Call) Return() *MockSliceViewer_MakePasteMenu_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_MakePasteMenu_Call) RunAndReturn(run func(*gi.Scene, mimedata.Mimes, int, events.DropMods, func())) *MockSliceViewer_MakePasteMenu_Call {
	_c.Call.Return(run)
	return _c
}

// MimeDataType provides a mock function with given fields:
func (_m *MockSliceViewer) MimeDataType() string {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for MimeDataType")
	}

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// MockSliceViewer_MimeDataType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MimeDataType'
type MockSliceViewer_MimeDataType_Call struct {
	*mock.Call
}

// MimeDataType is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) MimeDataType() *MockSliceViewer_MimeDataType_Call {
	return &MockSliceViewer_MimeDataType_Call{Call: _e.mock.On("MimeDataType")}
}

func (_c *MockSliceViewer_MimeDataType_Call) Run(run func()) *MockSliceViewer_MimeDataType_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_MimeDataType_Call) Return(_a0 string) *MockSliceViewer_MimeDataType_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_MimeDataType_Call) RunAndReturn(run func() string) *MockSliceViewer_MimeDataType_Call {
	_c.Call.Return(run)
	return _c
}

// PasteAssign provides a mock function with given fields: md, idx
func (_m *MockSliceViewer) PasteAssign(md mimedata.Mimes, idx int) {
	_m.Called(md, idx)
}

// MockSliceViewer_PasteAssign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PasteAssign'
type MockSliceViewer_PasteAssign_Call struct {
	*mock.Call
}

// PasteAssign is a helper method to define mock.On call
//   - md mimedata.Mimes
//   - idx int
func (_e *MockSliceViewer_Expecter) PasteAssign(md interface{}, idx interface{}) *MockSliceViewer_PasteAssign_Call {
	return &MockSliceViewer_PasteAssign_Call{Call: _e.mock.On("PasteAssign", md, idx)}
}

func (_c *MockSliceViewer_PasteAssign_Call) Run(run func(md mimedata.Mimes, idx int)) *MockSliceViewer_PasteAssign_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(mimedata.Mimes), args[1].(int))
	})
	return _c
}

func (_c *MockSliceViewer_PasteAssign_Call) Return() *MockSliceViewer_PasteAssign_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_PasteAssign_Call) RunAndReturn(run func(mimedata.Mimes, int)) *MockSliceViewer_PasteAssign_Call {
	_c.Call.Return(run)
	return _c
}

// PasteAtIdx provides a mock function with given fields: md, idx
func (_m *MockSliceViewer) PasteAtIdx(md mimedata.Mimes, idx int) {
	_m.Called(md, idx)
}

// MockSliceViewer_PasteAtIdx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PasteAtIdx'
type MockSliceViewer_PasteAtIdx_Call struct {
	*mock.Call
}

// PasteAtIdx is a helper method to define mock.On call
//   - md mimedata.Mimes
//   - idx int
func (_e *MockSliceViewer_Expecter) PasteAtIdx(md interface{}, idx interface{}) *MockSliceViewer_PasteAtIdx_Call {
	return &MockSliceViewer_PasteAtIdx_Call{Call: _e.mock.On("PasteAtIdx", md, idx)}
}

func (_c *MockSliceViewer_PasteAtIdx_Call) Run(run func(md mimedata.Mimes, idx int)) *MockSliceViewer_PasteAtIdx_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(mimedata.Mimes), args[1].(int))
	})
	return _c
}

func (_c *MockSliceViewer_PasteAtIdx_Call) Return() *MockSliceViewer_PasteAtIdx_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_PasteAtIdx_Call) RunAndReturn(run func(mimedata.Mimes, int)) *MockSliceViewer_PasteAtIdx_Call {
	_c.Call.Return(run)
	return _c
}

// RowFirstWidget provides a mock function with given fields: row
func (_m *MockSliceViewer) RowFirstWidget(row int) (*gi.WidgetBase, bool) {
	ret := _m.Called(row)

	if len(ret) == 0 {
		panic("no return value specified for RowFirstWidget")
	}

	var r0 *gi.WidgetBase
	var r1 bool
	if rf, ok := ret.Get(0).(func(int) (*gi.WidgetBase, bool)); ok {
		return rf(row)
	}
	if rf, ok := ret.Get(0).(func(int) *gi.WidgetBase); ok {
		r0 = rf(row)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*gi.WidgetBase)
		}
	}

	if rf, ok := ret.Get(1).(func(int) bool); ok {
		r1 = rf(row)
	} else {
		r1 = ret.Get(1).(bool)
	}

	return r0, r1
}

// MockSliceViewer_RowFirstWidget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RowFirstWidget'
type MockSliceViewer_RowFirstWidget_Call struct {
	*mock.Call
}

// RowFirstWidget is a helper method to define mock.On call
//   - row int
func (_e *MockSliceViewer_Expecter) RowFirstWidget(row interface{}) *MockSliceViewer_RowFirstWidget_Call {
	return &MockSliceViewer_RowFirstWidget_Call{Call: _e.mock.On("RowFirstWidget", row)}
}

func (_c *MockSliceViewer_RowFirstWidget_Call) Run(run func(row int)) *MockSliceViewer_RowFirstWidget_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(int))
	})
	return _c
}

func (_c *MockSliceViewer_RowFirstWidget_Call) Return(_a0 *gi.WidgetBase, _a1 bool) *MockSliceViewer_RowFirstWidget_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockSliceViewer_RowFirstWidget_Call) RunAndReturn(run func(int) (*gi.WidgetBase, bool)) *MockSliceViewer_RowFirstWidget_Call {
	_c.Call.Return(run)
	return _c
}

// RowGrabFocus provides a mock function with given fields: row
func (_m *MockSliceViewer) RowGrabFocus(row int) *gi.WidgetBase {
	ret := _m.Called(row)

	if len(ret) == 0 {
		panic("no return value specified for RowGrabFocus")
	}

	var r0 *gi.WidgetBase
	if rf, ok := ret.Get(0).(func(int) *gi.WidgetBase); ok {
		r0 = rf(row)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*gi.WidgetBase)
		}
	}

	return r0
}

// MockSliceViewer_RowGrabFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RowGrabFocus'
type MockSliceViewer_RowGrabFocus_Call struct {
	*mock.Call
}

// RowGrabFocus is a helper method to define mock.On call
//   - row int
func (_e *MockSliceViewer_Expecter) RowGrabFocus(row interface{}) *MockSliceViewer_RowGrabFocus_Call {
	return &MockSliceViewer_RowGrabFocus_Call{Call: _e.mock.On("RowGrabFocus", row)}
}

func (_c *MockSliceViewer_RowGrabFocus_Call) Run(run func(row int)) *MockSliceViewer_RowGrabFocus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(int))
	})
	return _c
}

func (_c *MockSliceViewer_RowGrabFocus_Call) Return(_a0 *gi.WidgetBase) *MockSliceViewer_RowGrabFocus_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_RowGrabFocus_Call) RunAndReturn(run func(int) *gi.WidgetBase) *MockSliceViewer_RowGrabFocus_Call {
	_c.Call.Return(run)
	return _c
}

// RowWidgetNs provides a mock function with given fields:
func (_m *MockSliceViewer) RowWidgetNs() (int, int) {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for RowWidgetNs")
	}

	var r0 int
	var r1 int
	if rf, ok := ret.Get(0).(func() (int, int)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() int); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func() int); ok {
		r1 = rf()
	} else {
		r1 = ret.Get(1).(int)
	}

	return r0, r1
}

// MockSliceViewer_RowWidgetNs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RowWidgetNs'
type MockSliceViewer_RowWidgetNs_Call struct {
	*mock.Call
}

// RowWidgetNs is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) RowWidgetNs() *MockSliceViewer_RowWidgetNs_Call {
	return &MockSliceViewer_RowWidgetNs_Call{Call: _e.mock.On("RowWidgetNs")}
}

func (_c *MockSliceViewer_RowWidgetNs_Call) Run(run func()) *MockSliceViewer_RowWidgetNs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_RowWidgetNs_Call) Return(nWidgPerRow int, idxOff int) *MockSliceViewer_RowWidgetNs_Call {
	_c.Call.Return(nWidgPerRow, idxOff)
	return _c
}

func (_c *MockSliceViewer_RowWidgetNs_Call) RunAndReturn(run func() (int, int)) *MockSliceViewer_RowWidgetNs_Call {
	_c.Call.Return(run)
	return _c
}

// SliceDeleteAt provides a mock function with given fields: idx
func (_m *MockSliceViewer) SliceDeleteAt(idx int) {
	_m.Called(idx)
}

// MockSliceViewer_SliceDeleteAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SliceDeleteAt'
type MockSliceViewer_SliceDeleteAt_Call struct {
	*mock.Call
}

// SliceDeleteAt is a helper method to define mock.On call
//   - idx int
func (_e *MockSliceViewer_Expecter) SliceDeleteAt(idx interface{}) *MockSliceViewer_SliceDeleteAt_Call {
	return &MockSliceViewer_SliceDeleteAt_Call{Call: _e.mock.On("SliceDeleteAt", idx)}
}

func (_c *MockSliceViewer_SliceDeleteAt_Call) Run(run func(idx int)) *MockSliceViewer_SliceDeleteAt_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(int))
	})
	return _c
}

func (_c *MockSliceViewer_SliceDeleteAt_Call) Return() *MockSliceViewer_SliceDeleteAt_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_SliceDeleteAt_Call) RunAndReturn(run func(int)) *MockSliceViewer_SliceDeleteAt_Call {
	_c.Call.Return(run)
	return _c
}

// SliceGrid provides a mock function with given fields:
func (_m *MockSliceViewer) SliceGrid() *SliceViewGrid {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for SliceGrid")
	}

	var r0 *SliceViewGrid
	if rf, ok := ret.Get(0).(func() *SliceViewGrid); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*SliceViewGrid)
		}
	}

	return r0
}

// MockSliceViewer_SliceGrid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SliceGrid'
type MockSliceViewer_SliceGrid_Call struct {
	*mock.Call
}

// SliceGrid is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) SliceGrid() *MockSliceViewer_SliceGrid_Call {
	return &MockSliceViewer_SliceGrid_Call{Call: _e.mock.On("SliceGrid")}
}

func (_c *MockSliceViewer_SliceGrid_Call) Run(run func()) *MockSliceViewer_SliceGrid_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_SliceGrid_Call) Return(_a0 *SliceViewGrid) *MockSliceViewer_SliceGrid_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_SliceGrid_Call) RunAndReturn(run func() *SliceViewGrid) *MockSliceViewer_SliceGrid_Call {
	_c.Call.Return(run)
	return _c
}

// SliceNewAt provides a mock function with given fields: idx
func (_m *MockSliceViewer) SliceNewAt(idx int) {
	_m.Called(idx)
}

// MockSliceViewer_SliceNewAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SliceNewAt'
type MockSliceViewer_SliceNewAt_Call struct {
	*mock.Call
}

// SliceNewAt is a helper method to define mock.On call
//   - idx int
func (_e *MockSliceViewer_Expecter) SliceNewAt(idx interface{}) *MockSliceViewer_SliceNewAt_Call {
	return &MockSliceViewer_SliceNewAt_Call{Call: _e.mock.On("SliceNewAt", idx)}
}

func (_c *MockSliceViewer_SliceNewAt_Call) Run(run func(idx int)) *MockSliceViewer_SliceNewAt_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(int))
	})
	return _c
}

func (_c *MockSliceViewer_SliceNewAt_Call) Return() *MockSliceViewer_SliceNewAt_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_SliceNewAt_Call) RunAndReturn(run func(int)) *MockSliceViewer_SliceNewAt_Call {
	_c.Call.Return(run)
	return _c
}

// StyleRow provides a mock function with given fields: w, idx, fidx
func (_m *MockSliceViewer) StyleRow(w gi.Widget, idx int, fidx int) {
	_m.Called(w, idx, fidx)
}

// MockSliceViewer_StyleRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StyleRow'
type MockSliceViewer_StyleRow_Call struct {
	*mock.Call
}

// StyleRow is a helper method to define mock.On call
//   - w gi.Widget
//   - idx int
//   - fidx int
func (_e *MockSliceViewer_Expecter) StyleRow(w interface{}, idx interface{}, fidx interface{}) *MockSliceViewer_StyleRow_Call {
	return &MockSliceViewer_StyleRow_Call{Call: _e.mock.On("StyleRow", w, idx, fidx)}
}

func (_c *MockSliceViewer_StyleRow_Call) Run(run func(w gi.Widget, idx int, fidx int)) *MockSliceViewer_StyleRow_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(gi.Widget), args[1].(int), args[2].(int))
	})
	return _c
}

func (_c *MockSliceViewer_StyleRow_Call) Return() *MockSliceViewer_StyleRow_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_StyleRow_Call) RunAndReturn(run func(gi.Widget, int, int)) *MockSliceViewer_StyleRow_Call {
	_c.Call.Return(run)
	return _c
}

// StyleValueWidget provides a mock function with given fields: w, s, row, col
func (_m *MockSliceViewer) StyleValueWidget(w gi.Widget, s *styles.Style, row int, col int) {
	_m.Called(w, s, row, col)
}

// MockSliceViewer_StyleValueWidget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StyleValueWidget'
type MockSliceViewer_StyleValueWidget_Call struct {
	*mock.Call
}

// StyleValueWidget is a helper method to define mock.On call
//   - w gi.Widget
//   - s *styles.Style
//   - row int
//   - col int
func (_e *MockSliceViewer_Expecter) StyleValueWidget(w interface{}, s interface{}, row interface{}, col interface{}) *MockSliceViewer_StyleValueWidget_Call {
	return &MockSliceViewer_StyleValueWidget_Call{Call: _e.mock.On("StyleValueWidget", w, s, row, col)}
}

func (_c *MockSliceViewer_StyleValueWidget_Call) Run(run func(w gi.Widget, s *styles.Style, row int, col int)) *MockSliceViewer_StyleValueWidget_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(gi.Widget), args[1].(*styles.Style), args[2].(int), args[3].(int))
	})
	return _c
}

func (_c *MockSliceViewer_StyleValueWidget_Call) Return() *MockSliceViewer_StyleValueWidget_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_StyleValueWidget_Call) RunAndReturn(run func(gi.Widget, *styles.Style, int, int)) *MockSliceViewer_StyleValueWidget_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateWidgets provides a mock function with given fields:
func (_m *MockSliceViewer) UpdateWidgets() {
	_m.Called()
}

// MockSliceViewer_UpdateWidgets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWidgets'
type MockSliceViewer_UpdateWidgets_Call struct {
	*mock.Call
}

// UpdateWidgets is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) UpdateWidgets() *MockSliceViewer_UpdateWidgets_Call {
	return &MockSliceViewer_UpdateWidgets_Call{Call: _e.mock.On("UpdateWidgets")}
}

func (_c *MockSliceViewer_UpdateWidgets_Call) Run(run func()) *MockSliceViewer_UpdateWidgets_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_UpdateWidgets_Call) Return() *MockSliceViewer_UpdateWidgets_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSliceViewer_UpdateWidgets_Call) RunAndReturn(run func()) *MockSliceViewer_UpdateWidgets_Call {
	_c.Call.Return(run)
	return _c
}

// UpdtSliceSize provides a mock function with given fields:
func (_m *MockSliceViewer) UpdtSliceSize() int {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for UpdtSliceSize")
	}

	var r0 int
	if rf, ok := ret.Get(0).(func() int); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int)
	}

	return r0
}

// MockSliceViewer_UpdtSliceSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdtSliceSize'
type MockSliceViewer_UpdtSliceSize_Call struct {
	*mock.Call
}

// UpdtSliceSize is a helper method to define mock.On call
func (_e *MockSliceViewer_Expecter) UpdtSliceSize() *MockSliceViewer_UpdtSliceSize_Call {
	return &MockSliceViewer_UpdtSliceSize_Call{Call: _e.mock.On("UpdtSliceSize")}
}

func (_c *MockSliceViewer_UpdtSliceSize_Call) Run(run func()) *MockSliceViewer_UpdtSliceSize_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSliceViewer_UpdtSliceSize_Call) Return(_a0 int) *MockSliceViewer_UpdtSliceSize_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSliceViewer_UpdtSliceSize_Call) RunAndReturn(run func() int) *MockSliceViewer_UpdtSliceSize_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockSliceViewer creates a new instance of MockSliceViewer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockSliceViewer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSliceViewer {
	mock := &MockSliceViewer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

</p>
</details>

The expected possible unit tests are as follows, but I didn't succeed and need you to add them:

func TestNewMockSliceViewer(t *testing.T) {
	mockSliceViewer := NewMockSliceViewer(t)
	mockSliceViewer.EXPECT().UpdateWidgets().RunAndReturn(func() {

	})
	mockSliceViewer.EXPECT().ConfigRows().RunAndReturn(func() {

	})
	mockSliceViewer.EXPECT().AsSliceViewBase().RunAndReturn(func() *SliceViewBase {
		var obj any
		assert.NotNil(t, obj) //todo replace core demo and treeView demo`s click events later
		return obj.(*SliceViewBase)
	})

	var pos any
	//todo calc pos value and set it
	mockSliceViewer.EXPECT().DragDrop(pos).RunAndReturn(func(event events.Event) {
		assert.Equal(t, 220, pos) //todo need add this issue`s bud demo and call scroll method,last assert pos value or save to png for see.
	})

	////////////////////////////////////////////////
	mockTreeViewer := NewMockTreeViewer(t)
	mockTreeViewer.EXPECT().PathFrom(nil).RunAndReturn(func(ki ki.Ki) string {
		//todo assert more events etc.
		return ""
	})
}

If this works, we need to write mock tests for the following issues and capture the various expected events and values
https://github.com/cogentcore/core/issues/909  917  916  889

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.


Update Interpreter To Include New Policies

#37 gave us an interpreter and well-formedness checker. #41 gave us the ability to express non-work conserving policies in the DSL.
Unfortunately, the parallel progress on both of these tracks means that the interpreter, along with pretty-printing functionality, was released without accounting for the latest policies in the DSL. This PR attempts to fix that by extending the functionality of the interpreter. This also introduces adds test scripts for the programs for the new policies, cleans up the code for evaluation and pretty printing and ensures that the types are properly flattened throughout the evaluator.

An unfortunate realization I'm having is that #42 seems to implement most of the code fixes I thought of for this PR.
It's up to @anshumanmohan about how we should reconcile these, but I think that the three main issues of #42 are all addressed here:

Flattening
Fixing (and properly organizing) parsing & pretty printing
Cleaning up string_of_policy.

Never mind, I think we're ok! Managed to merge and reconcile changes from main into here, and everything still works :)

I think I've accounted for everything that was asked for now!


nginx/1.7.2 with modsecurity-2.8.0 high cpu load

When i want to use mod securtiy for filtering REQUEST_BODY i must enable SecRequestBodyAccess in order to be able to filet the requests.
When i set 'SecRequestBodyAccess On' when i make POST request with post data not bigger than a word the nginx worker hags at 100% CPU usage and does nothing. I tried to strace the worker and it seems to make 3 read from /dev/urandom and then does nothing.
Even if i have no rules that process REQUEST_BODY with SecRequestBodyAccess enabled the worker uses 100% CPU.
If i disable SecRequestBodyAccess there is no such problem but filters that include REQUEST_BODY are NOT working.

No longer a concern in libModSecurity. Marking it as won't fix for 2.x. Further information about libModSecurity available here:
https://github.com/SpiderLabs/ModSecurity/tree/v3/master


Add SwiftLint

This runs SwiftLint as a new "Run Script" phase during compilation of VelocidiSDK tests and SwiftExample. In CI, It also verifies that no diff exists after compilation.
I did not went through the trouble of refactoring the tests to get rid of the method length warning, because we only use Swift for tests. I just ignored it.
The script that runs during the build is the following:
"${PODS_ROOT}/SwiftLint/swiftlint" autocorrect && "${PODS_ROOT}/SwiftLint/swiftlint" --strict

I am autocorrecting things here.
I guess we can not do that and I am open to change that behavior. I did it this way, I guess, because the workflow to apply the required changes may be a bit cumbersome given that we may be forced to call the tool by ourselves through the command line... 🤷 . Thoughts?
This depends on #45.

@duartepinto as discussed offline, in 3066e9a and bd1645d I added a helper script to run swiftlint. Please take a look.


incompatibility with "BC Enhancement suite" extension

When using the enhancement suite extension, the tempo slider is covered by the new waveform element:
>
I have cloned the repo and will try to move it a bit to get these two extensions to work together as they are both great :)

Thanks for the report!
Looking forward to the submission. If it could just appear in the same place it does without Enhancement Suite below the time seek controls, that would be great!

is 10% maximum possible? would love 16 :P

@tadasmajeris - Please do not comment on unrelated issues with feature requests. Create a new issue
that said, watch the video in the README. You can do 6%, 10%, 16% and WIDE by clicking on the +/-10

Hi there,
Great work on this extension, although I still have the same problem as mentioned above. Also editing the bpm does not have an effect.


How to access direct url without login that is making exception for particular url?

in main.php
'as beforeRequest' => [
'class' => 'yii\filters\AccessControl',
'rules' => [
[
'actions' => ['login', 'error'],
'allow' => true,
],
[
        'allow' => true,
        'roles' => ['@'],
   ],

],
],
this code restrict me to access any url without login....but reset password url should not get restricted ..how can i make exception for that url(s).

@jgrasta, please use Official Yii forum to ask a questions - GitHub is a bug tracking system.


Matching routes question.

Hello,
Just found that HTTPRouteHandler matches any route that can handle our path. For instance, I add only .get and .delete routes with the same path with parameter, but server also response on .put and .post methods on that path (testing by Rested app as a client).
Is it a bug or feature? Or I just need to check method in the request's handler?
Thanks, and happy coding!

And by the way, if in this case I add .put route with the same path as for .get route, then only .get request handler called, even for .put request.

Hi @aplekhanov, thank you for reporting this!
I noticed a bug in HTTPMethod that was causing this behavior.
I've fixed it on the master branch and will release a new version (0.12).

A side-effect of this issue was that HEAD requests would no longer work.
I've added code to allow HEAD requests on GET routes by default. If you like you can toggle this behavior by changing implicitHeadRequests on the HTTPRouteHandler.
Version 0.12 has been released.


Document -x c++, not -x=c++

When using -x=c++ in bindgen arguments, we hit #340. We should use -x c++ instead.

@bors-servo r+
LGTM, thanks!

:pushpin: Commit d586a2c has been approved by emilio

:hourglass: Testing commit d586a2ce2f25a7486a47aa9584fd1c446097326b with merge 75c587571f38746e98f18f56c29dd7ae8884680c...

:sunny: Test successful - status-travis
Approved by: emilio
Pushing 75c587571f38746e98f18f56c29dd7ae8884680c to master...


As a server admin, I can limit nodes connecting to me via authentication.

Does this mean you shouldn't be able to allow unauthorized nodes to connect, or that we should be able to limit concurrent connections?

This is done via authentication for all routes that shouldn't be public.


Add CI for compiling fonts that pass OTS

Either wrap OTS in a crate or use the copy in pip ((pip install opentype-sanitizer then python -m ots some_font.ttf).

we don't even need any python or rust wrappers, we can simply curl and unzip the precompiled binaries for ots-sanitize CLI tool which are available on the upstream repo's github releases page:
https://github.com/khaledhosny/ots/releases/tag/v9.0.0


Integration with lombok

Today I use lombok to generate getters, setters, builders, constructors. Have you ever thing about this integration??
I tried to fixed it, but my fork is blocked by this:
https://github.com/rzwitserloot/lombok/issues/1068

I just use the annotations on my abstract classes. I don't think it's very clean but it works well.

What isn't clean, lombok or yours annotation processor?

Unfortunately it is unlikely this can be combined well with lombok. Requery generates special attribute fields which can be used in queries and other methods, which are beyond the scope of lombok. Also lombok is implemented using byte code modification, requery uses java source file generation. requery entities have generated getters/setters/equals/hashcode as needed so there shouldn't be a need to use both in the same type. Hope that makes sense thanks!


Fix/tf mapping

Status
DEVELOPMENT
Description
Fix the number of digits of xyz value in tf_mapping. Also this fixes the problem that the tf_mapping is not built under the environment of ROS Kinetic, Ubuntu 16.04.
Related PRs
Todos

[x] Tests
[ ] Documentation

Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.
Run ndt_matching
$ roslaunch ndt_localizer tf_mapping.launch

CSV files will come out in the directory which is specified in the launch file.

@kitsukawa this has also changes for stopping for stopline. In general this is a very bad practice to have to mix 2 completely different features.


[BUG] nginx return file not found with nginx-proxy

I'm using this image to run multiple sites/app on a single nginx instance. So far, I was able to run a static site and a nodejs application without problems but I'm facing an issue with a php application created with codeigniter.
Essentially the project structure looks like this:
nginx
    nginx-proxy
       docker-compose.yml
    php-application
       docker-compose.yml

Inside the php-application/docker-compose.yml I have this:
version: '3.7'

services:
  php-fpm:
    container_name: boilerplate_app
    restart: always
    build:
      context: .
      dockerfile: ./docker/php-fpm/Dockerfile
    volumes:
      - ./src:/var/www/html
    environment:
      # NGINX-PROXY ENVIRONMENT VARIABLES: UPDATE ME
      - VIRTUAL_HOST=mysite.com
      - VIRTUAL_ROOT=/var/www/html
      - VIRTUAL_PORT=9000
      - VIRTUAL_PROTO=fastcgi
      - LETSENCRYPT_HOST=mysite.com
      -<EMAIL_ADDRESS>      # /END NGINX-PROXY ENVIRONMENT VARIABLES
    ports:
      - '9000:80'
    expose:
      - 9000
    networks:
      - proxy

  #nginx:
  #  container_name: boilerplate_nginx
  #  build: ./docker/nginx
  #  restart: always
  #  volumes:
  #    - ./src:/var/www/html
     # - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
     # - ./docker/nginx/sites/:/etc/nginx/sites-available
     # - ./docker/nginx/conf.d/:/etc/nginx/conf.d
  #  ports:
  #    - '8880:80'
  #  depends_on:
  #    - php-fpm
  #  networks:
  #    - proxy

  database:
    container_name: boilerplate_db
    restart: always
    build:
      context: ./docker/database
    environment:
      - MYSQL_DATABASE=boilerplate
      - MYSQL_USER=user
      - MYSQL_PASSWORD=secret
      - MYSQL_ROOT_PASSWORD=secret
    volumes:
      - ./docker/database/data.sql:/docker-entrypoint-initdb.d/data.sql

  phpmyadmin:
    container_name: boilerplate_phpmyadmin
    image: phpmyadmin/phpmyadmin
    restart: always
    ports:
      - 8088:80
    environment:
      - PMA_HOST=database
      - MYSQL_USER=user
      - MYSQL_PASSWORD=secret
      - MYSQL_ROOT_PASSWORD=secret
    depends_on:
      - database

networks:
  proxy:
    external:
      name: nginx-proxy

The php application runs over php-fpm specifically on the port 9000 using fastcgi, for this I used the following directives:
  - VIRTUAL_ROOT=/var/www/html/public
  - VIRTUAL_PORT=9000
  - VIRTUAL_PROTO=fastcgi

to make it working, I also specified the VIRTUAL_ROOT that should redirect all the request on the index.php which is available in this directory /var/www/html/public. Project structure:
php-application
    src
        node_modules
        app
        public
        tests
        vendor
        writable
        .env
        composer.json
        package.json
        spark

the problem's that when I start the php-application container using docker-compose up --build -d, I get this when I visit mysite.com (hide for privacy the real domain):

File not found.

Inspecting the nginx log using sudo docker logs -f nginx I get:
[error] 30#30: *39 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP_ADDRESS>, server: mysite.com, request: "GET / HTTP/2.0", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "mysite.com"
mysite.com <IP_ADDRESS> - - [29/Mar/2021:17:52:31 +0000] "GET / HTTP/2.0" 404 16 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.63"

what I did wrong?
UPDATE:
output of /var/log/nginx/error.lg
2021/03/30 10:53:22 [notice] 98#98: signal process started
2021/03/30 10:53:32 [warn] 99#99: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/example.com.crt"
2021/03/30 10:53:32 [error] 99#99: *305 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP_ADDRESS>, server: example.com, request: "GET / HTTP/2.0", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "example.com"
2021/03/30 10:53:32 [error] 99#99: *305 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP_ADDRESS>, server: example.com, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "example.com", referrer: "https://example.com/"

UPDATE 2
/etc/resolve.conf

Hello @cod3rshotout!
This is not a bug in the nginx-proxy-automation... but more a config in your set up. How is your php-fpm running? Can you share your Dockerfile and entrypoint script?
You must check the settings on the fpm to respond, the proxy seems to be doing it's job.
There is a similar issue on this:
https://github.com/evertramos/nginx-proxy-automation/issues/219
I might take a took by tomorrow on that as well ok?
I you find the solution by then, please post it here for future reference.
Thanks!

Hi @evertramos thanks for your quick reply, I've been trying to fix this issue for days without any luck.
My php application has been written using CodeIgniter 4 and the app structure is the following:
php-application
   docker
       php-fpm
            config
                php.ini
           Dockerfile
   src
       node_modules
       app
       public
       tests
       vendor
       writable
       .env
       composer.json
       package.json
       spark
   docker-comopse.yml

the index.php file is available inside the public folder.
The docker-compose.yml of php-application contains the following stuff:
version: '3.7'

services:
  php-fpm:
    container_name: boilerplate_app
    restart: always
    build:
      context: .
      dockerfile: ./docker/php-fpm/Dockerfile
    volumes:
      - ./src:/var/www/html
    environment:
      # NGINX-PROXY ENVIRONMENT VARIABLES: UPDATE ME
      - VIRTUAL_HOST=mysite.com
      - VIRTUAL_ROOT=/var/www/html/public
      - VIRTUAL_PORT=9000
      - VIRTUAL_PROTO=fastcgi
      - LETSENCRYPT_HOST=mysite.com
      -<EMAIL_ADDRESS>      - NETWORK=proxy
      # /END NGINX-PROXY ENVIRONMENT VARIABLES
    ports:
      - '9000:80'
    expose:
      - 9000
    networks:
      - proxy

  database:
    container_name: boilerplate_db
    restart: always
    build:
      context: ./docker/database
    environment:
      - MYSQL_DATABASE=boilerplate
      - MYSQL_USER=user
      - MYSQL_PASSWORD=secret
      - MYSQL_ROOT_PASSWORD=secret
    volumes:
      - ./docker/database/data.sql:/docker-entrypoint-initdb.d/data.sql

  phpmyadmin:
    container_name: boilerplate_phpmyadmin
    image: phpmyadmin/phpmyadmin
    restart: always
    ports:
      - 8088:80
    environment:
      - PMA_HOST=database
      - MYSQL_USER=user
      - MYSQL_PASSWORD=secret
      - MYSQL_ROOT_PASSWORD=secret
    depends_on:
      - database

networks:
  proxy:
    external:
      name: proxy

essentially I have three services:

php-fpm: which mount the application files in the /var/www/html folder, and in the environment section, I have specified the VIRTUAL_PORT as 9000 'cause php-fpm runs over fastcgi. Then I linked the proxy network which is the network of your image.
database: runs within the app network
phpmyadmin: runs within the app network

The Dockerfile content of php-fpm contains the following stuff:
FROM php:8.0.2-fpm-alpine
WORKDIR /var/www/html

RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mysqli
RUN apk add icu-dev

# Install intl
RUN docker-php-ext-configure intl && docker-php-ext-install intl

# Install curl
RUN apk add --update libzip-dev curl-dev &&\
    docker-php-ext-install curl && \
    apk del gcc g++ &&\
    rm -rf /var/cache/apk/*

COPY docker/php-fpm/config/php.ini /usr/local/etc/php/

# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

# Install nodejs
RUN apk add --update nodejs nodejs-npm
RUN npm install gulp-cli -g
RUN npm install

COPY src src/

CMD ["php-fpm"]

EXPOSE 9000

when I start the container using docker-compose up --build -d I get this message when I visit mysite.com (I have hidden the real domain for privacy):

FIle not found

and when I inspect the log of your image: sudo docker logs -f nginx I get:
2021/03/30 10:53:22 [notice] 98#98: signal process started
2021/03/30 10:53:32 [warn] 99#99: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/mysite.com.crt"
2021/03/30 10:53:32 [error] 99#99: *305 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP_ADDRESS>, server: mysite.com, request: "GET / HTTP/2.0", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "mysite.com"
2021/03/30 10:53:32 [error] 99#99: *305 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP_ADDRESS>, server: mysite.com, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "mysite.com", referrer: "https://mysite.com/"

Thanks in advance for any help.
Kind regards

Hi @evertramos another test that I did is update the nginx template with this:
https://gofile.io/d/SQl3KH
Now the "File not found" error is gone, but all the static files such js, CSS and images aren't loaded, infact I get 404.
Could you help me please?

Hello @cod3rshotout!
Today I got some time and took me a couple hours to figure it out, but here it is, follow the steps:
1. Create a simple docker compose file as of (docker-compose.yml):
version: "3.9"

services:
  php-fpm:
    image: php:fpm-alpine3.13
    container_name: php-fpm
    volumes:
      - ./../data/site:/var/www/html
    environment:
      - VIRTUAL_HOST=[your url]
      - LETSENCRYPT_HOST=[your url]
      - VIRTUAL_PROTO=fastcgi

networks:
  default:
    external:
      name: proxy

Update '[your url]' with your own URL

This is my index.php which was in volume above:
<?php

echo "PHP FPM over nginx-proxy!";

2. Add special settings to nginx-proxy to your URL
As of quoted in the nginx proxy, we can have special setting per host as following instruction below:

Per-VIRTUAL_HOST
Per-VIRTUAL_HOST location configuration

Find the ./vhost.d which was binded in the proxy.
You can find the right path at NGINX_FILES_PATH variable at .env file.
The files below must be added to the right place which is ./vhost.d folder.
So, here are the files:
file 1 under the name: [your url]_location
try_files $uri $uri/ /index.php?$args;

file 2 under the name: [your url]
root   /var/www/html;
index index.php;

location ~ [^/]\.php(/|$) {
  fastcgi_split_path_info ^(.+?\.php)(/.*)$;

  include fastcgi_params;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_param PATH_INFO       $fastcgi_path_info;
  fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

  fastcgi_pass   [your url];
  fastcgi_index  index.php;
}

Make sure to update [your url] with your domain name, in the file name and in the fastcgi_pass above.

3. Fire up your docker-compose (php-fpm) and be happy! 😃

Hi @evertramos many thanks for your precious help! You've helped me a lot! The file not found problem seems resolved, even with the original nginx.tmpl, so this is amazing!
I just have few questions:

I have created in NGINX_FILES_PATH, specifically in the vhost.d folder two files as you suggested:

mysite.com, which contains this:
Start of configuration add by letsencrypt container
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
auth_request off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
End of configuration add by letsencrypt container
root   /var/www/html/public;
index index.php;
location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+?.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO       $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass   assoservizi.proxwebsoft.it;
fastcgi_index  index.php;
}

and mysite.com_location, which contains this:
try_files $uri $uri/ /index.php?$args;

inside the app which runs over php-fpm I have this docker-compose.yml content:
version: '3.9'

services:
boilerplate_app:
    container_name: boilerplate_app
    restart: always
    build:
    context: .
    dockerfile: ./docker/php-fpm/Dockerfile
    volumes:
    - ./src:/var/www/html
    - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
    - ./docker/nginx/sites/:/etc/nginx/sites-available
    - ./docker/nginx/conf.d/:/etc/nginx/conf.d
    environment:
    # NGINX-PROXY ENVIRONMENT VARIABLES: UPDATE ME
    - VIRTUAL_HOST=mysite.com
    - VIRTUAL_ROOT=/var/www/html/public
    - VIRTUAL_PORT=9000
    - VIRTUAL_PROTO=fastcgi
    - LETSENCRYPT_HOST=mysite.com
    -<EMAIL_ADDRESS>    # /END NGINX-PROXY ENVIRONMENT VARIABLES

when I do docker-compose up --build -d the site load correctly but all the static files such as images, js and css return 404. I did something bad or I missed something?

When I have created the two files: mysite.com and mysite.com_location, I changed the vhost.d owner as my linux user instead of root is this a good practice?

Thanks again for your precious help!
Kind regards

@cod3rshotout are you using Laravel?
If so, open a new discussion on that I will help you out there... and I will delete this last post and lock the issue. ok?
Wait on you.

@evertramos I'm using CodeIgniter 4 with this app starter:
https://github.com/agungsugiarto/boilerplate
If is possible, I can send you my code via email, I cannot paste the source here. Let me know where I can send my app.
Thanks again

In order to serve the static files from a container using the nginx proxy, the nginx proxy must have access to files statically... it would not 'proxy' but 'read' and serve the files... which means you must mount the app files into the proxy... PLEASE DON'T GO THAT WAY!
I would recommend you put up a new, light and clean nginx begind the nginx proxy along with your php-fpm service so you can have full management of your routes/locations,
Here is a very simple example:
https://github.com/evertramos/nginx-behind-proxy
Hope it helps!

Thanks for the tips of @evertramos I was able to make it working.
First of all I have created a docker-compose.yml in my app that contains the following:
version: '3.9'

services:

php-fpm:
    container_name: boilerplate_app
    restart: always
    build:
    context: .
    dockerfile: ./docker/php-fpm/Dockerfile
    volumes:
    - ./src:/var/www/html

nginx:
    image: nginx:stable-alpine
    container_name: boilerplate_nginx
    restart: always
    volumes:
    - ./src:/var/www/html
    - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
    - ./docker/nginx/sites/:/etc/nginx/sites-available
    - ./docker/nginx/conf.d/:/etc/nginx/conf.d
    depends_on:
    - php-fpm
    environment:
    VIRTUAL_HOST: example.com
    LETSENCRYPT_HOST: example.com
    LETSENCRYPT_EMAIL<EMAIL_ADDRESS>
database:
    container_name: boilerplate_db
    restart: always
    build:
    context: ./docker/database
    environment:
    - MYSQL_DATABASE=boilerplate
    - MYSQL_USER=user
    - MYSQL_PASSWORD=secret
    - MYSQL_ROOT_PASSWORD=secret
    volumes:
    - ./docker/database/data.sql:/docker-entrypoint-initdb.d/data.sql

phpmyadmin:
    container_name: boilerplate_phpmyadmin
    image: phpmyadmin/phpmyadmin
    restart: always
    ports:
    - 8088:80
    environment:
    - PMA_HOST=database
    - MYSQL_USER=user
    - MYSQL_PASSWORD=secret
    - MYSQL_ROOT_PASSWORD=secret
    depends_on:
    - database

networks:
default:
    external:
    name: proxy

then, inside my app directory I have created the nginx configurations structure:
app
   docker
       nginx
           conf.d
              default.conf
           sites
              default.conf
        nginx.conf

where I have conf.d:
upstream php-upstream {
    server php-fpm:9000;
}

then I have sites:
server {
    root   /var/www/html/public;
    index index.php;

    location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;

    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO       $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

    fastcgi_pass   php-upstream;
    fastcgi_index  index.php;
    }
}

and nginx.conf:
user  nginx;
worker_processes  4;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    access_log  /var/log/nginx/access.log;
    # Switch logging to console out to view via Docker
    #access_log /dev/stdout;
    #error_log /dev/stderr;

    sendfile        on;
    keepalive_timeout  65;

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-available/*.conf;
}

the site load now but there are some issues:

Performance issue: we have two nginx layer here and the load time is increased a lot
If I browse some url like example.com/admin I get 404 from nginx, guess it's a configuration issue on my own