Moar Standard Site Tweaks (#10641)

(cherry picked from commit af04e8b496)
This commit is contained in:
Eric Bailey
2026-05-28 11:32:03 -05:00
parent 925eaa9fc8
commit 8a7b04acce
2 changed files with 17 additions and 8 deletions
@@ -6,6 +6,7 @@ import {Trans, useLingui} from '@lingui/react/macro'
import {makeProfileLink} from '#/lib/routes/links' import {makeProfileLink} from '#/lib/routes/links'
import {toNiceDomain} from '#/lib/strings/url-helpers' import {toNiceDomain} from '#/lib/strings/url-helpers'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {StandardSite} from '#/components/icons/community/StandardSite'
import {InlineLinkText} from '#/components/Link' import {InlineLinkText} from '#/components/Link'
import { import {
matchStandardSitePublisher, matchStandardSitePublisher,
@@ -46,10 +47,10 @@ export function StandardSiteMetaRow({
: undefined : undefined
const articleDomain = toNiceDomain(view.uri) const articleDomain = toNiceDomain(view.uri)
const articlePublisher = matchStandardSitePublisherByUri(view.uri) const articlePublisher = matchStandardSitePublisherByUri(view.uri)
const DomainIcon = articlePublisher?.Icon const DomainIcon = articlePublisher?.Icon || StandardSite
const metaTextStyle = [ const metaTextStyle = [
a.text_xs, a.text_xs,
a.leading_snug, a.leading_tight,
t.atoms.text_contrast_medium, t.atoms.text_contrast_medium,
] ]
@@ -59,11 +60,11 @@ export function StandardSiteMetaRow({
items.push({ items.push({
key: 'domain', key: 'domain',
node: ( node: (
<View style={[a.flex_row, a.align_center]}> <View style={[a.flex_shrink, a.flex_row, a.align_center, a.gap_2xs]}>
{DomainIcon && ( {DomainIcon && (
<DomainIcon size="sm" fill={t.atoms.text_contrast_medium.color} /> <DomainIcon size="xs" fill={t.atoms.text_contrast_medium.color} />
)} )}
<Text numberOfLines={1} style={metaTextStyle}> <Text numberOfLines={1} style={[metaTextStyle, a.flex_shrink]}>
{articleDomain} {articleDomain}
</Text> </Text>
</View> </View>
@@ -75,7 +76,7 @@ export function StandardSiteMetaRow({
items.push({ items.push({
key: 'author', key: 'author',
node: ( node: (
<Text numberOfLines={1} style={metaTextStyle}> <Text numberOfLines={1} style={[metaTextStyle]}>
<Trans> <Trans>
by{' '} by{' '}
<InlineLinkText <InlineLinkText
@@ -85,7 +86,9 @@ export function StandardSiteMetaRow({
metaTextStyle, metaTextStyle,
preview ? a.pointer_events_none : a.pointer_events_auto, preview ? a.pointer_events_none : a.pointer_events_auto,
]} ]}
onPress={() => { onPress={e => {
e.stopPropagation()
e.preventDefault()
ax.metric('embed:standardSite:authorHandle:press', { ax.metric('embed:standardSite:authorHandle:press', {
handle: authorProfile.handle, handle: authorProfile.handle,
}) })
@@ -356,7 +356,12 @@ export function PublicationCard({
<View style={[a.flex_1, a.gap_2xs]}> <View style={[a.flex_1, a.gap_2xs]}>
<Text <Text
numberOfLines={1} numberOfLines={1}
style={[a.text_md, a.font_semi_bold, t.atoms.text]}> style={[
a.text_md,
a.font_semi_bold,
t.atoms.text,
a.leading_snug,
]}>
{view.source?.title} {view.source?.title}
</Text> </Text>
<StandardSiteMetaRow <StandardSiteMetaRow
@@ -615,6 +620,7 @@ export function PublicationFooter({
style={[ style={[
a.text_sm, a.text_sm,
a.font_medium, a.font_medium,
a.leading_tight,
t.atoms.text, t.atoms.text,
interacted && a.underline, interacted && a.underline,
]}> ]}>