drastically reduced boilerplate for the end user; ready-made templates to drag and drop
bits of functionality can be loaded on demand for advanced or special templates
for us: easier to maintain, test, and write
The malefits:
code is not self contained. We could provide an automated bundle that gives the code though
the code is not local, which means functions need to favor options rather than changing them. I intend to work around that by making functions so small and specific that it's easier to write your own.
Idea:
move all the functionality currently in the `/modules` directory into npm modules, which can then be loaded statically through
```html
<script type="module">
import blog from "https://esm.sh/@tickle/blogTemplate";
blog()
</script>
```
A single component can also be loaded:
```html
<script type="module">
import fetchMarkdown from "https://esm.sh/@tickle/fetchMarkdown";
fetchMarkdown("thing.md").then(...
</script>
```
The benefits:
1. drastically reduced boilerplate for the end user; ready-made templates to drag and drop
2. bits of functionality can be loaded on demand for advanced or special templates
3. for us: easier to maintain, test, and write
The malefits:
1. code is not self contained. We could provide an automated bundle that gives the code though
2. the code is not local, which means functions need to favor options rather than changing them. I intend to work around that by making functions so small and specific that it's easier to write your own.
reposted from discord to continue discussion from there:
all in all, im down for separating it into modules, i think the benefits outweigh the malefits
i do have a few concerns we could iron out:
what about offline use? provide bundled libraries?
how would this affect the app? should there be a specific configuration for the app, or should there be a way to "build your own tickle" in the app?
it would also be nice to finalize the license before we put the modules out into esm
reposted from discord to continue discussion from there:
all in all, im down for separating it into modules, i think the benefits outweigh the malefits
i do have a few concerns we could iron out:
1) what about offline use? provide bundled libraries?
2) how would this affect the app? should there be a specific configuration for the app, or should there be a way to "build your own tickle" in the app?
it would also be nice to finalize the license before we put the modules out into esm
I didn't really consider offline use. Once the main site is set up, people really only need to write markdown files, local preview is not strictly mandatory after all.
But we could:
provide a cached version in the official app (capture specific strings and serve local versions which will have been cached)
provide a bundle (but that's a bit advanced for the target user, since the string needs to be changed in the HTML)
Build Your Own Tickle
This sounds like it has the potential to end up so complex it will be like using a programming language all over again.
Maybe we can still keep it manageable if we make sure to keep it simple.
Imagine:
have a limited set of supported templates. Blog, Card, Documentation, maybe a few others
have a few fields to change colors and so on (assuming the CSS is abstracted also)
These would be hard-coded in the Tickle App, to keep things simple-ish.
Later on, we could think of a spec config file instead, so people can add their own. It may be worth having a spec file (or at least Godot resource) from the start to avoid too much refactoring.
How it would work (Dream Implementation)
The way this could function:
Tickle App has several built-in configurations, but can also load a config from a gist, a text file online, etc.
When a configuration is picked, it specifies:
the CSS file
the CSS variables
the HTML string (we need specific elements in the HTML)
the HTML variables (title, loading string, etc)
if files.txt is used or not
Then, it acts as if index.html was requested, downloads all the online relevant files and caches them temporarily, so it can use them when there's no network.
But all of this is in my eyes in a far future.
### Offline Usage
I didn't really consider offline use. Once the main site is set up, people really only need to write markdown files, local preview is not strictly mandatory after all.
But we could:
1. provide a cached version in the official app (capture specific strings and serve local versions which will have been cached)
2. provide a bundle (but that's a bit advanced for the target user, since the string needs to be changed in the HTML)
### Build Your Own Tickle
This sounds like it has the potential to end up so complex it will be like using a programming language all over again.
Maybe we can still keep it manageable if we make sure to keep it simple.
Imagine:
- have a limited set of supported templates. Blog, Card, Documentation, maybe a few others
- have a few fields to change colors and so on (assuming the CSS is abstracted also)
These would be hard-coded in the Tickle App, to keep things simple-ish.
Later on, we could think of a spec config file instead, so people can add their own. It may be worth having a spec file (or at least Godot resource) from the start to avoid too much refactoring.
### How it would work (Dream Implementation)
The way this could function:
Tickle App has several built-in configurations, but can also load a config from a gist, a text file online, etc.
When a configuration is picked, it specifies:
- the CSS file
- the CSS variables
- the HTML string (we need specific elements in the HTML)
- the HTML variables (title, loading string, etc)
- if `files.txt` is used or not
Then, it acts as if index.html was requested, downloads all the online relevant files and caches them temporarily, so it can use them when there's no network.
But all of this is in my eyes in a far future.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Idea:
move all the functionality currently in the
/modulesdirectory into npm modules, which can then be loaded statically throughA single component can also be loaded:
The benefits:
The malefits:
reposted from discord to continue discussion from there:
all in all, im down for separating it into modules, i think the benefits outweigh the malefits
i do have a few concerns we could iron out:
it would also be nice to finalize the license before we put the modules out into esm
Offline Usage
I didn't really consider offline use. Once the main site is set up, people really only need to write markdown files, local preview is not strictly mandatory after all.
But we could:
Build Your Own Tickle
This sounds like it has the potential to end up so complex it will be like using a programming language all over again.
Maybe we can still keep it manageable if we make sure to keep it simple.
Imagine:
These would be hard-coded in the Tickle App, to keep things simple-ish.
Later on, we could think of a spec config file instead, so people can add their own. It may be worth having a spec file (or at least Godot resource) from the start to avoid too much refactoring.
How it would work (Dream Implementation)
The way this could function:
Tickle App has several built-in configurations, but can also load a config from a gist, a text file online, etc.
When a configuration is picked, it specifies:
files.txtis used or notThen, it acts as if index.html was requested, downloads all the online relevant files and caches them temporarily, so it can use them when there's no network.
But all of this is in my eyes in a far future.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.