grandnode/grandnode2

Refactoring Template Handling - Implementing Plugin-like Mechanism

KrzysztofPajak opened this issue · 0 comments

Issue Description

Currently, our template handling system relies on a Themes directory, which limits flexibility and scalability. There is a need to revisit this approach and shift to a more modular and dynamic mechanism.

Proposed Changes

  • Removal of the Current Mechanism: Eliminate the entire Themes directory and its directly associated functions.
  • New Implementation Similar to Plugins: Propose the creation of a new template handling mechanism that works similarly to our existing plugin system. This means each template can be registered and installed as a separate plugin.
  • Addition of Theme.Minimal Plugin: As part of this change, introduce a new plugin Theme.Minimal, which will serve as an example of template implementation in the new system.

Benefits

  • Increased Modularity: This new approach allows for easier management of templates, similar to the handling of plugins.
  • Ease of Extension: The system will be more flexible in terms of adding new templates by developers.
  • Unified Architecture: Moving templates to the plugin system will bring more architectural coherence.

Considerations

  • What changes are required in the Project to support the new template system?
  • What are the best practices for creating templates in the new system?
  • How will the migration of current templates to the new system be handled?