Skip to content

resolve dom on import issue by moving quill components into their own package#26676

Open
brrichards wants to merge 11 commits intomicrosoft:mainfrom
brrichards:dom-on-import
Open

resolve dom on import issue by moving quill components into their own package#26676
brrichards wants to merge 11 commits intomicrosoft:mainfrom
brrichards:dom-on-import

Conversation

@brrichards
Copy link
Contributor

@brrichards brrichards commented Mar 9, 2026

Summary

Quill in the react package was polluting all users of that package with a need to have a dom on import time. Now the quill specific imports that caused this have been moved to the new package at /packages/framework/quill-react.

Moved quillFormattedView.tsx, quillView.tsx, and mochaHooks to new package. Left plainTextView.tsx in the react package as it did not contain any quill components. Separated the plain text tests from quill view tests when moving them over to the new package.

Removed the inventory-app JSDOM fix needed when importing @fluidframework/react/internal when it still had quill components.

Created .changeset with reasoning for why the package was created.

Breaking Change

Anyone importing quill components from @fluidframework/react/internal will now have to import from @fluidframework/react/quill-react. Since this is still internal and only used in text-editor, which has been updated with new path, this should be fine.

Copilot AI review requested due to automatic review settings March 9, 2026 18:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR splits Quill-specific exports out of @fluidframework/react's main entry point into a separate @fluidframework/react/quill sub-path export. This prevents consumers who don't use Quill from incurring a DOM dependency at import time, since Quill requires a DOM environment to load.

Changes:

  • Added a new packages/framework/react/src/text/quill.ts barrel file that re-exports the Quill-related React components (FormattedMainView, PlainTextMainView, PlainQuillView, and associated types).
  • Removed the Quill-related exports from the main src/index.ts, isolating them from the primary package entry point.
  • Added a ./quill export map entry in package.json and updated the text-editor example to import Quill components from the new path.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/framework/react/src/text/quill.ts New barrel file aggregating Quill-specific exports for the ./quill sub-path
packages/framework/react/src/index.ts Removed Quill-related re-exports from the main entry point
packages/framework/react/package.json Added ./quill sub-path to the exports map
examples/data-objects/text-editor/src/app.tsx Updated imports to use @fluidframework/react/quill for Quill components

@Josmithr
Copy link
Contributor

Adding custom entrypoints like this is generally something we should avoid whenever possible IMO. Our standard entrypoints map to specific stability guarantees we make for our users, which we lose with a pattern like this.

I'm not completely up-to-speed on this issue - what is the failure mode users are seeing? What other options have we explored to resolve this?

@brrichards brrichards requested a review from a team as a code owner March 13, 2026 16:44
@github-actions
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  257792 links
    1822 destination URLs
    2063 URLs ignored
       0 warnings
       0 errors


@brrichards brrichards changed the title resolve dom on import issue by splitting out quill imports resolve dom on import issue by moving quill components into their own package Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants