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

Remove CableReady plugin system #238

Merged
merged 2 commits into from
Jan 16, 2023
Merged

Remove CableReady plugin system #238

merged 2 commits into from
Jan 16, 2023

Conversation

marcoroth
Copy link
Member

@marcoroth marcoroth commented Jan 16, 2023

Type of PR

Removal

Description

This pull requests removes the CableReady plugin system.

Reverts #227

Why should this be removed

The reason why the plugin system was introduced was the abstract away the fact that the morph operation was using morphdom under the hood and because it was easily confused with StimulusReflexes' morph method which is available in any Reflex class.

The plugin system was not solving the underlying issue, it was just delegating it to the Plugins "class". We already introduced the OperationStore concept for this exact use-case in #124. Also, if we really want to get rid of the morphdom dependency or rename the morph operation to morphdom we should just do it.

In order to support other morphing libraries such as idiomorph, micromorph, nanomorph, diffhtml, @alpinejs/morph and diffDOM (including morphdom) we can provide operation packages that people can install and include, similar to how @cable_ready/audio_operations and @cable_ready/alpine_morph works.

With that approach we can package and import the individual morph libraries independently like:

import CableReady from 'cable_ready'
import AlpineMorph from '@cable_ready/alpine_morph'

CableReady.addOperations(AlpineMorph)

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@marcoroth marcoroth merged commit c79df72 into master Jan 16, 2023
@marcoroth marcoroth deleted the remove-plugin-system branch January 16, 2023 18:39
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