From 89c9fd3be16ea96182842544d76ce019cb8e1403 Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 30 May 2024 21:32:54 -0700 Subject: [PATCH] Change many border widths from `1` to `hairlineWidth` (#4294) * feed items * update some more * moar * profile card * composer and notifications * settings screen * remove border from first item in feeds * remove border from first item in feeds * more removal of top border * fix flatlist rendering * oops * scroll to top fab * a.border * centeredview/list * placeholder * web sidebar * search posts * feeds list * user lists * list header * account list width 1 * hide top border feedgens * same for lists * fix tab bar web desktop * wait... * show the border on desktop web * fix lists * fix lists * round --- src/alf/atoms.ts | 13 ++--- src/components/AccountList.tsx | 4 +- src/view/com/composer/Composer.tsx | 5 +- src/view/com/composer/Prompt.tsx | 16 +++--- src/view/com/feeds/FeedSourceCard.tsx | 16 ++++-- src/view/com/feeds/ProfileFeedgens.tsx | 4 +- src/view/com/lists/ListCard.tsx | 22 ++++---- src/view/com/lists/MyLists.tsx | 18 ++++--- src/view/com/lists/ProfileLists.tsx | 8 +-- src/view/com/notifications/Feed.tsx | 33 ++++++++---- src/view/com/notifications/FeedItem.tsx | 5 +- src/view/com/pager/PagerWithHeader.tsx | 4 +- src/view/com/pager/TabBar.tsx | 3 +- src/view/com/post-thread/PostThreadItem.tsx | 11 ++-- src/view/com/post/Post.tsx | 3 +- src/view/com/posts/Feed.tsx | 21 +++++--- src/view/com/posts/FeedItem.tsx | 11 ++-- src/view/com/posts/FeedSlice.tsx | 10 +++- src/view/com/profile/ProfileCard.tsx | 3 +- src/view/com/profile/ProfileSubpageHeader.tsx | 28 +++++----- src/view/com/util/LoadingPlaceholder.tsx | 3 +- src/view/com/util/ViewHeader.tsx | 5 +- src/view/com/util/Views.web.tsx | 9 ++-- .../com/util/load-latest/LoadLatestBtn.tsx | 3 +- src/view/com/util/post-embeds/QuoteEmbed.tsx | 5 +- src/view/com/util/post-embeds/index.tsx | 3 +- src/view/screens/Feeds.tsx | 5 +- src/view/screens/Lists.tsx | 31 ++++++----- src/view/screens/Notifications.tsx | 53 ++++++++++--------- src/view/screens/ProfileList.tsx | 5 +- src/view/screens/Settings/index.tsx | 3 +- src/view/shell/bottom-bar/BottomBarStyles.tsx | 3 +- src/view/shell/desktop/RightNav.tsx | 5 +- 33 files changed, 227 insertions(+), 144 deletions(-) diff --git a/src/alf/atoms.ts b/src/alf/atoms.ts index eb130f3a..1ccb0460 100644 --- a/src/alf/atoms.ts +++ b/src/alf/atoms.ts @@ -1,7 +1,8 @@ -import {Platform} from 'react-native' +import {Platform, StyleSheet} from 'react-native' import * as tokens from '#/alf/tokens' import {native, web} from '#/alf/util/platform' +import hairlineWidth = StyleSheet.hairlineWidth export const atoms = { /* @@ -277,19 +278,19 @@ export const atoms = { borderWidth: 0, }, border: { - borderWidth: 1, + borderWidth: hairlineWidth, }, border_t: { - borderTopWidth: 1, + borderTopWidth: hairlineWidth, }, border_b: { - borderBottomWidth: 1, + borderBottomWidth: hairlineWidth, }, border_l: { - borderLeftWidth: 1, + borderLeftWidth: hairlineWidth, }, border_r: { - borderRightWidth: 1, + borderRightWidth: hairlineWidth, }, /* diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx index 7d696801..883c06c1 100644 --- a/src/components/AccountList.tsx +++ b/src/components/AccountList.tsx @@ -37,7 +37,7 @@ export function AccountList({ style={[ a.rounded_md, a.overflow_hidden, - a.border, + {borderWidth: 1}, t.atoms.border_contrast_low, ]}> {accounts.map(account => ( @@ -48,7 +48,7 @@ export function AccountList({ isCurrentAccount={account.did === currentAccount?.did} isPendingAccount={account.did === pendingDid} /> - + ))}