Skip to content

Better separation of concerns between UI & core logic #29

@vanniktech

Description

@vanniktech

I really like the idea of having a core module and an ui module where you can split things. Right now the barrier to roll your own ui is too high in my opinion. CropperPreview should be part of the core module. It also has no reference to material which is nice for #26. Like you said there could even be a krop-material & krop-material3 module where you have two different implemenations.

If CropperPreview is in the core module one could also just embed the core bit (without the controls):

Screenshot 2024-11-28 at 16 29 14

as part of my own UI. Personally, I don't like that currently it is shown as a Dialog. It feels clunky, especially with a toolbar. It would be much nicer if this was a proper screen that also takes proper insets and I would be able to do so if I could use CropperPreview on my own.

Another thing that probably needs to be refactored is the state.setInitialState(style) function. Maybe it is as easy as passing the style as a constructor parameter.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions