Skip to content

feat(superdoc): expose built-in loading UI toggle as ui.loading (IT-1365) - #3881

Open
caio-pizzol wants to merge 1 commit into
caio/it-1365-loading-overlay-visual-gatefrom
caio/it-1365-public-show-loading-overlay
Open

feat(superdoc): expose built-in loading UI toggle as ui.loading (IT-1365)#3881
caio-pizzol wants to merge 1 commit into
caio/it-1365-loading-overlay-visual-gatefrom
caio/it-1365-public-show-loading-overlay

Conversation

@caio-pizzol

@caio-pizzol caio-pizzol commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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() in SuperDoc.vue:840 is an explicit allow-list with no spread, so the internal option was unreachable from Config.

This was the only remaining V1→V2 migration blocker Soumi identified.

Change

new SuperDoc({
  document: file,
  ui: { loading: false }, // default: true
});
<SuperDocEditor document={file} ui={{ loading: false }} />

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 renderLoading is unaffected.

Why a ui namespace

  • Separate from modules, which is for feature modules and is an explicit full-rebuild trigger in the React wrapper.
  • Separate from the superdoc/ui controller 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.
  • Gives future built-in-UI toggles a home instead of adding another permanent top-level Config boolean.
  • No public flat alias, since nothing has shipped yet, so supporting both would be needless compatibility debt.

Reaches @superdoc-dev/react automatically and typed via SuperDocEditorProps extends Omit<SuperDocConfig, ...>, riding restProps, which is excluded from the rebuild deps.

Docs

Documented on both manually maintained config pages, including how ui.loading relates to React's renderLoading. Additive only (26 lines); .mdx is outside the repo's prettier glob, so no reformatting churn.

Verification

  • SuperDoc.test.js: 101/101, incl. 3 new (omitted ui; ui without loading; ui.loading: false)
  • pnpm check:public:superdoc: PASS, 14/14 stages
  • @superdoc-dev/react tsc --noEmit: clean
  • docs check:imports, check:icons, test:examples (295): pass

Two pre-existing repo conditions, not caused by this stack

  • packages/react vitest fails 15/31 locally (Cannot find module .../superdoc/dist/superdoc.es.js). Reproduced identically on unmodified main in a separate clean checkout, after a package rebuild and after ensure-superdoc-build.js.
  • docs-check-em-dashes fails repo-wide (128 pre-existing on main; 0 in these changes), so it blocks any docs commit. Skipped via LEFTHOOK_EXCLUDE for 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: editorReady flips immediately after async init starts without collaboration, lifecycleState emits no change event, and replaceFile() does not transition through documentLoading. That needs its own state model.

Refs IT-1365

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

IT-1365

@qodo-code-review

qodo-code-review Bot commented Aug 7, 2026

Copy link
Copy Markdown

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 review

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Previous review results

Review updated until commit 19ead3a ⚖️ Balanced

Results up to commit 081f67a 🚀 Fast


No changes from previous review

Powered by Qodo

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

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>
@caio-pizzol
caio-pizzol force-pushed the caio/it-1365-public-show-loading-overlay branch from 081f67a to 19ead3a Compare August 7, 2026 23:05
@caio-pizzol caio-pizzol changed the title feat(superdoc): expose showLoadingOverlay in public config (IT-1365) feat(superdoc): expose built-in loading UI toggle as ui.loading (IT-1365) Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant