-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add author header #3256
Add author header #3256
Conversation
_enrichSubclassContent = (content: Record<string, any>): void => { | ||
if (content.bio) { | ||
content.bio = content.bio.map((html: RawBlockText) => | ||
htmlToEnrichedTextBlock(html.value) | ||
) | ||
} | ||
if (content.socials) { | ||
// We're parsing here an ArchieML array of objects outside of the | ||
// usual freeform array [+body]. This means we need to manually | ||
// reconstruct the {type, value} object created by freeform arrays | ||
// that parseSocials expects. Technically, we could just parse the | ||
// [socials] array without all the parseRawBlocksToEnrichedBlocks | ||
// machinery (like we dit above for the [bio] block), but this way | ||
// we benefit from features and the predictability of the regular | ||
// parsing pipeline. In particular, this gives us round trip testing | ||
// and the documenting of blocks in a consistent way, wihch is more | ||
// justifiable here compared to the bio block given the wider array | ||
// of edge cases for this block. | ||
content.socials = parseSocials({ | ||
type: "socials", | ||
value: content.socials, | ||
}) | ||
} | ||
} |
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.
@ikesau I'm curious if you have any thoughts on the handling of the bio and socials section of the header:
- bio: just a property with possibly rich text
- socials: a full-blown Archie block outside of the [+body]
09336c6
to
751e8db
Compare
cd886f2
to
557eda7
Compare
@danyx23 I'm sending you this for review ahead of responsive styles to parallelize structural discussions with the less problematic, more straightforward mobile styles, for which a design review is usually enough. |
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.
LGTM!
This PR adds a new "Author" OwidGdocType and associated template.
👉 See this comment for some of the more structural decisions I made.
staging preview, gdoc
Only consider the "🌑 Dark launch" scope from the tracking issue