-
-
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
Blockquote component #2885
Blockquote component #2885
Conversation
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.
Looks good to me!
I'm a little confused about the citation - not sure if it's supposed to be optional or not.
A more general note: Maybe it's just an example, but if we want the citation to always start with a "-" like "- Bastian Herre", then it might be better to automatically insert it rather than requiring the author to type it?
export type EnrichedBlockBlockquote = { | ||
type: "blockquote" | ||
text: EnrichedBlockText[] | ||
citation?: string |
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.
Is it right that citation
is marked as optional here?
site/gdocs/ArticleBlock.tsx
Outdated
{isCitationAUrl ? null : ( | ||
<footer> | ||
<cite>{block.citation}</cite> | ||
</footer> | ||
)} |
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.
If citation
is truly optional, this might produce an empty <footer><cite></cite></footer>
(although it doesn't at the moment because it errors out if no citation is given)
site/gdocs/centered-article.scss
Outdated
p { | ||
font-style: italic; | ||
&:last-of-type { | ||
margin-bottom: 4px; |
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.
If we only need this margin if the footer/cite block is present, it might be better to make it the footer's responsibility to apply this margin?
Thanks @sophiamersmann - that's what I get for rushing out the door before testing each state properly. I fixed the code and added a comment in |
Adds a blockquote component for linear topic pages. Previously we were (mistakenly) converting these to pullquote components which are enormous serif text blocks intended for extreme emphasis.
Archie
or