Skip to content

chore: Upgrade tutorial to lowdefy v5.2.0#5

Open
StephanieJKS wants to merge 1 commit into
mainfrom
chore/upgrade-lowdefy-v5.2.0
Open

chore: Upgrade tutorial to lowdefy v5.2.0#5
StephanieJKS wants to merge 1 commit into
mainfrom
chore/upgrade-lowdefy-v5.2.0

Conversation

@StephanieJKS
Copy link
Copy Markdown
Contributor

@StephanieJKS StephanieJKS commented May 6, 2026

Summary

Upgrades every tutorial step from 4.0.0-alpha.37 to 5.2.0 and 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: on PageHeaderMenu and Card (v5 child-region key rename).
  • contentJustify:justify: and contentGutter:gap: on layout config (v5 layout property renames).
  • Buttons: replaced type: primary with color: primary + variant: solid; dropped redundant type: default on Reset since it is now the default.

Connection / request updates

  • Knex client switched from sqlite to better-sqlite3 and added useNullAsDefault: true for inserts that omit columns.
  • KnexRaw payload no longer uses the _state: true shortcut — replaced with explicit named bindings (ticket_title, ticket_type, ticket_description, product, purchase_in_last_month) so the parameterized query receives the expected fields.
  • AxiosHttp get_products request now sets an explicit properties.url: /products so the request resolves correctly.

Files touched

  • All lowdefy.yaml files in steps 01 through 08.
  • All new-ticket.yaml files in steps 02 through 08.
  • view-tickets.yaml in steps 07 and 08.
  • New 08-final/readme.md.

Test plan

  • pnpm install (or npm install) at the repo root completes against lowdefy@5.2.0.
  • npx lowdefy@5.2.0 dev runs each step's app without schema validation errors.
  • Step 06: submitting the new-ticket form writes a row to the SQLite DB via better-sqlite3.
  • Step 07/08: view-tickets page loads the tickets list and get_products populates the Product selector via the dummy API.
  • Step 03+: Reset and Submit buttons render with the expected styling under the new color/variant API.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant