Skip to content

Proposal: introduce modular plugin system #243

Open
@bukhtiyarov-a-v

Description

@bukhtiyarov-a-v

Сurrent solution is heavily tied to operations on DOM elements and their state, which in turn complicates the separation of business logic and visualisation.

We would like to be able to separate the business logic and visualisation to be able to easily extend either of them.
A bonus would be the ability to unit test each part of the library.

We propose to split the plugin into two parts: core and DOM.
Also, we propose to add the ability to easily extend the application through the plugin system.

The inspiration for this idea comes from the DayJS plugin system.

import Raty from 'raty/core'
import RatyDOM from 'raty/dom'

// Adding plugin
import 'raty/half-star'

const instance = Raty.create(options)

RatyDOM.render(instance, element)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions