Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript All The Things! #261

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ViableSystemModel
Copy link

I'm working on moving the entirety of Dante 3 to typescript so that its types will play nice in a hobby project. The changes so far have been mostly trivial. The things I still need to wrap my head around are theming and blocks.

I think a lot of the theming could be redone to use useDanteTheme rather than using the ThemeProvider and all that. Typescript seems to like this better and it's an approach referenced in the Emotion docs.

Blocks, I haven't fully done the dive on. Any insight as to how those work would be helpful. Typescript seems to infer their types as a bunch of different things from TipTap, none of which have fully compatible types, but all of which have nearly compatible types. I may be able to look at this more later this weekend.

@michelson
Copy link
Owner

Hi there, thanks for this contribution.
I would try to make this a little more progressive step by step than a massive PR; some changes are being introduced that I'm not sure yet if it would be a good idea to incorporate in this PR.

I would accept a patch with the files renamed first and some typings, but let's not change how we are using the theme and the plugin configurations.

Blocks, I haven't entirely done the dive; any insight as to how those work would be helpful.

Blocks are a react component and a configuration object (both exported in a block file). The config of the plugin will tell Dante how the plugin should behave and be rendered; there are some callbacks to tiptap functions/events.
If there is any questions that you need, I will be happy to help you

@ViableSystemModel
Copy link
Author

That makes sense. I was diving straight in to get my bearings. I'd be happy to break them up as you've suggested. I'll submit one for the theme system as well because I'm pretty sure the changes are minimal.

@michelson
Copy link
Owner

Hi Daniel, yeah, let's atomize the PR, sounds great

thank you very much

@wandersonalwes
Copy link

Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants