Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Is it ready for productions apps ? #46

Closed
dktlabs opened this issue Oct 1, 2019 · 5 comments
Closed

Is it ready for productions apps ? #46

dktlabs opened this issue Oct 1, 2019 · 5 comments
Labels
question Further information is requested

Comments

@dktlabs
Copy link

dktlabs commented Oct 1, 2019

Hi @jsamr your library is awesome. I browsed the repo and it looks great.
I have three questions regarding your lib:

  1. Is it production ready ? (Can we use it in our production apps)
  2. How do you generate / export the document (in JSON) created by Typer (so it can be use later in Printer ?
  3. How do you create custom behaviours using the lib (Ex. Headers H1, H2, Subtitles, Quotes) in the toolbar component ?
@dktlabs dktlabs added the question Further information is requested label Oct 1, 2019
@jsamr
Copy link
Collaborator

jsamr commented Oct 1, 2019

@EnanlyPay Hi! I'm glad you like it. To answer your questions:

  1. I'm about to add a schemaVersion in the Document interface and freeze the Document for up to at least 1.X releases. So when this is done, I would say that the document shape won't change for a very long period of time. The internal model handling diffs and document operations is now very stable, and has a reasonably high coverage (87.88%). The global test coverage is lowered by the React components, but I want to enhance it before releasing upcoming stable. My believe is, if there are remaining bugs, they would rather be in React components, and should be minor bugs. With this information, it's up to you to decide if it's production ready. But I am throwing it in production for a client, we're launching a public beta in 2 weeks.
  2. Because Typer is a controlled component, it does not generate a document per-se, but rather it updates the one you passed. If you pass it onDocumentUpdate prop, you can overwrite the updated document in the master component state . You should use buildEmptyDocument top level function to generate the first document. You can check the minimal example to see such setup.
  3. That I must document prior to releasing late stable. The object specifying such transforms is textTransforms that you must pass to the document renderer (Print or Typer). The shape of such transforms can be grasp here: src/core/Transforms.ts#L166. The only thing really missing are line-wise transforms: that is, a transform which modifies a whole line. So I wouldn't say the Transform.GenericSpec is frozen yet. On the Toolbar side, the component is not modular enough yet to add transforms like this. So you should probably decorate a Toolbar component to fit the behavior you want implemented. I'm also planning to expose some hooks that would help with a custom document controller. I would advise you to wait for late stable before integrating such transforms. But anyway, you can use upcoming stable and have a guarantee that any document will be compatible with late stable.

To sum it up, here is what is missing prior to releasing the upcoming stable:

And later:

  • React hooks for customizing the toolbar component;
  • Line-wise text transforms (support for headers, lists...);
  • Documenting custom text transforms.

@jsamr jsamr pinned this issue Oct 1, 2019
@dktlabs
Copy link
Author

dktlabs commented Oct 1, 2019

Thank you for your detailed answer. Alright ! we will be waiting for your beta release (0.10.0)

@dktlabs dktlabs closed this as completed Oct 1, 2019
@jsamr
Copy link
Collaborator

jsamr commented Oct 4, 2019

@EnanlyPay I'm following semantic versioning. Therefore, if I delete a prop from the API, I must change to next major (bellow 1.0, a major is identified with the second dot separated number). So I changed in the text 0.10.0 with "upcoming stable" and "0.11.0" with "late stable / later".

@dktlabs
Copy link
Author

dktlabs commented Oct 4, 2019 via email

@jsamr
Copy link
Collaborator

jsamr commented Feb 19, 2020

@EnanlyPay With the 1.0.0 release, the answer is yes!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants