Skip to content
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

Merged
merged 6 commits into from
Mar 15, 2024
Merged

Add author header #3256

merged 6 commits into from
Mar 15, 2024

Conversation

mlbrgl
Copy link
Member

@mlbrgl mlbrgl commented Feb 28, 2024

Screenshot 2024-03-06 at 18.44.34.png

This PR adds a new "Author" OwidGdocType and associated template.

👉 See this comment for some of the more structural decisions I made.

  •  responsive styles

staging preview, gdoc

Only consider the "🌑 Dark launch" scope from the tracking issue

@mlbrgl mlbrgl mentioned this pull request Feb 28, 2024
2 tasks
@mlbrgl mlbrgl mentioned this pull request Feb 28, 2024
24 tasks
Comment on lines +28 to +56
_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,
})
}
}
Copy link
Member Author

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]

@mlbrgl mlbrgl changed the base branch from master to fix-style-research-writing March 2, 2024 18:45
@mlbrgl mlbrgl force-pushed the fix-style-research-writing branch from 09336c6 to 751e8db Compare March 4, 2024 14:57
Base automatically changed from fix-style-research-writing to master March 4, 2024 14:59
@mlbrgl mlbrgl force-pushed the author-header branch 3 times, most recently from cd886f2 to 557eda7 Compare March 6, 2024 15:31
@mlbrgl mlbrgl changed the base branch from master to fix-first-rw March 6, 2024 15:32
@mlbrgl mlbrgl changed the base branch from fix-first-rw to generic-bake-dir March 6, 2024 17:22
@mlbrgl
Copy link
Member Author

mlbrgl commented Mar 6, 2024

@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.

@mlbrgl mlbrgl requested a review from danyx23 March 6, 2024 17:50
@mlbrgl mlbrgl marked this pull request as ready for review March 6, 2024 17:50
Base automatically changed from generic-bake-dir to fix-first-rw March 8, 2024 11:22
Base automatically changed from fix-first-rw to master March 8, 2024 11:30
Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mlbrgl
Copy link
Member Author

mlbrgl commented Mar 15, 2024

Merge activity

  • Mar 15, 4:42 AM EDT: @mlbrgl started a stack merge that includes this pull request via Graphite.
  • Mar 15, 4:42 AM EDT: @mlbrgl merged this pull request with Graphite.

@mlbrgl mlbrgl merged commit 36c404d into master Mar 15, 2024
27 checks passed
@mlbrgl mlbrgl deleted the author-header branch March 15, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants