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
Use big object for constants #3628
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Speaking of constants (and maybe this is piling on too much to this PR/discussion!) but I would really love this aspect of tldraw to be configurable when it comes to constants: Quote:
And also maybe it's overridable, maybe not 😬 I'm bringing it up because if we're gonna rework this it's worth considering how that would fit into the overall story here. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
A recurring pattern with tldraw is that a user will want to configure something that we don't expect to be configurable. Often these are constant values, i.e. the drag distance or some timing or default. Some of these, such as our styles, can be configured by users because they're objects. They can be imported and mutated before the editor is created.
This PR moves all of our constants into one big object. (Well, technically two objects for the editor and tldraw packages).
Now all values, even primitive values, can be configured.
Change Type
sdk
— Changes the tldraw SDKfeature
Release Notes
editorConstants
andtldrawConstants