DRAFT: convert user-post-pages to new pattern demo #185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft PR is an example of a proposed new pattern that we can use to make theming the app easier.
The idea here works like this
+page.svelte
file. We should try to keep most of the non-client-side login in the+page.server.ts
file and pass the data down.components
folder inside each route. In it, we define as many parts as possible that the route needs, but we try to keep them closer to a "view" side and less on the logic side.$lib
and make it even more reusable.As far as theming goes, the super long-term goal is to keep most things CSS based, but also allow a certain (but tightly controlled option to override "templates". To be clear though, CSS-only theming is 80% of our focus for now.
A theme can be a simple, scoped CSS file, or it can also define "views"
The two guard-rails for us are
This means that
The TL;DR here is this
Page.svelte
component for a route. We provide the same "data" we use in core, but they're free to add more stuff as needed.+page.server.ts
file for now. It's a problem that doesn't need to be solved.If this pattern is OK for us, we can split the work into multiple stages.