-
Notifications
You must be signed in to change notification settings - Fork 9
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
Convert Blabber's Dialogue Editor to Svelte #83
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We are not hiding anything here
also replace most uses of inline SVGs with a dedicated Vite plugin
# Conflicts: # public/_data/mods/resource_roots.yml # public/wiki/requiem/opus_daemonium.md
Also make footer icons more consistent (octicon set, 24px)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Also gave it the name Parlour because I felt like it
Basics
The new Svelte app exists as an NPM project inside
svelt_sprinkles
. This project is intended to be extensible, to allow building and exporting other highly dynamic "sprinkles" in the future. For now, the only "sprinkles" are the dark mode toggle button, a new Settings page with more information about said dark mode toggle, and Parlour, a rewritten version of the Blabber Dialogue Editor.Build
The project is exported as a library, directly in the Jekyll output. I also added a Jekyll plugin to automatically build the
svelte_sprinkles
project wheneverjekyll build
orjekyll serve
is run.TODO list
Alternatives
1. Keeping things as they are
This would be bad for my sanity. The Blabber Dialogue Editor is a decently advanced application, and trying to tie the JS to a single mass of HTML without a proper component structure has led to nothing but headaches and spaghetti.
2. Using HTML Custom Elements
It is possible to build a Web Component system using native browser features, and with Jekyll's
include_relative
tag it is even possible to organize them into tidy files and folders. Here is what this could look like :my-component.liquid
my-component.js
index.html
This ends up looking fairly similar to the Svelte structure, so I believe we would be able to switch decently easily if we wanted to remove our dependency on a second framework, or get a tighter integration with Jekyll. The main drawbacks of this approach are :
3. Using another framework
Potayto potahto, svelte seemed good and Up was lobbying for it
4. Going full sveltekit
We could convert the entire website to sveltekit + markdown, rendered with the static adapter. It would most likely be an upgrade from Jekyll and would avoid dealing with two separate frameworks, but this kind of full revamp is way outside the scope of this PR.