-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
chore: Backport much of #793 #1073
Conversation
Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
@@ -88,12 +90,11 @@ | |||
"node-fetch": "^2.6.1", | |||
"preact": "10.15.1", | |||
"preact-custom-element": "^4.3.0", | |||
"preact-iso": "2.2.0", |
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.
Something in 2.3.0+ (I'm guessing preactjs/wmr#864) results in onLoadEnd
never being called on first page rendered, so our our loading bar is in the "loading" state until the user switches pages.
//console.error(`Unknown language: ${lang}`); | ||
return code; |
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.
We're missing bash
& diff
, both are rather inconsequential (throwing is now an actual problem, just not one worth addressing right now, hence the comment out)
// TODO: Webpack creates a circular dependency that | ||
// it cannot resolve. Temporarily disabled | ||
//useEffect(() => { | ||
// if (meta && meta.next) { | ||
// getContent([lang, meta.next]); | ||
// } | ||
//}, [meta && meta.next, url]); |
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.
As the comment says, unfortunately lazy loading the tutorial creates a circular dep that Webpack is not a big fan of. I couldn't figure out any way to stop it from dying.
Suggestions certainly welcome if you got 'em.
// TODO: SolutionProvider should really just wrap the tutorial, | ||
// but that requires a bit of refactoring | ||
import { SolutionProvider } from './controllers/tutorial/index.js'; |
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.
As noted, this is a bit weird due to the current state of the tutorial page. Really need to refactor it into a few different components w/ a shell, but haven't yet gotten to it.
47be2de
to
089b99e
Compare
Vast majority of this is Marvin's. Had some great stuff sitting around in the WMR PR that I wanted to nab
Does 3 major things:
preact-iso
for routing, lazy loading.unistore
toContext
for most itemscontrollers/page
and creates separate DocPage, Blog, etc. Much cleaner, much simpler.I tried to keep the diff down but... this is gonna be a big one. Sorry.
Shouldn't be any functional differences on the site.