GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

Event sheet tabs take a second to set correct layout

Open animel3000 opened this issue 11 months ago • 7 comments

Is there an existing issue for this?

Describe the bug

When switching tabs in the event editor, it takes about a second or two to set the correct width of the conditions column. At first I thought it might be because of the amount of external events or events in general, but it happens in a fresh project as well.

https://github.com/user-attachments/assets/f855e779-fd5d-4faf-b589-91f54ba8ff1a

Steps to reproduce

  1. In a fresh project, add 2 or more external events, open each as a tab and choose to include them in the main scene.
  2. Create one event in each external event. The event conditions and actions can be empty.
  3. When switching from one external event tab to the other, it will now take a second to set the width correctly.

GDevelop platform

Desktop

GDevelop version

5.5.223

Platform info

OS (e.g. Windows, Linux, macOS, Android, iOS)

Windows

OS Version (e.g. Windows 10, macOS 10.15)

Windows 11 Pro, 10.0.26100 Build 26100

Browser(For Web) (e.g. Chrome, Firefox, Safari)

Device(For Mobile) (e.g. iPhone 12, Samsung Galaxy S21)

Additional context

No response

animel3000 avatar Jan 30 '25 13:01 animel3000

Hey @animel3000 thanks for reporting the issue and taking the time to reproduce it with an empty project.

I can confirm I see the same behavior. Looks like a refresh of the UI not happening instantly.

https://github.com/user-attachments/assets/c5f0c043-c127-4dbe-a0c5-82c6bef30938

ClementPasteau avatar Feb 05 '25 09:02 ClementPasteau

I've also noticed this in my project too after the latest update.

AyItzMatt avatar Feb 21 '25 12:02 AyItzMatt

Hey @animel3000 @AyItzMatt @ClementPasteau, can you please assign this issue to me and my colleague @amadotiago? We have a university project and we chose this issue for it. We think we have a solution for this, and are already in the testing phase.

necaTecnico avatar Jun 02 '25 11:06 necaTecnico

Feel free to give it a try :)

4ian avatar Jun 02 '25 12:06 4ian

Thanks @4ian !

necaTecnico avatar Jun 02 '25 12:06 necaTecnico

Note that I recently refactored this class: https://github.com/4ian/GDevelop/blob/f6c43b2db34df22f8044bdb3cdcb40f555c97c73/newIDE/app/src/EventsSheet/EventsTree/index.js#L404

There is sadly still this flickering when the first rendering is happening.

4ian avatar Jun 02 '25 12:06 4ian

Ok we will have a look and take it into consideration @4ian! Thanks!

necaTecnico avatar Jun 02 '25 14:06 necaTecnico