Avi follow experiment tweaks (#4341)

* Move avi button to visually align content

* Fix wrong prop warning

* Remove avi follow from post thread
zio/stable
dan 2024-06-04 00:38:12 +01:00 committed by GitHub
parent 8c596b61c0
commit 3b55f61d5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 14 deletions

View File

@ -40,7 +40,6 @@ import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe'
import {PostAlerts} from '../../../components/moderation/PostAlerts' import {PostAlerts} from '../../../components/moderation/PostAlerts'
import {PostHider} from '../../../components/moderation/PostHider' import {PostHider} from '../../../components/moderation/PostHider'
import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers' import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers'
import {AviFollowButton} from '../posts/AviFollowButton'
import {WhoCanReply} from '../threadgate/WhoCanReply' import {WhoCanReply} from '../threadgate/WhoCanReply'
import {ErrorMessage} from '../util/error/ErrorMessage' import {ErrorMessage} from '../util/error/ErrorMessage'
import {Link, TextLink} from '../util/Link' import {Link, TextLink} from '../util/Link'
@ -472,16 +471,12 @@ let PostThreadItemLoaded = ({
{/* If we are in threaded mode, the avatar is rendered in PostMeta */} {/* If we are in threaded mode, the avatar is rendered in PostMeta */}
{!isThreadedChild && ( {!isThreadedChild && (
<View style={styles.layoutAvi}> <View style={styles.layoutAvi}>
<AviFollowButton author={post.author} moderation={moderation}> <PreviewableUserAvatar
<PreviewableUserAvatar size={38}
size={38} profile={post.author}
profile={post.author} moderation={moderation.ui('avatar')}
moderation={moderation.ui('avatar')} type={post.author.associated?.labeler ? 'labeler' : 'user'}
type={ />
post.author.associated?.labeler ? 'labeler' : 'user'
}
/>
</AviFollowButton>
{showChildReplyLine && ( {showChildReplyLine && (
<View <View

View File

@ -97,8 +97,8 @@ export function AviFollowButton({
}), }),
a.absolute, a.absolute,
{ {
bottom: 0, bottom: -1,
right: 0, right: -1,
borderWidth: 1, borderWidth: 1,
borderColor: t.atoms.bg.backgroundColor, borderColor: t.atoms.bg.backgroundColor,
}, },

View File

@ -1 +1,5 @@
export {Fragment as AviFollowButton} from 'react' import React from 'react'
export function AviFollowButton({children}: {children: React.ReactNode}) {
return children
}