-
Notifications
You must be signed in to change notification settings - Fork 79
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
Create a GitHub pages site with the bevy_ggrs
example
#244
Conversation
For some reason I don't seem to be able to get the bevy app to mount to my canvas, resulting in the following error:
This is despite the |
f5d126e
to
63d2abd
Compare
080a7ef
to
4370405
Compare
I think this was an issue where either trunk or bevy updated and things broke. I stopped maintaining bevy-shell-template immediately after releasing it (as it was more-of an experiment for me). I can help look into this when I have some time soon- |
Oooh, nice one! Does this mean attaching to a canvas is currently broken in Bevy? |
I wouldn't say it's broken, that's a bit strong. Bevy will add the canvas and the resize listener (if |
I'm a bit out of the loop (and new to trunk and yew). Why can't we use |
Think this should now work with some configuration in the GitHub pages settings for the repo. @johanhelsing would you happy to have a go at this? |
</div> | ||
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does yew give us, compared to just vanilla css in index.html?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, nothing. I had been playing around with little landing page that allowed you to choose a "room" to pass to the app but stripped it back to be basics to try get it working. If we want to do something like that It'd be worth keeping, but if not then simple is preferable
I set the repo's Pages source to github actions, should that be enough? Thanks for working on this :) |
Maybe it needs to be on a branch in this repo for it to deploy properly? |
Looks like the environment protection rules are preventing it, iirc there is an option for which branches can push to an environment in the settings
Potentially, it may not be possible to relax the protection rules to allow pushing from forks |
Yew+Styling just provide a way to insert CSS stylesheets at runtime and replace the DOM . |
#[styled_component(Root)] | ||
fn root() -> Html { | ||
global_style!( | ||
r#" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the strings are actually not necessary. The global_style! and css! macros understand CSS as a DSL; Strings are usually used here for the same reasons as format!(), because it allows variable substitution.
Should we perhaps get rid of yew, if it doesn't add anything? We can always add it later if we have a use case for it... |
If the intention is to have a more grandiose website for the project like https://trunkrs.dev/, I think we should keep Yew. If it's just a blank page with a canvas, I'm all for the removal. Yew tends to keep things cleaner when sites get complex, but not necessarily for a small application. |
I'll try pushing to a branch in this repo, then. Would be nice to get this merged! |
Resolves #212
Code largely borrowed from bevy-shell-template