Migration to Craft.js · Issue #22 · LiveDuo/destack · GitHub
Skip to content

Migration to Craft.js #22

Closed
Closed

Description

@iojcde

Craft.js is another page-builder framework like Grapes.js (which destack currently uses)

However, Grapes.js isn't the best fit for this project.

1. TypeScript support

Fully typing Destack isn't possible yet because Grapes.js doesn't have any (working) TypeScript support yet. There has been a community effort before, but it seems to be abandoned for now.

Craft.js has TypeScript definitions embedded in it.

2. Grapes.js wasn't made to be used with react, unlike Craft.js.

Craft.js was made to be used with react, which means maintaining the project will be easier for the future.

3. Craft.js already has a system to store the component state.

The basic example includes a feature to copy the (compressed) state to clipboard. This will make it easier to do what destack does now ( parsing the default.json, etc ).

Here's a quick guide: link

This issue exists for discussion on the topic, and for tracking the feature.

Activity

  1. jpetrantoni commented on Dec 5, 2022

    @jpetrantoni

    Any update on this? I would like to contribute to migrating to craft.js. This project is severely limited in scope from grapejs.

  2. LiveDuo commented on Dec 6, 2022

    @LiveDuo
    Owner

    @jpetrantoni

    There's significant work done in feature/craftjs. It's my main focus now regarding the project.

    I'd try to get a complete status on a PR in a few days. Quick summary for now:

    • MVP is now at a working in the feature branch
    • Editor is a bit slow to load (reason is Next.js transpiles the editor react code in production)
    • Some themes are not yet checked if they work properly (Hyper UI is but Tailblocks and Meraki UI are not)
    • We'd need e2e tests that works with Craft.js

    If you are looking to contribute you can have a look at feature/craftjs. Some things that might be helpful are e2e tests and maybe having a quick check with Tailblocks and Meraki UI components.

  3. pinned this issue on Dec 8, 2022
  4. LiveDuo commented on Dec 17, 2022

    @LiveDuo
    Owner

    There's a new starter project for Destack v2 (with Craft.js) at destack-starter-beta for anyone looking to have a peak.

    You can get it locally by:

    git clone https://github.com/liveduo/destack-starter-beta
  5. brunonar commented on Dec 19, 2022

    @brunonar

    The Craft.js project hasn't been updated since August. Are you certain it's still active?

  6. LiveDuo commented on Jan 11, 2023

    @LiveDuo
    Owner

    @brunonar Quite late response but it's for everyone's visibility.

    There's a PR on 7/12 from @prevwong. Yet, I'm not certain Craft.js will remain active. Many projects including Craft.js(AFAIK) are maintained by a single engineer. That means he might go offline for a while as stuff happen.

    But, Craft.js ticks all the boxes mentioned by @iojcde in this issue. It also adopted by quite a few people and there's a fair chance another maintainer comes by or someone's forks the project off.

    Moving forward, I think it will be aright whatever the case. Besides, Craft.js unlike Grapes.js is a thiner layer that manages the viewport and component state (redo/undo, serialisation etc) and it easier to replace or replicate if needed.

  7. unpinned this issue on Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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