Facepunch / sbox-issues

175 stars 12 forks source link

Partial `.cs` file messes up `.razor` file when using implied stylesheet path #3878

Open matekdev opened 1 year ago

matekdev commented 1 year ago

Describe the bug

I'm just going to describe the issue in the reproduction steps. However, this problem causes two issues

  1. It is unable to find the stylesheet
  2. Hotloading for said UI panel is completely busted

To Reproduce

  1. Create a razor file test.razor that uses @attribute [StyleSheet] at the top
  2. Create a scss file named test.razor.scss, these two files are now linked together
  3. If you create an additional test.cs partial definition which contains client rpcs you will end up with the two bugs described above.

Expected behavior

Normally, if you have a test.razor file with @attribute [StyleSheet], and a scss file with test.razor.scss, these two link together without any issues.

Media/Files

No response

Additional context

No response

anthonysharpy commented 1 year ago

that does sound like a bug, but in case it's any help i think if you call it .razor.cs it does work with client rpcs (at least for me) ... unless it's something that broke very recently

Remscar commented 1 week ago

Encountered this as well.

Looks like @xezno made a commit recently that deprecated the need of using the attribute, but this bug still remains. image

Using panelname.razor.cs works, but it would be ideal if it didn't require doing .razor.cs