Repository navigation
UI kit 7e: /kit review workbench (#461) - #480
Open
silverbackdan wants to merge 200 commits into
Open
silverbackdan wants to merge 200 commits into
silverbackdan wants to merge 200 commits into
Conversation
The sign-in, forgot password, reset password, verify email and confirm new email pages use CwaUiInput, CwaUiButton and CwaUiAlert on the page surface. CwaUiInput takes name, autocomplete and required, keeps a value the browser filled in before hydration when it has autocomplete (#386), and shows invalid as the error line below on a page or modal surface. The auth InputField is removed. Budgets raised for the auth routes' new chunk names.
# Conflicts: # CHANGELOG.md # test/e2e/entry-bundle-markers.mjs # test/e2e/visitor-page-preloads.mjs
…low sm the stack opens as a modal bottom sheet with its header and Close, the page behind inert, sharing the tree and its keys (#461)
…ayout/page switch, a file's delete, Purge this page's cache and the stranded group merge use the kit confirm; Delete for a component in several places is one confirm with Remove from this location only as its second, focused action; the stranded groups modal is a kit dialog with a kit select and buttons. ConfirmDialog and DeleteLocationsDialog are removed, and so are useCwaResourceUpload's bind and filenameInputModel (#461)
…the click point, with the title and notes as its header and each disabled option's reasons behind its ⓘ item; the scope question is the kit confirm; clone mode's Escape also leaves an open alertdialog or menu alone (#461)
…ata reachability again (solid 3px line in its colour, and the words beside the title), following the local page type before Save; the page type reads Static / Dynamic (#461)
…b's no-route state, saved with the page; a parent route's hold reads Inherited scheduled or Inherited not live (#461)
…e top again, instantly under reduced motion (#461)
…andoff in the bar opens the field's registered editor on the page (or a dialog with a textarea when there is none), useCwaInlineEditor registers an editor; CwaUiEditPlaceholder for an empty group, position or field in edit mode. The playground's Title, Image, HtmlContent and TipTap reference use them (#461)
…a type's fields load, as the old dialog did (#461)
…gs and Enable Navigation, the Cloning bar and the outdated notice use kit buttons and tokens; every loading spinner is CwaUiSpinner; list rows get Edit and View icon actions and round type dots; no dashed or dotted lines; the path selector keeps the whole clicked stack, anchors its innermost name over the selector's and opens without moving; the old CwaUiForm* components, DialogBox, the old admin form/list parts, usePopper, useCwaSelectInput, @headlessui/vue, @popperjs/core and vue-input-autowidth are removed (#461)
… the group placeholder snapshot shows CwaUiSpinner (#461)
# Conflicts: # src/runtime/templates/assets/cwa.css # src/runtime/templates/components/core/ComponentPlaceholder.vue # src/runtime/templates/components/core/ui/ResourceStack.vue # src/runtime/templates/components/main/ComponentGroup.spec.ts.snap # src/runtime/templates/components/main/ComponentGroup.vue
…der with its round dot, every kit dialog's header has its solid line (neutral unless the page type or page data reachability colours it), the depth chain sits under the header on every tab, and page data with no template says so (#461)
… motion and sections; fake save adapter on the real field-state functions (#461)
… or a /path or https URL, and Open in a new tab), replacing the TipTap reference's window.prompt; new links open in the same tab unless chosen (#461)
…he path selector on a phone while live editing is paused: the left group did not centre its items, so the 44px paused glyph pulled Edit 4px up; scenario 58 measures height and centre at 1280 and 390 with fine and coarse pointers (#461)
…d says close once it has; while its resource loads the header's colour line sweeps and then settles into the kind's colour, or danger when the load fails (#461)
# Conflicts: # CHANGELOG.md # src/runtime/templates/assets/cwa.css # src/runtime/templates/components/ui/Dialog.vue # src/tailwind/tailwind-cwa.css
…olidated branch, renumber 7c's new header scenario 58 to 63, and keep one changelog line per step
…reen: kit buttons grew to the 44px hit size on a coarse pointer and the selector stayed 36px (scenario 63)
…r touch height, CwaRootLayout spec timing)
…ment, clear of sticky rows, never on opening or for data, focus unchanged: CwaReveal in the page, page data, users and site settings dialogs, the Routes go-live date, Publish's schedule, a dynamic slot's field and either/or options (#461)
…ite settings, where CwaReveal keep leaves the crawler toggles mounted so a hidden change still counts (#461)
…236-kit-7f-polish
…out field wrap its label above its control, and the ImageAlt samples sit in a manager row (#461)
…ocus into the menu, closes on Escape (focus back to it) and on tabbing out; the header's focus order follows what is seen; Done asks before discarding a component not yet added; the hot spot is still under reduced motion; sign-in failures read in plain words, never the server's (#461)
…card the unpublished changes; the route at / is never offered a recommended path; an empty new route path asks for one and a path with a space is flagged and can't be saved; dialogs announce a save or create that worked; adding a route in page data's Routes tab no longer opens the route in the dialog's place (#461)
…a tablist, and editable editors are named (#461) In edit mode a component's element is a tab stop named "<name> component": Enter or Space selects it through the click path, Shift+F10 or ContextMenu opens its resource stack, and F6 moves between it and the manager bar's selected tab. The bar's tabs are a named tablist with arrow, Home and End keys, controlling a tabpanel. useCwaInlineEditor names an unnamed editable editor as a multi-line textbox ("Content, Body Text"), which names the TipTap reference editor. A click inside a focusable component no longer counts as focus leaving the editor, so selecting still focuses TipTap and presence goes straight to editing. Browser scenario 64 reaches a rich-text component's Publish tab by keyboard alone; entry and visitor budgets rise 40 B for the keyboard access in ManageableResource.
# Conflicts: # CHANGELOG.md # test/e2e/entry-bundle-markers.mjs # test/e2e/visitor-page-preloads.mjs
…oins the Yjs session once it is added, so it never asks /_/collaboration_states for __new__, which the API answers with a 500 (#461)
… content's own section, so a depth tab loading a nested child page never scrolls the page dialog to its Parent page (#461)
…d no longer reads as filled in, and a spec keeps the placeholder at least 1.5:1 from the value (#461)
…e inline editor for multi-line text; beside its label, the label lines up with its first line (#461)
…a darker field fill with a darker hover, and a disabled field's value and placeholder stay readable at 3:1 instead of fading (#461)
This branch has not been deployed
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.
Turns the playground's
/kitinto a review workbench for #461 (#236), so the kit can be checked by flipping states rather than reading code. All of it lives inplayground/app/kit/;pages/kit.vuechanges only to mount the workbench, the tabs and the remount key.src/is untouched except one spec (FormGroup.spec.ts), which now raises its form error through the fake form's next Save./kit runs without the page's own CWA
/kitkeepscwa: { disabled: true }(no route fetch) and is givenlayout: falseby the playground'spages:extendhook, so noCwaRootLayout, no edit mode and no resource manager react to clicks on the samples./kitfrom production builds; it stays in dev and test builds.entry-bundle-markers.mjsreports it absent.kit/kit-page.spec.ts: navigating to/kitnever callsfetchRoute, and a click or right-click on a sample, with edit mode on, leavesresourceStackManagerempty with no manager shown. Mutation-checked: removing either opt-out fails it.Toolbar (sticky, applies to both tabs)
?tab=practice, bookmarkable)kitThemeStyle). Auto followsprefers-color-scheme.postMessage.matchMedialocalStorage, wrapped in try/catch.Kit tab: simulations
Each one uses the real components and the real field-state functions (
admin/field-states.ts), through a fake save adapter (fake-save-server.ts). Every demo has a caption naming the component and its state.gal,galery,map,text); answers with results, empty or error; loading slow (4 s), once (7 s) or held, with Release.In practice tab
A mock site page held in the real store. The header,
ResourceManagerand the layout/page overlay are mounted by the tab itself, never by a layout. While the tab is open it borrows$cwa:cwaFetch.fetchis swapped forpractice-transport.ts: writes go through the same fake adapter,/usageanswers locally, and no GET reaches an API;Everything is restored on unmount.
Controls:
Indicators:
ComponentFocusdoes not read field states, so this is a marked slot.Slots left for 7b, 7c and 7d (
KitSlot,data-kit-slot)Left out, and why
getComponentMetadata, which needs API docs the kit doesn't have.Presence.receive.CwaUiTextareain the manager-row placement: the bar refuses it by design (a dev error), so the kit's manager-row placement leaves it out.In practice: made usable without explanation
In practice was close to impossible to try out. What was wrong, and what changed:
vite.optimizeDeps.includelists them; a clean-cache walk finds none.role="status"line follows it and shows the next-save setting.RemoteChangesis connected, so it shows the real conflict popover ("changed by Mia", Use Mia's / Keep mine).prose-invert), selecting the Group state through the stack index, and "Type a sentence for me" now typing into the bar.test/browser/kit-practice.spec.mjs(KIT_BASE) walks, at 1280 and 390: select, edit, Saved, a 500, Retry, right-click stack, page settings, close. It fails on any console error.Kit problems the workbench exposed: all fixed here
disabledReasonon every kit field, throughField, first behind the field's ⓘ in the darkinfoPanelpopover. Select's reason moved there from the line under it. Spec:ui/disabled-reason.spec.ts, every field, bar and dialog.DialogTab.fields). It opens and marks that tab. The page dialog declares its Details and Routes fields.static, so its fields' status lines and sr-only text took the tab root as their containing block and escaped the row's clipping (the page was 1096px wide at 390). The row is nowrelative. The kit'soverflow-x: clipworkarounds are gone, and bar-only demos (ImageSlots, InlineHandoff) sit in bar rows. A browser test checks the kit never scrolls sideways at 1280 or 390 with every sim in a manager row.ComponentFocusreads the selection'sfieldStates, draft and live as one, throughadmin/save-outline.ts:It shows live in In practice. The segment's growth into the end colour is approximated by a glow, because the strips remount per phase.
CwaUiTextareaerror: it came only from the kit putting it in a bar. A spec now guards that InlineHandoff's Edit… dialog inside a manager tab renders the text area with no error.The slots are filled with the page type select (search sim), the dialog's type line, the kit confirm (Delete page in the dialog sim) and the stack's phone sheet (Width 390).
Seen, not changed (outside this PR)
CwaUiManagerTabat their root, though they do.CwaUiDialoglabels byaria-labelledby, not reka'sDialogTitle./kitstill boots auth, soGET <api>/mefails without the API.Checks
pnpm run lint:fix: 0 errors.pnpm run test: 338 files, 5956 passed.test:typesin this worktree also picks up the parent checkout, so its total says nothing about this branch.pnpm run test:e2e: every guard passes. Entry is 164164 of 164702 B gzip; visitor preloads are 184633 of 185388 B.pnpm run test:browser:KIT_BASE): 17 passed.No toast for a field's failed save (§7.1)
onRequestshows in the field, the bar status and the selection's outline only.RequestErrorsskips an error whose event carriesonRequest, and every other failed request still toasts.RequestErrors.spec.ts, mutation-checked: with the guard broken it fails.kit-practice.spec.mjscovers a 500 from the bar Title field and one from the in-page title editor. Both show a red outline and "1 not saved" with no toast. With the guard broken, both fail with two "Oops!" matches.Clicking an in-page editor starts the edit
CwaUiInlineEdit's text on a page used to ask "Edit the shared layout?", and the edit never started. The editor's click handler swaps the text for an input, and Vue redraws before the root's bubble listener runs. By then the clicked element is no longer in the page, socontains(e.target)read the click as a layout click.CwaRootLayout(and In practice's mock site) now record page membership in a capture listener, while the target is still attached. They don't usecomposedPath(): happy-dom computes it live, so no unit spec could hold it.CwaRootLayout.spec.ts: a click whose target its own handler removes is stillpage, for both click and contextmenu, plus a control case. It fails with the old check.inSiteit fails.🤖 Generated with Claude Code