Debugging TJSMenu for Auto Animations on Level Up - 5e

Just a forum thread to discuss and explore an interesting phenomenon w/ TJSMenu not responding on the Level Up - 5e system. Both the module and system use TRL.
28 Replies
Otigon
Otigon2y ago
Don't think it's browser related, same behavior across Chrome/Edge/Firefox
Nekro Darkmoon
This is the only component where TJSMenu and TJSIcons could have possibly been changed
TyphonJS (Michael)
Could certainly be the global CSS in SortFilter... Generally scoping that more specifically could be good. Also you don't need to use global to change the CSS vars for that particular component. That probably will change it system wide due to the global. A fair amount of effort also was spent on TJSMenu in the most recent releases / probably ~v0.0.22 to polish it off, so seeing how AA responds when things are updated to 0.0.23 is a good starting point for an investigation. I'll go and install things and take a look though.
Otigon
Otigon2y ago
I just updated to Standard v 0.0.23, no change
Nekro Darkmoon
I can try to see if removing that global helps
TyphonJS (Michael)
Yeah.. I suppose commit a build in the repo and I'll update / install directly. This is on v10 I assume as well.
Otigon
Otigon2y ago
indeed, V10
TyphonJS (Michael)
You can add variables to any element so best to change the variables for the menu under .filters: https://github.com/Pjb518/FoundryVTT-Level-Up-Official/blob/main/src/apps/components/SortFilter.svelte#L122 I can also add more CSS variables so that you don't have to target specifically things like
&::before {
content: "";
...
}
&::before {
content: "";
...
}
and this section: https://github.com/Pjb518/FoundryVTT-Level-Up-Official/blob/main/src/apps/components/SortFilter.svelte#L174-L187
Otigon
Otigon2y ago
Well that's weird, I cloned A5e locally, built and compiled it, and I don't have the issue aymore I had to have borked something somewhere
Nekro Darkmoon
testing it locally and it definitely has to do with the :global scope of things
Nekro Darkmoon
Without
Nekro Darkmoon
WIth
Nekro Darkmoon
its that &::before We can fix this in our release coming out today
TyphonJS (Michael)
Do keep me posted. I'm definitely down to take a look. The next release will hopefully occur by next weekend. Indeed a bit of reorganization of some parts of TRL.... Good news is that API docs for the ESM code should launch as well! The global styles are a likely source of some behavior seen. Yeah.. Take a look at TJSMenu as it should now have pretty good CSS variable coverage. If there is anything I can add for the next release I can get it in there so that it is easier to scope changes to blocks with just the CSS vars and not specifically targeting the classes of TJSMenu. Also you can globally scope with a preceding class... Likely if you moved the global block inside: https://github.com/Pjb518/FoundryVTT-Level-Up-Official/blob/main/src/apps/components/SortFilter.svelte#L140-L146 That likely fixes things and still achieves the alterations you are going for...
Otigon
Otigon2y ago
My first experience of Svelte on Svelte violence 😛 . Thanks for taking a look guys, this one had me stumped
Nekro Darkmoon
@otigon 0.10.17 is released and should fix the issue 😄
TyphonJS (Michael)
Hah... CSS violence! ;P I am slightly concerned though @nekrodarkmoon that you need that in particular looking at the without and with video above. It's not clear why there is no background without as here is the default CSS variable setup for TJSMenu background: https://github.com/typhonjs-fvtt-lib/svelte-standard/blob/main/src/component/standard/menu/TJSMenu.svelte#L566
Nekro Darkmoon
--tjs-menu-background: url("/ui/denim075.png") repeat, rgba(0 0 0 / 0.15);
--tjs-menu-background: url("/ui/denim075.png") repeat, rgba(0 0 0 / 0.15);
I went for a simpler approach than using ::before cz for some reason that didn't cross my mind before 😄 though
TyphonJS (Michael)
Ah, gotcha so you don't need the before
Nekro Darkmoon
yeah 😄 I'm not sure why there is no background in that example either 😄
Nekro Darkmoon
because this should be the default background for tjsmenu
TyphonJS (Michael)
Yeah, that looks right / solid background color off / white main color. It's possible that AA was on a previous release before I solidified the TJSMenu CSS variables which I think happened around Jan / Feb if I recall.
Nekro Darkmoon
Eagerly awaiting for the next release 🤞 its got some nice features
Otigon
Otigon2y ago
Confirmed it's back to normal 😛 Thanks for the quick fix
Nekro Darkmoon
np ❤️
Want results from more Discord servers?
Add your server