Facepunch / sbox-issues

175 stars 12 forks source link

Razor UI Elements Don't Play Outro #2569

Open damienfamed75 opened 1 year ago

damienfamed75 commented 1 year ago

Describe the bug

Any razor elements that has an intro or outro specified in the stylesheet doesn't play.

To Reproduce

Add an outro to a razor UI element and delete it with immediate = false

Expected behavior

When deleting a razor UI element the outro should play, same with the intro

Media/Files

Here's just a black screen with a button to Delete the razor element. I have set that all events have a 5 second transition ease-in-out, but as you can see it's just instant

https://user-images.githubusercontent.com/17505288/202782259-34db13a4-452f-4c98-8e9b-0b255388150a.mp4

Additional context

No response

matekdev commented 1 year ago

I ran into this as well when converting my UI to razor. It would be nice if we could apply &:intro and &:outro to elements when they are programmatically created/removed via razor.

@foreach(var item in Items)
{
  // <ItemThing @Item=@item />
}

where ItemThing in this case would play the intro / outro if it is created/deleted on the next re-render.

trundlr commented 7 months ago

Any chance this can be added to the tracker? Can confirm it's still an issue. In my case, conditionally rendered blocks do not get an outro played on them.

matekdev commented 7 months ago

Yeah it would be nice if we could get this fixed!

MrBrax commented 7 months ago

pretty sure this is working for me, is this a hashing issue?

trundlr commented 7 months ago

pretty sure this is working for me, is this a hashing issue?

Nope!

MrBrax commented 7 months ago

seems like i was imagining things, it is broken yes

badandbest commented 7 months ago

I am pretty sure that outros were working for me too when deleting a panel.

But intros and outros have a habit of skipping when:

matekdev commented 7 months ago

I am pretty sure that outros were working for me too when deleting a panel.

But intros and outros have a habit of skipping when:

  • Toggling fullscreen mid-transition.
  • Destroying the panels component.

Yes they work fine when deleting them. It's when conditionally rendering them via razor that is busted.

It might be worthwhile to provide some reproductions for your cases.

matekdev commented 3 months ago

Just tested this, still busted.