-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): add dependency injection container #1006
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Implement `createInjectionContainer` for managing service lifecycles - Implement `provide` and `inject` for dependency injection - Support singleton and transient service lifecycles - Add unit tests for container functionality
qwqcode
added a commit
that referenced
this pull request
Oct 18, 2024
- Introduce a service dependency container for better management (#1006). - Replace original `services` definitions with `provide` and `inject` methods. - Recommend calling `inject` at the beginning of `ArtalkPlugin` to explicitly inject required dependencies. - Replace `load` with `mount` for improved lifecycle handling. - Track local config. - Fix potential language setting not working issue. (Fixes #973) - Refine Type definitions for clarity and maintainability. - See [TypeDoc](https://artalk.js.org/typedoc/) for updates. - Enhance config logic with `ConfigManager`. - Deprecate `ctx.conf` and `ctx.$root`; use `getConf()` and `getEl()` instead. - Update client default config settings. (Fixes #1001) - Improve event handling with `EventManager` refactor. - Update plugin and editor architecture for greater flexibility. - Further eliminate global variables and avoid directly passing the `Context` interface as a function parameter. Instead, use more explicit and specific types and parameters. - Remove deprecated and redundant code for a cleaner structure. BREAKING CHANGE: This update changes the UI client's export Types. Although we aim to maintain backward compatibility, it may still affect downstream UI programs. Please refer to the [TypeDoc](https://artalk.js.org/typedoc/).
qwqcode
added a commit
that referenced
this pull request
Oct 18, 2024
- Introduce a service dependency container for better management (#1006). - Replace original `services` definitions with `provide` and `inject` methods. - Recommend calling `inject` at the beginning of `ArtalkPlugin` to explicitly inject required dependencies. - Replace `load` with `mount` for improved lifecycle handling. - Track local config. - Fix potential language setting not working issue. (Fixes #973) - Refine Type definitions for clarity and maintainability. - See [TypeDoc](https://artalk.js.org/typedoc/) for updates. - Enhance config logic with `ConfigManager`. - Deprecate `ctx.conf` and `ctx.$root`; use `getConf()` and `getEl()` instead. - Update client default config settings. (Fixes #1001) - Improve event handling with `EventManager` refactor. - Update plugin and editor architecture for greater flexibility. - Further eliminate global variables and avoid directly passing the `Context` interface as a function parameter. Instead, use more explicit and specific types and parameters. - Remove deprecated and redundant code for a cleaner structure. BREAKING CHANGE: This update changes the UI client's export Types. Although we aim to maintain backward compatibility, it may still affect downstream UI programs. Please refer to the [TypeDoc](https://artalk.js.org/typedoc/).
qwqcode
added a commit
that referenced
this pull request
Oct 18, 2024
- Introduce a service dependency container for better management (#1006). - Replace original `services` definitions with `provide` and `inject` methods. - Recommend calling `inject` at the beginning of `ArtalkPlugin` to explicitly inject required dependencies. - Replace `load` with `mount` for improved lifecycle handling. - Track local config. - Fix potential language setting not working issue. (Fixes #973) - Refine Type definitions for clarity and maintainability. - See [TypeDoc](https://artalk.js.org/typedoc/) for updates. - Enhance config logic with `ConfigManager`. - Deprecate `ctx.conf` and `ctx.$root`; use `getConf()` and `getEl()` instead. - Update client default config settings. (Fixes #1001) - Improve event handling with `EventManager` refactor. - Update plugin and editor architecture for greater flexibility. - Further eliminate global variables and avoid directly passing the `Context` interface as a function parameter. Instead, use more explicit and specific types and parameters. - Remove deprecated and redundant code for a cleaner structure. BREAKING CHANGE: This update changes the UI client's export Types. Although we aim to maintain backward compatibility, it may still affect downstream UI programs. Please refer to the [TypeDoc](https://artalk.js.org/typedoc/).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
createInjectionContainer
for managing service lifecyclesprovide
andinject
for dependency injection