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

Overview - Upgrade to new Framework #16

Open
21 of 27 tasks
eliot-akira opened this issue Dec 17, 2023 · 2 comments
Open
21 of 27 tasks

Overview - Upgrade to new Framework #16

eliot-akira opened this issue Dec 17, 2023 · 2 comments
Labels

Comments

@eliot-akira
Copy link
Contributor

eliot-akira commented Dec 17, 2023

This document tracks the progress of upgrading to the new modules in the Framework and Template System, from the deprecated Interface module and Plugin Framework v2.

See documentation pages for:

This is relevant for Loops & Logic, Tangible Blocks, and all plugins as they transition to using the new framework.

Rationale

Here are some reasons why the Plugin Framework and Interface modules were deprecated.

  • A lot of unused code, such as legacy plugin updater and licenser based on EDD server
  • Monolithic build setup that builds all internal modules at once
  • Written in old code design pattern (See framework/object)

The new modules are individual packages that can be documented, tested, built and published on their own.

How to upgrade

Open pull request for each plugin and perform the upgrade.

Replace Interface module

  • Replace methods under tangible_interface() with namespaced functions

Replace Plugin Framework

Interface module

Here are the features that were in the Interface module. These are now consolidated with other Template System modules.

  • Chart → modules/chart
  • Date picker → modules/date-picker
  • Embed → modules/embed
  • Glider → modules/glider
  • Prism → modules/prism
  • Select → modules/select
  • Slider → modules/slider
  • Sortable → modules/sortable
  • Table → modules/table

Plugin framework

Here are the features that were in the old plugin framework. They're being moved and rewritten into new modules.

  • AJAX → framework/ajax
  • Date module → framework/date
  • HJSON module → framework/hjson
  • HTML → framework/html
  • Preact → framework/preact
  • Utilities
    • Format → framework/format
    • Log → framework/log

Server-side utilities

  • Async Action
  • Background Queue
  • File System

Plugin features

  • Plugin updater → Plugin Updater module
  • Settings page with tabs
  • Support page
  • Plugin dependency check
  • Licensing - Was using EDD license server

Post type extensions

  • Sortable post type → admin/post-types/sortable-post-type
  • Duplicate posts → admin/post-types/duplicate-post
@eliot-akira eliot-akira changed the title [Overview] Upgrade to new Framework and Tempate System modules [Overview] Upgrade to new Framework and Template System modules Dec 17, 2023
@eliot-akira eliot-akira pinned this issue Dec 17, 2023
@eliot-akira eliot-akira changed the title [Overview] Upgrade to new Framework and Template System modules Upgrade to new Framework and Template System modules Dec 17, 2023
@GabrielGallagher
Copy link

Hi Eliot,

We have a lot of in-development (or released) plugins on the old framework.
Should we be switching to the new version of the framework for those?
I guess a lot of them might rely on the dependency check and background queue stuff, so maybe we have to wait?

@eliot-akira
Copy link
Contributor Author

eliot-akira commented Jan 26, 2024

We have a lot of in-development (or released) plugins on the old framework. Should we be switching to the new version of the framework for those?

Yes, it would be good to gradually migrate these plugins to use the new framework, since it's slimmer and will be updated going forward. But it's not urgent, since the old plugin framework can co-exist with it and will continue to work.

I guess a lot of them might rely on the dependency check and background queue stuff, so maybe we have to wait?

I think we can start upgrading the plugins, and move over any remaining features from the old plugin framework as needed.

As part of the upgrade, I'd like to move them to public or private repositories on GitHub.


A big question to be solved still is how to handle plugin updates. Currently, there are several ways plugins are updated:

  • L&L: Published and updated via WordPress plugin directory
  • Tangible Blocks/Pro/Editor (and maybe others): Published by Bitbucket pipeline (v2) to the plugin update server (updater.tangible.one), and updated by the Plugin Updater module
  • Older plugins (?): Published by Bitbucket pipeline (v1) to the EDD store, and updated by the EDD plugin updater in the old plugin framework

This could be simplified by using:

  • GitHub Actions to prepare releases
    Build zip packages on every commit and version tag. Maybe publish to Cloudflare.
  • Git Updater to update plugins directly from GitHub

For private repos, such as the Pro plugins, we'll still need to maintain our own plugin updater and update server for licensing.

@eliot-akira eliot-akira changed the title Upgrade to new Framework and Template System modules Overview - Upgrade to new Framework Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants