-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Do not serialize text attributes that are not used later #42703
Conversation
@@ -144,7 +137,6 @@ private TextAttributeProps() {} | |||
public static TextAttributeProps fromMapBuffer(MapBuffer props) { | |||
TextAttributeProps result = new TextAttributeProps(); | |||
|
|||
// TODO T83483191: Review constants that are not being set! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're deserializing text attributes of a fragment. Some attributes are not handled on the fragment level but apply to the whole Text
element. I believe there's not much more to investigate here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant:
Lines 31 to 33 in 27f3810
// TODO: T63643819 refactor naming of TextAttributeProps to make explicit that this represents | |
// TextAttributes and not TextProps. As part of this refactor extract methods that don't belong to | |
// TextAttributeProps (e.g. TextAlign) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that we currently don't do what this comment describes is blocking me.
I'd like to...
- Split
TextAttributes
(C++) toTextAttributes
(<Text>
-level properties) andFragmentAttributes
(fragment-level properties) - Refactor
TextAttributeProps
(Java) toFragmentAttributes
Currently, one is a subset of another; not modeling them separately is at most a code smell.
I'd like them to be two slightly different sets (sharing a great common subset), so not modeling them separately is a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this doesn't seem correct, thanks for cleaning up
@mdvacca I think I will need your eyes on this one. Please see this thread. |
Base commit: cfc0ba0 |
@mdvacca What do you think? Is this a good way forward? |
@mdvacca has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -144,7 +137,6 @@ private TextAttributeProps() {} | |||
public static TextAttributeProps fromMapBuffer(MapBuffer props) { | |||
TextAttributeProps result = new TextAttributeProps(); | |||
|
|||
// TODO T83483191: Review constants that are not being set! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this doesn't seem correct, thanks for cleaning up
@mdvacca Let me know if I can help with making the internal build succeed |
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Summary:
Do not serialize text attributes that are not used later
Changelog:
[INTERNAL] [REMOVED] - Do not serialize text attributes that are not used later
Test Plan: