Skip to content

feat(webkit): [ENG-49887] add listing, directory and closing page sections - #1152

Open
isaque-bock-azion wants to merge 8 commits into
mainfrom
feat/ENG-49887-sections-closing
Open

isaque-bock-azion wants to merge 8 commits into
mainfrom
feat/ENG-49887-sections-closing

Conversation

@isaque-bock-azion

Copy link
Copy Markdown
Contributor

Summary

  • Eight listing, directory and closing blocks become @aziontech/webkit/sections/* components with spec, browser-mode test, component story and size budget: listing-browser, listing-table, template-gallery, platform-directory, contact-hub, closing-call-to-action, closing-call-to-action-newsletter, closing-call-to-action-agents.
  • closing-call-to-action takes kind: 'split' | 'panel' | 'primary'. The agents close and the newsletter close are their own blocks, so no closing story builds the band inline any more.
  • The newsletter never fakes a send: it emits submit with the address, and the site sets loading / submitted / error.

How to test

  1. PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false CI= pnpm --filter @aziontech/webkit exec vitest run src/components/sections → all pass in Chromium.
  2. pnpm --filter @aziontech/webkit catalog:check && pnpm storybook:build → clean; the catalog lists all 49 sections/* exports.
  3. pnpm storybook:dev, then open Templates/Marketing/Closing CTAs/ClosingCallToAction:
    • Agents switches between humans and agents;
    • in Newsletter, a valid email logs submit in Actions, and the loading / submitted / error controls change the band.

Notes

  • Minor release of @aziontech/webkit. Stacked on feat(webkit): [ENG-49886] add article and content page sections #1151 (ENG-49887). It is the last of the series.
  • Site JSON changes (the site must follow):
    • closing-call-to-action:
      • closing-call-to-action-split / -panel → _id: 'closing-call-to-action' with kind;
      • split: asideAction → secondaryAction, and anchor is added;
      • panel: action → primaryAction;
      • primary: actions[] → primaryAction / secondaryAction, and anchor is added.
    • closing-call-to-action-agents:
      • new _id; kind: 'agents' is removed;
      • audiencesLabel → audiencesAriaLabel, and lineAriaLabel is added;
      • per audience, command / prompt → copy: { label, text }.
    • closing-call-to-action-newsletter:
      • kind and form.label are removed;
      • submit / success / required / invalid → submitLabel / successMessage / requiredMessage / invalidMessage;
      • form.errorMessage is added.
    • contact-hub:
      • lane label → title, and actions[] → action;
      • status → statusLink.
    • listing-browser:
      • sortLabel → sortAriaLabel;
      • empty.action → empty.clearLabel;
      • anchor is added.
    • listing-table: action → primaryAction.
    • template-gallery: actions[] → primaryAction / secondaryAction.
    • Unchanged: platform-directory.
  • Known gaps:
    • The table-side axe checks are it.skip on the known Table aria-required-children defect, as table.test.ts already does.
    • The newsletter validation does not yet follow the webkit-form amber-on-submit pattern.

…vocabulary

The marketing site places whole bands on a page from JSON, so each band
becomes a webkit component under the new sections category. SECTIONS.md
records the convention the blocks follow: props are exactly the site
JSON keys, kind changes layout only, one landmark per band, and the
data module under _sections/ is the single source for the template
story, the component story and the MDX. There is no registry or
dispatcher: the site imports each block and maps _id to it itself.

Forms are the one exception to props-only: they emit submit with the
values and the site posts them, reporting back through loading,
submitted and error, so the package never fetches nor fakes a send.

imports.md documents sections/ as the only category whose public path
keeps a prefix, so the import path matches the section _id. The
anchor concept enters the prop vocabulary (rule and engine together),
and catalog.json is regenerated because it stamps the vocabulary.
…ory helpers

Registers sections in the hook category registry and the spec schema
so a block under src/components/sections/<name>/ resolves its spec,
testid and story like any other category.

build-catalog resolves the spec of a nested export by its last
segment, so ./sections/use-cases reads .specs/use-cases.md; with no
section exported yet the catalog is unchanged.

Two Storybook helpers back the section stories: sectionMarkup turns a
section's site-JSON props into concrete markup for a runnable Show
code SFC (structured values become script-setup consts, a form's
submit wiring can be added), and withStoryAssets swaps the site's
/marketing-components/ URLs for the package assets on the canvas only,
so the documented JSON keeps the site paths while images render.
Seven page-frame blocks become @aziontech/webkit/sections/* components,
each with a spec, a browser-mode test, a component story and a size
budget, and their Templates/Marketing stories now render the component
from the shared _sections data modules instead of composing the band.

hero-band merges the five hero _ids that share one data model and
differ only in layout (kind centered, title-band, pixel-floor,
copy-beside-art, plus size for the small title band);
hero-copy-on-top-art keeps its own topology model.

hero-form never posts: it validates on submit only, following the
webkit-form pattern (persistent Required tag on the label, amber
required state for an empty field and red invalid for a malformed one,
both only after a submit), and emits submit with the values by field
name. The site posts them using the entry's submission block and sets
loading, submitted or error. Its budget is high because the phone field
inlines the country-flags sprite.
Thirteen feature and solution blocks become
@aziontech/webkit/sections/* components with spec, browser-mode test,
component story and size budget; their Templates/Marketing stories
render the component from the shared _sections data modules.

Variants that share one data model merge into one block: the three
code-split _ids become code-split, and media-split-stack-solutions and
-alternating become media-split-stack with kind media-end or
alternating. architecture-tabs tabs carry their diagram name, and the
Platform page is the same block with other data. cli-terminal shows the
session through CodeBlock's line entrance instead of typing it live.

Blocks that compose Illustration or Diagram are budgeted on the entry
chunk only, since those registries split into async chunks.
Eight social-proof blocks become @aziontech/webkit/sections/*
components with spec, browser-mode test, component story and size
budget; their Templates/Marketing stories render the component from the
shared _sections data modules.

The two mosaic layouts carry disjoint data, so they are two blocks:
client-mosaic derives its bento placement from the data and
client-mosaic-columns gets its own _id. Logos and badges keep the
site's URLs in the documented JSON and are resolved to the package
assets on the Storybook canvas only.
comparison-table, compare-plans, compare-support-tiers and
pricing-plans become @aziontech/webkit/sections/* components with spec,
browser-mode test, component story and size budget; their
Templates/Marketing stories render the component from the shared
_sections data modules.

Plans and support tiers stay two blocks because their row and closing
models differ. The plan or tier picked on small screens and the billing
period are local state. Picker and column labels move to the ariaLabel
vocabulary, closing links to primaryAction or a per-section action, and
anchor replaces the ids the templates hard-coded.
Nine article and content blocks become @aziontech/webkit/sections/*
components with spec, browser-mode test, component story and size
budget; their Templates/Marketing stories render the component from the
shared _sections data modules.

The three article-cards _ids share one item model, so they merge into
article-cards with kind left or centered. The blog and resource-hub
indexes differ in filters and item shape, so article-index splits into
article-index-blog and article-index-resource-hub. Filtering, search
and tab state are local.

faq-section answers accept block markdown (blank-line paragraphs and
dash lists) on top of inline links and emphasis, rendered without
v-html, so the rich-answers story renders the component instead of a
hand-built Faq slot.
…tions

Eight listing, directory and closing blocks become
@aziontech/webkit/sections/* components with spec, browser-mode test,
component story and size budget; their Templates/Marketing stories
render the component from the shared _sections data modules, and no
closing story composes the band inline any more.

The split, panel and primary closes share one data model, so they are
closing-call-to-action with kind split, panel or primary. The agents
close (audience switch, copyable line, typed word) and the newsletter
close are their own blocks. The newsletter never fakes a send: it
validates the address and emits submit with it, and the site reports
back through loading, submitted and error.

Search, facets, sort and seeding from the query string are local state
in listing-browser. The table-side axe checks stay skipped on the known
Table aria-required-children defect, as table.test.ts already does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant