Skip to content

Commit

Permalink
New progress guide - 10 follows (#7128)
Browse files Browse the repository at this point in the history
* new follow-10 progress guide

* find follows dialog

* wip tabs

* flatlist version with search

* hardcode out jake gold

* lazy load followup suggestions

* Update src/components/ProgressGuide/FollowDialog.tsx

Co-authored-by: surfdude29 <[email protected]>

* comment out replacing, enable paging

* rm autofocus

* find shadow profiles in paginated search

* clear search when press tabs

* better tab a11y

* fix label

* adjust scroll indicator insets

* do the same scroll indicator adjustment for searchable people list

* hardcode jake to just be 'tech'

* Retain state on close/reopen

* only change follow btn color when not followed

* add guide to inside dialog

* fix task alignment

* Enable contextual suggestions

* WIP: show multiple suggestions

* Rework so it animates well

* Show more items

* remove card style

* move tabs to own component

* split out header top

* scroll active tab into view

* rm log

* Improve perf a bit

* boost popular interests over alphabetical ones

* scroll active tab into view

* revert back to round buttons

* Fix overrenders of the tab bar items

* Fix unintended animation

* Scroll initial into view if needed

* Unlift state, the dialog thing breaks lifting

* Persist simply

* Fix empty state

* Fix incorrect gate exposure

* Fix another bad useGate

* Nit

---------

Co-authored-by: surfdude29 <[email protected]>
Co-authored-by: Dan Abramov <[email protected]>
  • Loading branch information
3 people authored Dec 17, 2024
1 parent 3261139 commit 0cbb03c
Show file tree
Hide file tree
Showing 17 changed files with 1,039 additions and 47 deletions.
12 changes: 12 additions & 0 deletions src/alf/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ export const atoms = {
border_0: {
borderWidth: 0,
},
border_t_0: {
borderTopWidth: 0,
},
border_b_0: {
borderBottomWidth: 0,
},
border_l_0: {
borderLeftWidth: 0,
},
border_r_0: {
borderRightWidth: 0,
},
border: {
borderWidth: StyleSheet.hairlineWidth,
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeedInterstitials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ export function ProfileGrid({
profile={profile}
moderationOpts={moderationOpts}
logContext="FeedInterstitial"
color="secondary_inverted"
shape="round"
colorInverted
/>
</ProfileCard.Header>
<ProfileCard.Description profile={profile} numberOfLines={2} />
Expand Down
7 changes: 6 additions & 1 deletion src/components/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export type FollowButtonProps = {
moderationOpts: ModerationOpts
logContext: LogEvents['profile:follow']['logContext'] &
LogEvents['profile:unfollow']['logContext']
colorInverted?: boolean
} & Partial<ButtonProps>

export function FollowButton(props: FollowButtonProps) {
Expand All @@ -297,6 +298,8 @@ export function FollowButtonInner({
profile: profileUnshadowed,
moderationOpts,
logContext,
onPress: onPressProp,
colorInverted,
...rest
}: FollowButtonProps) {
const {_} = useLingui()
Expand All @@ -321,6 +324,7 @@ export function FollowButtonInner({
)}`,
),
)
onPressProp?.(e)
} catch (err: any) {
if (err?.name !== 'AbortError') {
Toast.show(_(msg`An issue occurred, please try again.`), 'xmark')
Expand All @@ -341,6 +345,7 @@ export function FollowButtonInner({
)}`,
),
)
onPressProp?.(e)
} catch (err: any) {
if (err?.name !== 'AbortError') {
Toast.show(_(msg`An issue occurred, please try again.`), 'xmark')
Expand Down Expand Up @@ -387,7 +392,7 @@ export function FollowButtonInner({
label={followLabel}
size="small"
variant="solid"
color="primary"
color={colorInverted ? 'secondary_inverted' : 'primary'}
{...rest}
onPress={onPressFollow}>
<ButtonIcon icon={Plus} position={isRound ? undefined : 'left'} />
Expand Down
Loading

0 comments on commit 0cbb03c

Please sign in to comment.