feat(superdoc): expose built-in loading UI toggle as ui.loading (IT-1365) - #3881
Conversation
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. Previous review resultsReview updated until commit 19ead3a Results up to commit 081f67a
|
Integrators had no supported way to turn off SuperDoc's built-in loading UI. `editorOptions()` is an explicit allow-list, so the internal `showLoadingOverlay` option was unreachable from `Config`. Add a `ui` namespace for SuperDoc's own built-in UI, starting with `ui.loading` (default true), and forward it to the editor. It is presentation-only: it does not change document initialization, collaboration synchronization or load time, editing stays blocked until the editor is ready, and host-provided loading UI is unaffected. `ui` is deliberately separate from `modules`, which is for feature modules and is an explicit full-rebuild trigger in the React wrapper, and from the `superdoc/ui` controller entry point, which is for building a custom UI rather than configuring the built-in one. Documents the option on the vanilla and React configuration pages, including how it relates to React's `renderLoading`. Refs IT-1365 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
081f67a to
19ead3a
Compare
|
Closing as superseded by superdoc/orbit#1474. This targeted V1 ( V2 has its own loading overlay with a progress percentage, which matches the reporter's description far better than the V1 skeleton did. It also explains the ticket's The API intent and the test scenarios carried over; none of the V1 skeleton or interaction-barrier implementation did, because V2's architecture already prevents a partial first paint. |
Stack 2/2 — depends on #3880. Review/merge #3880 first.
Problem
Keyora (IT-1365) has no supported way to turn off SuperDoc's built-in loading UI.
editorOptions()inSuperDoc.vue:840is an explicit allow-list with no spread, so the internal option was unreachable fromConfig.This was the only remaining V1→V2 migration blocker Soumi identified.
Change
Presentation-only: it does not change document initialization, collaboration synchronization or load time. Editing stays blocked until the editor is ready (see #3880), and host-provided loading UI such as React's
renderLoadingis unaffected.Why a
uinamespacemodules, which is for feature modules and is an explicit full-rebuild trigger in the React wrapper.superdoc/uicontroller entry point: that is for building a custom UI, this configures the built-in one. A config property and a module specifier do not collide.Configboolean.Reaches
@superdoc-dev/reactautomatically and typed viaSuperDocEditorProps extends Omit<SuperDocConfig, ...>, ridingrestProps, which is excluded from the rebuild deps.Docs
Documented on both manually maintained config pages, including how
ui.loadingrelates to React'srenderLoading. Additive only (26 lines);.mdxis outside the repo's prettier glob, so no reformatting churn.Verification
SuperDoc.test.js: 101/101, incl. 3 new (omittedui;uiwithoutloading;ui.loading: false)pnpm check:public:superdoc: PASS, 14/14 stages@superdoc-dev/reacttsc --noEmit: cleancheck:imports,check:icons,test:examples(295): passTwo pre-existing repo conditions, not caused by this stack
packages/reactvitest fails 15/31 locally (Cannot find module .../superdoc/dist/superdoc.es.js). Reproduced identically on unmodifiedmainin a separate clean checkout, after a package rebuild and afterensure-superdoc-build.js.docs-check-em-dashesfails repo-wide (128 pre-existing onmain; 0 in these changes), so it blocks any docs commit. Skipped viaLEFTHOOK_EXCLUDEfor this commit only; every other hook ran and passed.Scope note
Loading lifecycle events are deliberately deferred. Soumi said exposing the variable is sufficient, and today's readiness signals do not describe a coherent loading lifecycle:
editorReadyflips immediately after async init starts without collaboration,lifecycleStateemits no change event, andreplaceFile()does not transition throughdocumentLoading. That needs its own state model.Refs IT-1365
🤖 Generated with Claude Code