21 KiB
Component implementation review — 2026-11-06
Scope and acceptance
This review follows the application compatibility exports into all twelve shared R* component implementations, the application route-transition adapter, and the app-bound wrappers/providers. It includes component-local hooks, utilities, props, slots, instance APIs, existing tests, and their admin/documentation consumers. Theme palettes and startup/content loading are tracked in the separate UI review. Generic composables and utilities have a separate review.
The acceptance criteria are correct controlled state, preserved native configuration and callbacks, explicit resource ownership, bounded reactive work, accessible default controls, accurate public contracts, and regression coverage for the defects found. No throughput or browser memory improvement is claimed without a benchmark.
Shared components
| Component | Paths inspected | Findings and disposition |
|---|---|---|
| RBarcode | RBarcode/src/Barcode.tsx, props, types, stylesheet, admin and docs demos |
Replaced nested watcher/observer creation with one lifecycle-owned observer and a post-render watcher. Format, options, renderer and size changes now redraw without changing text. Equal resize measurements do not redraw. watchText=false remains supported. Removed demo key workarounds that remounted the component. Rendering and callback error paths retain their existing contract. |
| RChart | RChart/src/Chart.tsx, hooks, props/types, options/loading helpers, theme registration, chart regressions |
Existing lazy initialization, live setTheme, throttled options/resize, cancellation and disposal already have dedicated tests and were retained. Reviewed provider precedence, explicit/default themes, ARIA, download options and initialization failure cleanup. Corrected local hook contracts. The UI review owns the eight palette variants and loading-color correction. useChart intentionally retains the last disposed instance so isDisposed() and render() continue to work after manual disposal. |
| RCollapseGrid | RCollapseGrid/src/*, docs example and callers |
Fixed the update event to emit the public open state instead of its inverse, preserved zero gaps, and made the default toggle a keyboard-operable button with aria-expanded. Added local reduced-motion handling. The docs example now uses direct v-model:open; old caller-side negation must be removed. |
| RDraggableCard | component, stylesheet, Interact.js adapter, demo | Interaction listeners now release on disabling, rebinding and unmount. Position changes rebind once after the DOM update; toggling drag retains its position. The last card removes the shared owned container. Removed the module-level HTMLElement constructor access and guarded server rendering. Reduced-motion preferences suppress the entrance transition. Removed demo remounting for position changes. Native pointer drag is still delegated to Interact.js. |
| RFlow | component, props/types, defaults, useFlow, installed LogicFlow implementation and demo |
Removed the process-wide first-instance plugin gate so later instances register their plugins. Default nested options are created per instance. Readonly mode saves/restores actual interaction and keyboard state instead of forcing every option to true when disabled. Clearing data clears the graph; re-enabling watching applies the current data. The existing destroy-on-unmount path remains, and the registration hook releases stale instances. |
| RForm | component, props/types, useForm, form and lock-screen callers |
Enter submission is reactive, uses bubbling, respects previously consumed events, IME, multiline and combobox controls, and prevents duplicate submissions. Field validation rejection is handled; callback errors still reach Vue. Unmounting during async validation prevents a stale onFinish. useForm clears disposed instances, allows partial updates/reset overrides, and retains its documented shallow reset behavior. Object initial models/rules are cloned; factories keep ownership of their returned objects. |
| RIcon | component, props, styles, sprite/inline fallback services | Retained host sprite resolution and lazy inline-asset fallback, avoiding eager asset work. Removed the unconditional compositing transform from every static icon. Optional path animation now respects reduced motion. Decorative SVG semantics remain; actionable accessible controls are owned by the surrounding button/link. |
| RIframe | component, props/types, loading tests and demo | Source changes restart loading. iframe and the existing iframeInst alias expose the same automatically unwrapped DOM element; corrected the declared instance shape. Preserved explicit lazy/eager choices, callback arrays, Spin options and slots. Documentation no longer describes already-fixed boolean loading or error-callback mismatches. A native load event is not proof of embedded business success. |
| RModal | component, props/types, styles, legacy hook and tests | Fixed the unused plain-modal width variable. Card/dialog dimensions and fullscreen scrolling retain their existing styles. Native Naive UI props/slots and focus management remain delegated to the library. Documented the deprecated imperative hook's DOM update and resource ownership rather than replacing it with another API. |
| RMoreDropdown | component, inherited dropdown props and docs example | Caller placement now overrides the default. The default icon is a named, keyboard-focusable button, with optional triggerLabel and host translation. Custom trigger slots remain unchanged. |
| RSegment | component, props/types, stylesheet and examples | Function-valued labels now render correctly; corrected the legacy RSegmentProps.options array type. Controlled/default values, disabled items, popovers, icon rendering, intrinsic widths and native tab behavior were retained. displayDirective remains a legacy option field with no panel effect because the wrapper renders tabs, not content panes; this limitation is stated in the reader reference. |
| RTablePro | all query/search/panel components, column, CSV/printing, locale, props/types and regression files | Reviewed local/remote/manual modes, request races/cancellation, paging reconciliation, search drafts/validation/dependencies, option fetching, column state, export scope and print sanitization. Fixed recursive hidden-leaf filtering and empty nested-group pruning while retaining unchanged references. Reworked the toolbar as described below. Added contracts for public component-local hooks/helpers without replacing existing bounded query and search machinery. |
| RTransitionComponent | application adapter plus shared RouteTransition.vue |
Confirmed the adapter forwards transition props and live KeepAlive inclusion/configuration to the shell owner. Existing cache keys, include/exclude limits and route rendering remain unchanged. No independent wrapper implementation was added. |
TablePro toolbar
Business toolbar content and built-in utilities are separate visual groups. Request-managed tables expose refresh directly; column settings and fullscreen remain direct controls. A single More actions menu contains density, striped/bordered toggles and CSV. Printing is absent by default and appears only with showPrint. The explicit instance print() method remains available regardless of menu visibility.
This removes two always-mounted popselect wrappers while preserving their functions. Existing tool={false}, bare, toolbar slots, request callbacks, CSV formatting/default options, and printing options remain supported. The printing demo opts in; the remote demo uses the built-in refresh/export entries instead of duplicate buttons. Both locales and public references were updated.
Application wrappers and providers
| Wrapper/provider | Review outcome |
|---|---|
| AppAvatar | Removed keyboard-focus suppression on the account button. Native size, round and object-fit options now work, while the legacy avatarSize override remains supported. Signing state still owns the displayed user. |
| AppGlobalSpin | Keeps runtime ownership of global busy state, but now merges caller theme overrides rather than discarding them. Slots and other Spin props remain delegated. |
| AppLockScreen, LockScreen, UnlockScreen | Removed redundant forced show; added bilingual copy and reactive validation messages. Validation failures and repeated attempts are handled. The clock now updates all fields at minute boundaries, pauses while hidden, resynchronizes on visibility, and cancels its timer on unmount; dates no longer wait 24 hours after mounting to change. Removed the detached logout delay. The existing local lock/storage format was preserved. |
| AppPageHeader | Confirmed heading/eyebrow/description and action slot remain lightweight and caller-owned; no change required. |
| AppShareLink | Confirmed both variants, stable keys, translations and external-link semantics. Theme-specific styling is owned by the UI review. |
| AppAutocompleteDefaults | Confirmed first-root scan plus incremental added-subtree scanning, explicit control/form opt-outs and returned observer cleanup. Added the public lifecycle contract. |
| AppNaiveGlobalProvider | Confirmed shared reactive locale/theme configuration, one discrete API lifecycle and onScopeDispose(unmount). Globals remain intended for use only while the provider is mounted, as already documented. |
| AppRequestCancelerProvider | Confirmed route-update cancellation is delegated to the existing request canceler; no additional global listener or cancellation policy added. |
| AppStyleProvider | Read for cross-component theme ownership; all modifications and final acceptance belong to the UI review. |
| AppVersionProvider | Added bilingual version-dialog copy; retained one acknowledgement per cached application version and the existing logout action. |
| AppWatermarkProvider | Confirmed lazy conditional rendering and configuration forwarding; no change required. |
Component-local method contracts
The method audit covered useChart and its registration/access/dispose/render methods, useChartProvider, useForm and its model/rules/validation/reset/update methods, useFlow, deprecated useModal.create, useTablePro, useTableRequest, useTableSearch, column layout/visibility, search value/parameter/predicate helpers, pagination forwarding, CSV construction/download, printable-content construction and printing, locale resolution, prop selection, and injected UI services. Public helpers now have adjacent multiline contracts using actual parameter names and ordered tags. Interface method properties use short property documentation; private trivial event lambdas remain covered by their owning contract instead of duplicating line-by-line explanations.
Verification
Later browser validation found that group pinning updated header offsets but not body-cell fixed classes in the installed Naive UI implementation. Group pin/unpin now applies fixed recursively to descendants in both local and controlled layout paths, without mutating source definitions or cascading unrelated properties. The focused columns suite passed 9 tests, including both ownership modes and actual native fixed-cell classes.
The follow-up removes deprecated pagination callback aliases from the public TablePro pagination contract and strips them from untyped runtime input. Current update events remain supported. The default toolbar also gains PNG clipboard copying through the existing lazy DOM renderer. Capture is restricted to the native table's visible DOM box, with temporary scroll/sticky snapshots, user-activation-safe promised clipboard data, local/host feedback and cancellation cleanup. This is distinct from full-page data export; virtualized unmounted rows are not synthesized.
The follow-up's affected table regression set passed 7 files / 63 tests. After the final loading/cancellation adjustment, the image regression file passed all 10 cases; vue-tsc --build, touched-file ESLint/Prettier checks, and git diff --check passed. Actual native clipboard/paste fidelity is part of the lead's Chrome acceptance, not established by mocked clipboard unit tests.
Chrome acceptance subsequently reproduced missing external RIcon sprites in PNG output. A focused, private SVG preparation helper now expands registered/same-origin public sprites and local symbols into isolated static vectors before rendering, with per-capture fetch deduplication, anonymous non-redirecting requests, bounded input and cancellation. Static attributes/currentColor/viewBox are retained; imported IDs and handlers are omitted, and resource-dependent or active SVG content is rejected. The connected table snapshot also removes scripts/event attributes and rejects active embedded media before cloning. The two focused image suites passed 29 tests; native sprite fidelity is rechecked by the lead.
Focused regression coverage includes component wrappers, barcode redraw, flow initialization/readonly/lifecycle, drag cleanup, nested column visibility, toolbar defaults/options/actions, and app-wrapper/clock lifecycle. Existing chart, table search/query/export and modal suites are included in the combined component run.
Executed: pnpm test:run __test__/components __test__/app/wrapper-lifecycle.spec.tsx passed 14 files / 109 tests. ESLint with --max-warnings=0, Prettier checks for all files owned by this review, and git diff --check passed. The final workspace type/build check belongs to the lead's integration pass; the scoped work emitted no component type errors.
The lead agent records the final integrated type/lint/format/build results and actual Chrome observations. Unit tests with mocked ECharts, LogicFlow or Interact.js establish wrapper contracts, not canvas-rendering fidelity, pointer gesture physics or browser print output. Scanning a physical barcode, arbitrary third-party iframe policies, and browser-specific printer output are outside this local audit.