chore: Upgrade tutorial to lowdefy v5.2.0#5
Open
StephanieJKS wants to merge 1 commit into
Open
Conversation
Request: "upgrade the tutorial to lowdefy v5.2.0"
Motivation: Tutorial YAML files were on 4.0.0-alpha.37 and used pre-v5 schema (areas, contentJustify, contentGutter, button type, sqlite client, untyped KnexRaw payload). Bring all steps in sync with the v5.2.0 block API and connection config so the tutorial runs cleanly on the latest release.
Decisions:
- areas -> slots: v5 renames PageHeaderMenu/Card child-region key from areas to slots
- contentJustify -> justify, contentGutter -> gap: v5 layout property renames
- Button type -> color + variant: replace "type: primary" with "color: primary, variant: solid"; drop redundant "type: default" on Reset since it's the default
- Knex client sqlite -> better-sqlite3 + useNullAsDefault: v5 Knex connection now uses the better-sqlite3 driver and requires useNullAsDefault for inserts with omitted columns
- KnexRaw payload: replace "_state: true" shortcut with explicit named bindings so the parameterized query receives the expected fields
- AxiosHttp request: add explicit "url: /products" properties so the request resolves to the right endpoint
- Excluded .claude folder: local tooling config, not part of the tutorial
Changes:
- 01-getting-started/lowdefy.yaml: bump version, areas -> slots
- 02-creating-a-page/{lowdefy,new-ticket}.yaml: version bump + slots/justify/gap renames
- 03-adding-blocks/{lowdefy,new-ticket}.yaml: same renames + button color/variant migration
- 04-interactive-pages/{lowdefy,new-ticket}.yaml: same renames + button color/variant migration
- 05-requests-api/{lowdefy,new-ticket}.yaml: same renames + button color/variant migration
- 06-requests-sql/{lowdefy,new-ticket}.yaml: Knex driver swap to better-sqlite3, KnexRaw named bindings, layout/button updates
- 07-display-data/{lowdefy,new-ticket,view-tickets}.yaml: Knex driver swap, named bindings, AxiosHttp url added, layout/button updates
- 08-final/{lowdefy,new-ticket,view-tickets}.yaml: Knex driver swap, named bindings, AxiosHttp url added, layout/button updates
- 08-final/readme.md: new readme for the final tutorial step
Tags: lowdefy-v5, lowdefy-upgrade, tutorial-upgrade, areas-to-slots, contentgutter-to-gap, button-color-variant, knex-better-sqlite3, knexraw-named-bindings, axioshttp-url
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.
Summary
Upgrades every tutorial step from
4.0.0-alpha.37to5.2.0and migrates the YAML to the v5 block API and connection config so the tutorial runs cleanly on the latest release.Schema / API migrations applied across steps
areas:→slots:onPageHeaderMenuandCard(v5 child-region key rename).contentJustify:→justify:andcontentGutter:→gap:on layout config (v5 layout property renames).type: primarywithcolor: primary+variant: solid; dropped redundanttype: defaulton Reset since it is now the default.Connection / request updates
sqlitetobetter-sqlite3and addeduseNullAsDefault: truefor inserts that omit columns.KnexRawpayloadno longer uses the_state: trueshortcut — replaced with explicit named bindings (ticket_title,ticket_type,ticket_description,product,purchase_in_last_month) so the parameterized query receives the expected fields.AxiosHttpget_productsrequest now sets an explicitproperties.url: /productsso the request resolves correctly.Files touched
lowdefy.yamlfiles in steps 01 through 08.new-ticket.yamlfiles in steps 02 through 08.view-tickets.yamlin steps 07 and 08.08-final/readme.md.Test plan
pnpm install(ornpm install) at the repo root completes againstlowdefy@5.2.0.npx lowdefy@5.2.0 devruns each step's app without schema validation errors.better-sqlite3.view-ticketspage loads the tickets list andget_productspopulates the Product selector via the dummy API.color/variantAPI.