-
Notifications
You must be signed in to change notification settings - Fork 6
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
Stories projects interoperability: strip Android specifics #478
base: issue/discuss-interop-format
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
{ | ||
"metadata": { | ||
"revision": "1.0", | ||
"device": { | ||
"screen": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
||
"width": 1080, | ||
"height": 1280 | ||
}, | ||
"platform": "android|ios", | ||
"model": "iphone10" | ||
} | ||
}, | ||
"frames": [ | ||
{ | ||
"source": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. regarding this: |
||
|
@@ -18,17 +29,14 @@ | |
"scale": 1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
these would remain the same, and are always calculated from the center of the screen where the object is initially placed. Added the screen size for this as part of the |
||
"addedViewTextInfo": { | ||
"text": "this is some text", | ||
"fontSizePx": 140, | ||
"textColor": -1, | ||
"textAlignment": 2 | ||
"fontSize": 14, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggest we change this from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, what looks like a good "universal" unit on iOS @bjtitus ? wonder if they save this information in Kanvas already, maybe we can borrow any ideas from there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use point sizes, typically. I believe this is the same as the "density-independent pixels" size on Android: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah cool! yes they even seem to have the same correlation, TIL @bjtitus 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like One exception would be letterspacing, which is stored in @mzorz probably once the text feature work is done we can update this with all the new units and expand the discussion a bit - I'll follow up with you on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good! |
||
"textColor": "#00000000", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this hex code format comes in handy for cross-platform text representation so, maybe a no-brainer, let me know if there's any other better options. |
||
"textAlignment": "left|center|right" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably we can do some app-level defined values like these three? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. iOS has 4 built in text alignments:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see! is |
||
} | ||
}, | ||
"uri": null | ||
} | ||
], | ||
"saveResultReason": { | ||
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess" | ||
} | ||
] | ||
}, | ||
{ | ||
"source": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding this: |
||
|
@@ -49,9 +57,9 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "this is some text, on a video background", | ||
"fontSizePx": 140, | ||
"textColor": -1, | ||
"textAlignment": 4 | ||
"fontSize": 14, | ||
"textColor": "#ffffffff", | ||
"textAlignment": "left|center|right" | ||
} | ||
}, | ||
"uri": null | ||
|
@@ -65,17 +73,14 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "😁", | ||
"fontSizePx": 284, | ||
"textColor": -16777216, | ||
"textAlignment": 4 | ||
"fontSize": 28, | ||
"textColor": "#ffffffff", | ||
"textAlignment": "left|center|right" | ||
} | ||
}, | ||
"uri": null | ||
} | ||
], | ||
"saveResultReason": { | ||
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess" | ||
} | ||
] | ||
}, | ||
{ | ||
"source": { | ||
|
@@ -95,9 +100,9 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "one text view", | ||
"fontSizePx": 140, | ||
"textColor": -1, | ||
"textAlignment": 2 | ||
"fontSize": 14, | ||
"textColor": "#ffffffff", | ||
"textAlignment": "center" | ||
} | ||
}, | ||
"uri": null | ||
|
@@ -111,9 +116,9 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "another text view", | ||
"fontSizePx": 140, | ||
"textColor": -1, | ||
"textAlignment": 2 | ||
"fontSize": 14, | ||
"textColor": "#ffffffff", | ||
"textAlignment": "center" | ||
} | ||
}, | ||
"uri": null | ||
|
@@ -127,9 +132,9 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "third text view", | ||
"fontSizePx": 140, | ||
"textColor": -1, | ||
"textAlignment": 2 | ||
"fontSize": 14, | ||
"textColor": "#ffffffff", | ||
"textAlignment": "center" | ||
} | ||
}, | ||
"uri": null | ||
|
@@ -143,17 +148,14 @@ | |
"scale": 1, | ||
"addedViewTextInfo": { | ||
"text": "😬", | ||
"fontSizePx": 284, | ||
"textColor": -16777216, | ||
"textAlignment": 4 | ||
"fontSize": 28, | ||
"textColor": "#ff55ff", | ||
"textAlignment": "right" | ||
} | ||
}, | ||
"uri": null | ||
} | ||
], | ||
"saveResultReason": { | ||
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess" | ||
} | ||
] | ||
} | ||
], | ||
"title": null | ||
|
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.
this would be the revision number to correctly attempt deserialization.