Skip to content

feat: fluent interface pattern on registerPlugin in Univer class#6740

Open
kenny-not-dead wants to merge 1 commit into
dream-num:devfrom
kenny-not-dead:fluentInterface
Open

feat: fluent interface pattern on registerPlugin in Univer class#6740
kenny-not-dead wants to merge 1 commit into
dream-num:devfrom
kenny-not-dead:fluentInterface

Conversation

@kenny-not-dead

Copy link
Copy Markdown
Contributor

close #xxx

The Univer class has a method for registering multiple plugins. It also allows for individual registration using the appropriate method, as documented in some places. It is proposed to expand the ability to use a fluent interface pattern similar to the RXJS method for registrations of the form

univer
.registerPlugin(pluginA)
.registerPlugin(pluginB)

With this approach, it can increase some of the code's readability, and what's important is that it's not a breaking change, but only an additional feature.

I demonstrated this approach using the existing example from the documents.

up to you

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@kenny-not-dead kenny-not-dead requested a review from jikkai as a code owner March 27, 2026 09:43
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.

1 participant