-
-
Notifications
You must be signed in to change notification settings - Fork 302
[Installer] Dynamic theme preview loading, Iframe previews, and other small improvements #1036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[Installer] Dynamic theme preview loading, Iframe previews, and other small improvements #1036
Conversation
I fixed the things you brought up, but I still don't get why the iframes are inheriting the variable values from the parent page. It even seems to have gotten worse now after setting the theme with C# for some reason. I've already tried the following to fix it, but none of my attempts have even been slightly successful:
|
I suppose I could test web components. If that doesn't work, then I will probably close this PR and create a new one with just the dynamic theme preview loading (for a clean commit history) and leave the improved preview part to someone more capable than me. |
what specifically is happening? |
Ah, sorry for not saying what's happening... Here's a screenshot of how it looks in its current state: Basically, it seems like all theme preview iframes inherit the CSS variable values from the parent page (the install page) at load (they don't change styling when changing the theme preview), ignoring the variable values they are given by the theme file they're supposed to be showing off in the actual theme preview iframe. Well, apart from Punked, which seems to have a higher specificity for the generate button and middle generate button in its CSS file. I hope I made sense lol |
more likely you're just seeing the default cookie-based theme application and not replacing it properly? |
That could definitely be the issue, I hadn't thought of that |
Also, do you think it'd be better to have a (Legacy) badge after legacy themes' names, similar to how it looks in the theme picker in the user settings, or leave it the way it is now? @mcmonkey4eva |
leave that as-is |
I've implemented the ViewData thing you suggested. I am trying to find the Core Parameters so I can copy it over, but I can't find it |
Parameters on the generate tab are generated by JS. |
I am getting nowhere. I cannot figure out how to get the params to be generated by JS, and I cannot find any code I can use as an example in any of the files. |
None of the buttons should do anything when clicked (other than basic buttonstate stuff) |
Known issue: two icons are present in the seed buttons in modern themes
This is looking really solid. Just needs some minor refinements I think and it's ready to go. |
yeah the noise background texture should be included where relevant yeh |
Oh yeah, in the browser console there is an error about recursion that keeps spamming the browser error log whenever you click in a preview. It stops spamming when you click outside the preview. Screencast_20251004_232305.mp4(Sorry about the laggy recording) |
Added dynamic loading of theme previews, and switched the preview type to iframe. Other than that, I made some small aesthetic improvements such as: emphasis color on the border of the preview of the currently applied theme, more vertically centered theme preview title, and a small space to the left of the radio.
In the picture, you may notice that a theme or two doesn't have the correct colors on the generate button. I believe that is caused by the theme not explicitly defining said color in its theme file. I think I may know a fix for this issue.EDIT: The above guess was not close to the real issue at all.