slate-edit-list icon indicating copy to clipboard operation
slate-edit-list copied to clipboard

Support latest version of Slate

Open quentez opened this issue 6 years ago • 18 comments

Still a work in progress. I need to get all of the tests working.

quentez avatar Aug 26 '18 01:08 quentez

@quentez I can also take a look into this whenever you cant work on it, let me know how your workflow is going

omar-sr88 avatar Aug 29 '18 15:08 omar-sr88

@omar-sr88 I got most things working, and we're actually using this branch right now in our product. I still have issues getting all the tests to pass though. The problem appears to be that the data structure for the selection changed, and because of this it doesn't work to initialize it from input.yaml (or at least not in its current form). Any idea how we could address that?

quentez avatar Aug 29 '18 17:08 quentez

It would be great to convert all these tests to slate-hyperscript. It would make it less coupled with the JSON representation. I was planning to do this using slate-hyperprint through the CLI. I did it for slate-edit-table and others, but not this one sadly...

Soreine avatar Aug 29 '18 18:08 Soreine

Hi there, I started to take a look at moving from yaml files to jsx ones but I am struggling to make the correct version of the yamls into jsx. Not sure if Im getting the structure is correct when I need empty paragraphs specifically

omar-sr88 avatar Sep 04 '18 17:09 omar-sr88

@Soreine Could you please do one of the tests here to use hyperscript?

I have tried working with backsapace-empty-between-inline first, I have converted the input.yaml to

    <value>
        <document>
            <ul_list>
                <list_item>
                    <paragraph>
                        <inline type="link">First item</inline>
                    </paragraph>
                </list_item>
                <list_item>
                    <paragraph>
                        <text key="_selection_key" />
                    </paragraph>
                </list_item>
                <list_item>
                    <paragraph>
                        <inline type="link">Third item</inline>
                    </paragraph>
                </list_item>
            </ul_list>
        </document>
    </value>

and the expected.yaml

To:

    <value>
        <document>
            <ul_list>
                <list_item>
                    <paragraph>
                        <inline type="link">First item</inline>
                    </paragraph>
                </list_item>
            </ul_list>
            <paragraph />
            <ul_list>
                <list_item>
                    <paragraph>
                        <inline type="link">Third item</inline>
                    </paragraph>
                </list_item>
            </ul_list>
        </document>
    </value>

Followed the pattern used on slate-edit-table for this, but my result keeps showing me the paragraph inside of a li and not by itself. If I could get some clarification on this I could apply the move on everything.

omar-sr88 avatar Sep 05 '18 13:09 omar-sr88

@omar-sr88 I have converted all tests to hyperscript.

I'm sorry, I can't merge this right now. We are still thinking whether we will upgrade our codebase to the new Slate version at GitBook. We might fork Slate for a moment. We will communicate on this precisely this week.

Soreine avatar Sep 09 '18 13:09 Soreine

@Soreine can I ask what potential limitations you're facing that are making you consider forking?

Nantris avatar Sep 10 '18 02:09 Nantris

Hi, we're actually depending on this change (we upgraded slate and it broke this plugin). Is there an ETA on the decision to merge? Is there something I can do (i.e., remaining tasks) to move things along?

eamonnsullivan avatar Sep 12 '18 12:09 eamonnsullivan

We might fork Slate for a moment. We will communicate on this precisely this week.

@Soreine @SamyPesse do you have any update on your decision?

Nantris avatar Sep 17 '18 20:09 Nantris

@Slapbox We've just published a readme on our fork explaining the reasons: https://github.com/GitbookIO/slate/blob/master/Readme.md

SamyPesse avatar Sep 18 '18 09:09 SamyPesse

@SamyPesse thanks very much for the update. Your reasons make a lot of sense. I know internally upgrading to 0.40.0 before forking probably makes no sense, but I think you'd have the potential to rope in a larger chunk of the community if you upgraded before forking. I don't know how much interest Gitbook has in keeping the community though, as I don't know the strategic goals as well.

Best of luck with this fork and thanks for all you've contributed to the Slate community. You too @Soreine!

Nantris avatar Sep 18 '18 15:09 Nantris

@SamyPesse thanks for the update – would you be interested in exchanging ownership of the npm module if a fork continues your work tracking the Slate mainline?

tommoor avatar Sep 18 '18 17:09 tommoor

I've fixed all the tests and made the code compatible with the latest Slate version. I think at this point, we'll have to create a new package for people who want to use the official Slate build (unless ownership can be transferred).

(The lint fails because of bugs in the Gitbook ESLint config).

quentez avatar Sep 25 '18 21:09 quentez

Update: I've published that PR here for the time being. I make no guarantee of stability/maintainability for now, but it may be helpful for people who are blocked.

We will probably start a new package soon that we will maintain in the long run, but this probably won't happen for another month.

quentez avatar Sep 27 '18 17:09 quentez

@quentez thanks very much for your work.

Nantris avatar Sep 27 '18 19:09 Nantris

@quentez Thank you very much for your work! I've loaded your package with newest version of Slate and it doesn't work as expected. Did you try it with newest version of Slate?

svenadlung avatar Nov 01 '18 09:11 svenadlung

@svenadlung I started a PR to upgrade to latest slate here: https://github.com/frontapp/slate-edit-list/pull/1

would be good to get a second set of eyes on it and whether it seems like its working

cdunn avatar Nov 16 '18 18:11 cdunn

@cdunn Thx a lot. For me your PR looks pretty good! No problems so far.

svenadlung avatar Nov 22 '18 09:11 svenadlung