Skip to content
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

refactor(ui): improve modularity, lifecycle, and types #1007

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Commits on Oct 18, 2024

  1. refactor(ui): improve modularity, lifecycle, and types

    - 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 committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    37d929c View commit details
    Browse the repository at this point in the history