Repository navigation
feat(framework): fix the bugs Admin Shell and module UIs work around (VCST-6926) - #422
Merged
Merged
Conversation
Data loss and wrong data: - Switching to another menu section asks before closing blades with unsaved changes, and the address stays put when the user keeps them - closeChildren() returns true when a child blade stays open, like closeSelf() - VcTextarea no longer cuts text at 1024 characters by default - downloadFile ignores javascript: and other non-download URL schemes - CellMoney shows 0 as an amount, not as "Not set" - VcDynamicProperty: multi-value text chips show their values; Color respects disabled - VcDataTable does not emit row-click when a click opens a cell editor - Closing a child blade no longer clears the parent's AI agent context Navigation and module loading: - A deep link to a module blade keeps its address while modules load, and mf-host replays it with force so the guard runs again - usePopup works outside setup - An embedded app hides the environment banner - Mobile back button: one named button instead of a button inside a button Translations and accessibility: - Components fall back to translated texts instead of English defaults - Widget titles and dashboard widget names are translated when they are keys; dashboard announcements are translated - The published locales/types.d.ts quotes keys that are not identifiers - VcCard header leaves clicks and Enter/Space in its actions to those controls; dashboard feed rows open from the keyboard - VcEditor gets a contentType prop, so an empty HTML field is not saved as Markdown Look and theming: - Token declarations go into the vc-shell cascade layer, so an app's plain :root overrides them in any stylesheet order - VcStatus is as wide as its text; an empty toolbar strip is hidden; the sign-in card stands out in the dark theme; dashboard widgets stack on phones; the assets folder grid uses logical sides for RTL Refs VCST-6926
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-422Or pin to the exact commit: npm install @vc-shell/framework@2.13.1-pr422.62522c9Published packages (dist-tag
|
…ade open The modules call `await closeChildren()` and then delete, move or overwrite the record the child blade edits (59 calls, none checks a result). A boolean result fixed nothing until every module changed. When the user keeps a child blade open, useBlade().closeChildren() now rejects with BladeCloseCancelledError, so the code after it does not run. The global error handlers, useErrorHandler and useAsync treat it as a cancel: no toast, no blade banner, no log. isBladeCloseCancelled() is exported for code that wants to react to the cancel. useBlade().closeChildren() returns Promise<void> again; useBladeStack().closeChildren(id) keeps its boolean for infrastructure such as breadcrumbs. Refs VCST-6926
…ren close useBlade().closeChildren() takes an optional action. It closes the child blades, then runs the action; when the user keeps a child open, the action is skipped and the call resolves false, without an exception. Asking for confirmation inside the action puts the unsaved-changes question first. closeChildren() without an action keeps rejecting with BladeCloseCancelledError, the safety net for existing code that deletes or overwrites the record on its next line. Refs VCST-6926
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.
Why
Admin Shell and the module UIs work around vc-shell bugs in their own code: a yarn patch of the built framework, a mixin that rewrites component props through Vue internals,
:root:roottoken overrides, their own guards. This fixes those bugs in vc-shell, so the workarounds can be removed module by module (VCST-6926).What
Data loss and wrong data
useBlade().closeChildren(action)closes the child blades, then runs the action. When the user keeps a child open (unsaved changes), the action is skipped and the call resolvesfalse, without an exception. Asking for confirmation inside the action puts the unsaved-changes question first.useBlade().closeChildren()without an action stops the caller when the user keeps a child blade open: it rejects withBladeCloseCancelledError, so the delete, move or reload afterawait closeChildren()does not run. The 59 module calls need no change. The global error handlers,useErrorHandleranduseAsynctreat it as a cancel (no toast, no banner);isBladeCloseCancelled()is exported.useBladeStack().closeChildren(id)returns a boolean for infrastructure such as breadcrumbs.VcTextareano longer cuts text at 1024 characters unlessmaxlengthis set.downloadFileignoresjavascript:and other non-download schemes.CellMoneyshows 0 as an amount, not "Not set".VcDynamicProperty: multi-value text chips show their values; Color respectsdisabled.VcDataTabledoes not emitrow-clickwhen the click opens a cell editor.Navigation and module loading
force: true: Vue Router skips a navigation to the current location, guards included, so the replay never ran before.usePopupworks outsidesetup.Translations and accessibility
locales/types.d.tsquotes keys that are not identifiers, so it parses.VcCardheader leaves clicks and Enter/Space in its actions to those controls; dashboard feed rows open from the keyboard.VcEditorgets acontentTypeprop ("html" | "markdown"). Without it an empty HTML field was saved as Markdown.Look and theming
:root { --x: … }rules) go into thevc-shellcascade layer through a small PostCSS plugin. An app's plain:rootnow overrides them whatever order the stylesheets load in, without:root:rootor!important.VcStatusis as wide as its text in a table cell.Heads-up
:root { --token: … }now overrides vc-shell's tokens whatever order the stylesheets load in. An override that used to lose to the framework's CSS by load order now applies, so such an app may look different.VcTextareahas no 1024-character limit by default.closeChildren(action);VcEditorcontentType;BladeCloseCancelledErrorandisBladeCloseCancelled();useBladeStack().closeChildren(id)returns a boolean (wasvoid).useBlade().closeChildren()now rejects when the user keeps a child blade open, where it used to resolve and let the caller go on. Code that wraps it intry/catchsees the cancel in itscatch; none of the 59 module calls does.Checks
:rootoverride placed before the framework CSS