-
Notifications
You must be signed in to change notification settings - Fork 236
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
Refactor: Decouple style from segment #567
Comments
One issue that can arise with this: setting the style of an Either.left object with an Either.right style. |
To me, the best way this should be resolved is by refactoring Paragraph, so that it stores the segments styles outside of them by having a separate
|
The base area's type signature is:
When writing custom objects, we have to write the following code:
You'll notice that the styles are embedded into the custom objects. this doesn't make sense for two reasons:
Text
could haveTextStyle
andCustomObject
could haveCustomObjectStyle
? If so, we'd have to write this hairy code:I propose we separate the two, so that an segment type no longer knows its own style. Thus, the type signature would become:
The text was updated successfully, but these errors were encountered: