Skip to content

Page builder fixes: pricing period switch, header GitHub link, block icons (#137) - #138

Merged
s3rot0n1n merged 3 commits into
mainfrom
fix/page-builder-137
Oct 24, 2026
Merged

s3rot0n1n merged 3 commits into
mainfrom
fix/page-builder-137

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Fixes the page builder issues grouped under #137.

Pricing (#134)

  • The desktop grid has one column per plan (up to 4), so 1–2 plans fill the row instead of leaving empty columns. A single plan is capped at max-w-xl.
  • Optional Monthly/Yearly switch: pricingSwitcher, monthlyPriceCaption, yearlyPriceCaption, defaultPeriod (defaults to yearly, like CourseLit). Each tier gets priceYearly and buttonActionYearly, which fall back to price / buttonAction.
  • Both prices are in the server-rendered HTML. A small client island (pricing-period-switch) sets data-period and CSS shows the matching price and button.

Header (#132, #133)

  • The mobile menu button only renders when there's a link or CTA to show.
  • Optional GitHub link: githubRepo (owner/repo or a github.com URL) and showGithubStars. The star count is fetched in the browser (island header-github-stars) so it doesn't use the server's GitHub API quota, and is hidden on error or 0. The field is a plain string; the header ignores values that don't parse as a repo, so clearing or half-typing it still autosaves.

Block icons

Every built-in block sets metadata.icon, so the "Add a block" picker and the block settings header show a distinct icon per block instead of one shared layout icon.

Schema

Zod schemas updated; schema/page.v1.json and schema/site.v1.json regenerated. Changeset included.

Testing

  • New tests: pricing columns for 1–5 plans, the switch, yearly fallbacks and links; GitHub repo parsing, the link in all three header layouts, the hamburger rule; schema acceptance (including a cleared githubRepo); every block having a distinct, valid icon.
  • bun run typecheck and bun run test pass across the workspace.
  • Browser smoke on a local stack: edited a team's homepage in the editor, published, and checked the live site at desktop and 390px. Covered 2 plans filling the row, toggling Yearly ↔ Monthly (price and button link both switch), the GitHub link with its star count, the hamburger hidden with no links or CTA, distinct icons in the block picker, and clearing each new field (it saves).

Not in this PR

  • Document the new fields in frontlit-skills (frontlit-pages/references/blocks.md).
  • Switch medialit.frontlit.app to the new pricing switch and GitHub link once released.
  • Existing behaviour, not changed here: header-only edits don't enable the page editor's Publish button.

Closes #132, closes #133, closes #134.

…icons

Fixes the page builder issues grouped under #137:

- Pricing (#134): one desktop column per plan (up to 4), so 1-2 plans
  fill the row; a single plan is capped at max-w-xl. Optional
  Monthly/Yearly switch with per-tier priceYearly and buttonActionYearly
  that fall back to the monthly values. Both prices are server-rendered
  and a small client island flips between them.
- Header (#132): hide the mobile menu button when there are no links
  or CTA.
- Header (#133): optional GitHub link (githubRepo, owner/repo or a
  github.com URL) with an optional star count fetched in the browser.
- Every built-in block has its own icon in the block picker and the
  settings panel header.

Closes #132, closes #133, closes #134.
Also pass --no-errors-on-unmatched to biome in the pre-commit hook, so
commits that only touch files biome ignores (e.g. Markdown) don't fail.
@s3rot0n1n
s3rot0n1n merged commit cef364d into main Oct 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants