Repository navigation
Page layout, navigation tree, a schema-editor lesson and a light theme - #12
Merged
Merged
Conversation
- Layout: the page fills the window and never scrolls. The navigation runs down the left side, the content scrolls beside it, and the Back/Next bar stays at the bottom. On a narrow screen the navigation goes on top. - Navigation: a tree of parts and their sections, built from PARTS in paging.ts. The part being read starts open, and the current page is marked. - Chapters: placeholder pages for Part 2 (Basics) and Part 3 (Generating code). - "Your first schema" (2.1): the lesson on the left, and on the right the playground's editor (comline-web-kit/editor) with a Compile button. Compiling shows the generated Rust or TypeScript beside the schema, or lists the errors. Any page can put a workspace beside its lesson with slot="workspace". A Code component colours inline schema snippets the way the editor does. - Theme: dark stays the default. A header toggle switches to a warm light theme and remembers the choice. All colours are variables in global.css. - Build: the kit's editor WASM is now built (COMLINE_KIT_EDITOR=0 is gone from CI), and the yarn cache key changed so an old kit packed without the editor isn't restored.
This file contains hidden or 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
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.
Depends on ComlineProject/playground#121. Until that merges,
comline-web-kitis pinned to its branch (2e058f1). Repin to the merge commit onmasterbefore merging this.Layout
Navigation tree
PARTSinsrc/lib/paging.ts.PAGESis now derived from it, sopageUrlworks as before.Chapters
Placeholder pages ("coming soon") so the tree has something to show:
"Your first schema" (2.1)
comline-web-kit/editor), with the language server's highlighting, errors, hover and completion.slot="workspace".Codecomponent colours inline schema snippets in the text the way the editor does.Light theme
global.css, and the editor and the simulation follow the theme too.Build
COMLINE_KIT_EDITOR=0is gone.worker.formatises, for the compiler's module worker.@codemirror/lang-rustand@codemirror/lang-javascriptfor the generated code, plus@codemirror/state,viewandlanguage, which the component imports directly.Testing
yarn check: no errors and no warnings.yarn buildsucceeds.navigation: the current page is marked, parts fold, and Next crosses into the next part;first-schema: compiles to Rust and TypeScript, then reports a typo;theme: the site starts dark, switches to light, and keeps it after a reload.