-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
p0
- fix failing swr test
- add swr test route (use time api or api where data updates quickly)
- try/catch around client code
- router.route,is_navigating: make readonly (use a getter/setter). however i would have to make sure .set() can't be called. ie use a readable. but this is a bit tricky
- children routes / route aliases / redirect / canonicals
- route metadata, eg meta.auth_required=true, then in beforeNav, check for that
- we would have to check before_navigate's return value
- Focus restoration for accessibility (see kit's docs/code)
- get_page_path() helper to avoid hard coding URL in templates. It is better to use the router as a single place of truth.
- Use svelte's new forking (for awaits/fetches inside the component)
- use urlpattern (new api)
- go to post page, click on post, go to different page, click back twice = it does not go back to the top of the page even though it should.
hierarchical loaders
const routes = [
{
loaders: [fetch(), fetch(), fetch()],
routes: [
['/', Home],
['/games', Games],
['/login', Login],
['/onboarding', Onboarding],
],
},
{
loaders: [fetch(), fetch(), fetch()],
routes: [
['/pricing', Pricing],
['/settings', Settings],
['/stories', Stories],
],
},
]http codes + redirects
- error pages (should fetch from client app at predefined routes, eg /404, /500)
-
<svelte:boundary />: 500 error (probably not needed, as that's what the app returns) - only errors that should happen are 404 (and sometimes 500. add sentry to api so it notifies asap)
- redirects? (not sure i need this. but if so, need to add a column to pages_cache. or use a special value for html, so if header_code is 301, redirect to html value)
- tldr:
window.navgo.route.code, and cache /404 + /500 to serve when necessary. redirect: can also use .code, and for redirect value: hmmm.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels