More visual separation for sidebar sections

This commit is contained in:
Alex Benzer
2025-12-27 10:47:08 -08:00
committed by Samuel Newman
parent 593f5c4e8e
commit 7ef3657ffc
6 changed files with 51 additions and 41 deletions
+8 -1
View File
@@ -933,8 +933,15 @@ export function SuggestedFeeds() {
export function ProgressGuide() { export function ProgressGuide() {
const t = useTheme() const t = useTheme()
const {gtMobile} = useBreakpoints()
return ( return (
<View style={[t.atoms.border_contrast_low, a.px_lg, a.py_lg, a.pb_lg]}> <View
style={[
t.atoms.border_contrast_low,
a.px_lg,
a.py_lg,
!gtMobile && {marginTop: 4},
]}>
<ProgressGuideList /> <ProgressGuideList />
</View> </View>
) )
+14 -10
View File
@@ -23,16 +23,19 @@ export function ProgressGuideList({style}: {style?: StyleProp<ViewStyle>}) {
if (guide) { if (guide) {
return ( return (
<View style={[a.flex_col, a.gap_md, style]}> <View
style={[
a.flex_col,
a.gap_md,
a.rounded_md,
t.atoms.bg_contrast_25,
style,
a.p_md,
]}>
<View style={[a.flex_row, a.align_center, a.justify_between]}> <View style={[a.flex_row, a.align_center, a.justify_between]}>
<Text <Text
style={[ style={[t.atoms.text_contrast_medium, a.font_semi_bold, a.text_sm]}>
t.atoms.text_contrast_medium, <Trans>Getting Started</Trans>
a.font_semi_bold,
a.text_sm,
{textTransform: 'uppercase'},
]}>
<Trans>Getting started</Trans>
</Text> </Text>
<Button <Button
variant="ghost" variant="ghost"
@@ -40,8 +43,9 @@ export function ProgressGuideList({style}: {style?: StyleProp<ViewStyle>}) {
color="secondary" color="secondary"
shape="round" shape="round"
label={_(msg`Dismiss getting started guide`)} label={_(msg`Dismiss getting started guide`)}
onPress={endProgressGuide}> onPress={endProgressGuide}
<ButtonIcon icon={Times} size="sm" /> style={[a.bg_transparent]}>
<ButtonIcon icon={Times} size="xs" />
</Button> </Button>
</View> </View>
{guide.guide === 'follow-10' && ( {guide.guide === 'follow-10' && (
+2 -2
View File
@@ -31,11 +31,11 @@ export function ProgressGuideTask({
size={20} size={20}
thickness={3} thickness={3}
borderWidth={0} borderWidth={0}
unfilledColor={t.palette.contrast_50} unfilledColor={t.palette.contrast_100}
/> />
)} )}
<View style={[a.flex_col, a.gap_2xs, subtitle && {marginTop: -2}]}> <View style={[a.flex_col, a.gap_xs, subtitle && {marginTop: -2}]}>
<Text <Text
style={[ style={[
a.text_sm, a.text_sm,
+10 -9
View File
@@ -20,8 +20,12 @@ export function TrendingTopic({
topic: raw, topic: raw,
size, size,
style, style,
}: {topic: TrendingTopic; size?: 'large' | 'small'} & ViewStyleProp) { hovered,
const t = useTheme() }: {
topic: TrendingTopic
size?: 'large' | 'small'
hovered?: boolean
} & ViewStyleProp) {
const topic = useTopic(raw) const topic = useTopic(raw)
const isSmall = size === 'small' const isSmall = size === 'small'
@@ -33,18 +37,14 @@ export function TrendingTopic({
style={[ style={[
a.flex_row, a.flex_row,
a.align_center, a.align_center,
a.rounded_full,
a.border,
t.atoms.border_contrast_medium,
t.atoms.bg,
isSmall isSmall
? [ ? [
{ {
paddingVertical: 5, paddingVertical: 2,
paddingHorizontal: 10, paddingHorizontal: 4,
}, },
] ]
: [a.py_sm, a.px_md], : [a.py_xs, a.px_sm],
hasIcon && {gap: 6}, hasIcon && {gap: 6},
style, style,
]}> ]}>
@@ -93,6 +93,7 @@ export function TrendingTopic({
a.font_semi_bold, a.font_semi_bold,
a.leading_tight, a.leading_tight,
isSmall ? [a.text_sm] : [a.text_md, {paddingBottom: 1}], isSmall ? [a.text_sm] : [a.text_md, {paddingBottom: 1}],
hovered && {textDecorationLine: 'underline'},
]} ]}
numberOfLines={1}> numberOfLines={1}>
{topic.displayName} {topic.displayName}
+1 -3
View File
@@ -18,7 +18,6 @@ import {
web, web,
} from '#/alf' } from '#/alf'
import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {AppLanguageDropdown} from '#/components/AppLanguageDropdown'
import {Divider} from '#/components/Divider'
import {CENTER_COLUMN_OFFSET} from '#/components/Layout' import {CENTER_COLUMN_OFFSET} from '#/components/Layout'
import {InlineLinkText} from '#/components/Link' import {InlineLinkText} from '#/components/Link'
import {ProgressGuideList} from '#/components/ProgressGuide/List' import {ProgressGuideList} from '#/components/ProgressGuide/List'
@@ -86,9 +85,8 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
{hasSession && ( {hasSession && (
<> <>
<ProgressGuideList />
<DesktopFeeds /> <DesktopFeeds />
<Divider /> <ProgressGuideList />
</> </>
)} )}
@@ -12,9 +12,7 @@ import {useTrendingTopics} from '#/state/queries/trending/useTrendingTopics'
import {useTrendingConfig} from '#/state/service-config' import {useTrendingConfig} from '#/state/service-config'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {Button, ButtonIcon} from '#/components/Button' import {Button, ButtonIcon} from '#/components/Button'
import {Divider} from '#/components/Divider'
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
import {Trending2_Stroke2_Corner2_Rounded as Graph} from '#/components/icons/Trending'
import * as Prompt from '#/components/Prompt' import * as Prompt from '#/components/Prompt'
import { import {
TrendingTopic, TrendingTopic,
@@ -46,9 +44,15 @@ function Inner() {
return error || noTopics ? null : ( return error || noTopics ? null : (
<> <>
<View style={[a.gap_sm, {paddingBottom: 2}]}> <View
style={[
a.gap_sm,
a.py_md,
a.px_md,
a.rounded_md,
t.atoms.bg_contrast_25,
]}>
<View style={[a.flex_row, a.align_center, a.gap_xs]}> <View style={[a.flex_row, a.align_center, a.gap_xs]}>
<Graph size="sm" />
<Text <Text
style={[ style={[
a.flex_1, a.flex_1,
@@ -59,17 +63,19 @@ function Inner() {
<Trans>Trending</Trans> <Trans>Trending</Trans>
</Text> </Text>
<Button <Button
label={_(msg`Hide trending topics`)}
size="tiny"
variant="ghost" variant="ghost"
size="tiny"
color="secondary" color="secondary"
shape="round" shape="round"
onPress={() => trendingPrompt.open()}> label={_(msg`Hide trending topics`)}
<ButtonIcon icon={X} size="sm" /> onPress={() => trendingPrompt.open()}
style={[a.bg_transparent]}>
<ButtonIcon icon={X} size="xs" />
</Button> </Button>
</View> </View>
<View style={[a.flex_row, a.flex_wrap, {gap: '6px 4px'}]}> <View
style={[a.flex_row, a.flex_wrap, {gap: '6px 4px', marginLeft: -4}]}>
{isLoading ? ( {isLoading ? (
Array(TRENDING_LIMIT) Array(TRENDING_LIMIT)
.fill(0) .fill(0)
@@ -90,12 +96,7 @@ function Inner() {
<TrendingTopic <TrendingTopic
size="small" size="small"
topic={topic} topic={topic}
style={[ hovered={hovered}
hovered && [
t.atoms.border_contrast_high,
t.atoms.bg_contrast_25,
],
]}
/> />
)} )}
</TrendingTopicLink> </TrendingTopicLink>
@@ -111,7 +112,6 @@ function Inner() {
confirmButtonCta={_(msg`Hide`)} confirmButtonCta={_(msg`Hide`)}
onConfirm={onConfirmHide} onConfirm={onConfirmHide}
/> />
<Divider />
</> </>
) )
} }