-
Notifications
You must be signed in to change notification settings - Fork 10
Interactive examples in the docs #193
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| # Suspected Bugs | ||
|
|
||
| Out-of-scope defects noticed while working on something else. Format and rules: [README.md](README.md). | ||
|
|
||
| ## `<let-debounce>` return value never flows when client-rendered without server markup | ||
|
|
||
| `src/tags/let/let-debounce.marko` › `Input` | 2026-07-24 | impact:med | effort:med | ||
|
|
||
| When `<let-debounce>` is used inside a component tree that is rendered entirely in the browser (mounted via a dynamic tag after a lazy `import()`, with no server-rendered markup to hydrate), its `<return>` value is never assigned: the compiled parent output wires `$value`/`$delay` setters but the tag's returned binding never fires, so downstream `const`/`if`/`script` sections depending on it never run. The same usage works on `/playground` where the tree is server-rendered and hydrated (`src/routes/playground/tags/playground/tags/result/result.marko`). This looks like a `@marko/compiler`/runtime issue with `<return>` in client-only render paths and may be worth reducing and reporting upstream. Re-verify by rendering any lazily-imported component containing `let-debounce/files=input.files` followed by `script -- console.log(files)`; the log never fires (workaround in `src/tags/app-playground/tags/embed-result.marko` uses a manual `setTimeout` debounce instead). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Templates Are HTML | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add TLDR callouts to all new lessons. Each lesson begins without the required
As per coding guidelines, tutorial documents include a TLDR section. Based on learnings, Markdown files use the 📍 Affects 4 files
🤖 Prompt for AI AgentsSources: Coding guidelines, Learnings |
||
|
|
||
| Welcome! This is a hands-on tour of Marko. Each lesson loads files into the | ||
| editor on the right, and everything we type compiles and runs immediately in | ||
| the preview below it. | ||
|
|
||
| Marko is a superset of HTML, so nearly any valid HTML is already a valid | ||
| template. The editor starts with an event flyer written in plain HTML: | ||
|
|
||
| ```marko playground | ||
| <h1>Open Mic Night</h1> | ||
| <p>Every Thursday at the corner cafe.</p> | ||
| <ul> | ||
| <li>Doors at 7pm</li> | ||
| <li>Sign-ups at the bar</li> | ||
| <li>Five minutes per act</li> | ||
| </ul> | ||
| ``` | ||
|
|
||
| Try changing some of the markup and watch the preview update. | ||
|
|
||
| ## Attributes | ||
|
|
||
| Attribute values are JavaScript expressions, not strings. That means template | ||
| literals, math, objects, and function calls all work directly in markup: | ||
|
|
||
| ```marko playground | ||
| <const/host="events@example.com"> | ||
|
|
||
| <h1 style={ color: "rebeccapurple" }>Open Mic Night</h1> | ||
| <p>Every Thursday at the corner cafe.</p> | ||
| <a href=`mailto:${host}`>Email the host</a> | ||
| ``` | ||
|
|
||
| Load this version and try giving the heading a different color, or computing | ||
| one from an expression. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Shorten the heading.
Use a 1-3 word heading, such as
## Return Binding; retain the detailed failure description in the body. As per coding guidelines, headings must be 1-3 words maximum.🤖 Prompt for AI Agents
Source: Coding guidelines