Skip to content

Typescript All The Things! - #261

Draft
ViableSystemModel wants to merge 6 commits into
michelson:masterfrom
ViableSystemModel:typing.typescript-all-the-things
Draft

Typescript All The Things!#261
ViableSystemModel wants to merge 6 commits into
michelson:masterfrom
ViableSystemModel:typing.typescript-all-the-things

Conversation

@ViableSystemModel

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

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

thank you very much

@wandersonalwes

Copy link
Copy Markdown

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.

3 participants