Remove Live Now new-feature nudge (#11604)
This commit is contained in:
@@ -13,7 +13,6 @@ export enum Nux {
|
|||||||
FindContactsAnnouncement = 'FindContactsAnnouncement',
|
FindContactsAnnouncement = 'FindContactsAnnouncement',
|
||||||
FindContactsDismissibleBanner = 'FindContactsDismissibleBanner',
|
FindContactsDismissibleBanner = 'FindContactsDismissibleBanner',
|
||||||
LiveNowBetaDialog = 'LiveNowBetaDialog',
|
LiveNowBetaDialog = 'LiveNowBetaDialog',
|
||||||
LiveNowBetaNudge = 'LiveNowBetaNudge',
|
|
||||||
DraftsAnnouncement = 'DraftsAnnouncement',
|
DraftsAnnouncement = 'DraftsAnnouncement',
|
||||||
GroupChatsAnnouncement = 'GroupChatsAnnouncement',
|
GroupChatsAnnouncement = 'GroupChatsAnnouncement',
|
||||||
InviteFriendsAnnouncement = 'InviteFriendsAnnouncement',
|
InviteFriendsAnnouncement = 'InviteFriendsAnnouncement',
|
||||||
@@ -71,10 +70,6 @@ export type AppNux = BaseNux<
|
|||||||
id: Nux.LiveNowBetaDialog
|
id: Nux.LiveNowBetaDialog
|
||||||
data: undefined
|
data: undefined
|
||||||
}
|
}
|
||||||
| {
|
|
||||||
id: Nux.LiveNowBetaNudge
|
|
||||||
data: undefined
|
|
||||||
}
|
|
||||||
| {
|
| {
|
||||||
id: Nux.DraftsAnnouncement
|
id: Nux.DraftsAnnouncement
|
||||||
data: undefined
|
data: undefined
|
||||||
@@ -101,7 +96,6 @@ export const NuxSchemas: Record<Nux, zod.ZodObject<any> | undefined> = {
|
|||||||
[Nux.FindContactsAnnouncement]: undefined,
|
[Nux.FindContactsAnnouncement]: undefined,
|
||||||
[Nux.FindContactsDismissibleBanner]: undefined,
|
[Nux.FindContactsDismissibleBanner]: undefined,
|
||||||
[Nux.LiveNowBetaDialog]: undefined,
|
[Nux.LiveNowBetaDialog]: undefined,
|
||||||
[Nux.LiveNowBetaNudge]: undefined,
|
|
||||||
[Nux.DraftsAnnouncement]: undefined,
|
[Nux.DraftsAnnouncement]: undefined,
|
||||||
[Nux.GroupChatsAnnouncement]: undefined,
|
[Nux.GroupChatsAnnouncement]: undefined,
|
||||||
[Nux.InviteFriendsAnnouncement]: undefined,
|
[Nux.InviteFriendsAnnouncement]: undefined,
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {type NavigationProp} from '#/lib/routes/types'
|
|||||||
import {shareText, shareUrl} from '#/lib/sharing'
|
import {shareText, shareUrl} from '#/lib/sharing'
|
||||||
import {toShareUrl} from '#/lib/strings/url-helpers'
|
import {toShareUrl} from '#/lib/strings/url-helpers'
|
||||||
import {type Shadow} from '#/state/cache/types'
|
import {type Shadow} from '#/state/cache/types'
|
||||||
import {Nux, useNux, useSaveNux} from '#/state/queries/nuxs'
|
|
||||||
import {
|
import {
|
||||||
RQKEY as profileQueryKey,
|
RQKEY as profileQueryKey,
|
||||||
useProfileBlockMutationQueue,
|
useProfileBlockMutationQueue,
|
||||||
@@ -18,7 +17,6 @@ import {
|
|||||||
} from '#/state/queries/profile'
|
} from '#/state/queries/profile'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {EventStopper} from '#/view/com/util/EventStopper'
|
import {EventStopper} from '#/view/com/util/EventStopper'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
|
||||||
import {Button, ButtonIcon} from '#/components/Button'
|
import {Button, ButtonIcon} from '#/components/Button'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {UserAddRemoveListsDialog} from '#/components/dialogs/lists/UserAddRemoveListsDialog'
|
import {UserAddRemoveListsDialog} from '#/components/dialogs/lists/UserAddRemoveListsDialog'
|
||||||
@@ -63,8 +61,6 @@ import {useActorStatus, useLiveNowConfig} from '#/features/liveNow'
|
|||||||
import {EditLiveDialog} from '#/features/liveNow/components/EditLiveDialog'
|
import {EditLiveDialog} from '#/features/liveNow/components/EditLiveDialog'
|
||||||
import {GoLiveDialog} from '#/features/liveNow/components/GoLiveDialog'
|
import {GoLiveDialog} from '#/features/liveNow/components/GoLiveDialog'
|
||||||
import {GoLiveDisabledDialog} from '#/features/liveNow/components/GoLiveDisabledDialog'
|
import {GoLiveDisabledDialog} from '#/features/liveNow/components/GoLiveDisabledDialog'
|
||||||
import {Dot} from '#/features/nuxs/components/Dot'
|
|
||||||
import {Gradient} from '#/features/nuxs/components/Gradient'
|
|
||||||
import {type app} from '#/lexicons'
|
import {type app} from '#/lexicons'
|
||||||
import {useDevMode} from '#/storage/hooks/dev-mode'
|
import {useDevMode} from '#/storage/hooks/dev-mode'
|
||||||
|
|
||||||
@@ -73,7 +69,6 @@ let ProfileMenu = ({
|
|||||||
}: {
|
}: {
|
||||||
profile: Shadow<app.bsky.actor.defs.ProfileViewDetailed>
|
profile: Shadow<app.bsky.actor.defs.ProfileViewDetailed>
|
||||||
}): React.ReactNode => {
|
}): React.ReactNode => {
|
||||||
const t = useTheme()
|
|
||||||
const ax = useAnalytics()
|
const ax = useAnalytics()
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
const {currentAccount, hasSession} = useSession()
|
const {currentAccount, hasSession} = useSession()
|
||||||
@@ -89,13 +84,6 @@ let ProfileMenu = ({
|
|||||||
const verification = useFullVerificationState({profile})
|
const verification = useFullVerificationState({profile})
|
||||||
const {canGoLive} = useLiveNowConfig()
|
const {canGoLive} = useLiveNowConfig()
|
||||||
const status = useActorStatus(profile)
|
const status = useActorStatus(profile)
|
||||||
const statusNudge = useNux(Nux.LiveNowBetaNudge)
|
|
||||||
const statusNudgeActive =
|
|
||||||
isSelf &&
|
|
||||||
canGoLive &&
|
|
||||||
statusNudge.status === 'ready' &&
|
|
||||||
!statusNudge.nux?.completed
|
|
||||||
const {mutate: saveNux} = useSaveNux()
|
|
||||||
|
|
||||||
const [queueMute, queueUnmute] = useProfileMuteMutationQueue(profile)
|
const [queueMute, queueUnmute] = useProfileMuteMutationQueue(profile)
|
||||||
const [queueMuteReposts, queueUnmuteReposts] =
|
const [queueMuteReposts, queueUnmuteReposts] =
|
||||||
@@ -292,24 +280,20 @@ let ProfileMenu = ({
|
|||||||
<Menu.Trigger label={l`More options`}>
|
<Menu.Trigger label={l`More options`}>
|
||||||
{({props}) => {
|
{({props}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<Button
|
||||||
<Button
|
{...props}
|
||||||
{...props}
|
testID="profileHeaderDropdownBtn"
|
||||||
testID="profileHeaderDropdownBtn"
|
label={l`More options`}
|
||||||
label={l`More options`}
|
// hitSlop reaches outside parent views on iOS, so the
|
||||||
// hitSlop reaches outside parent views on iOS, so the
|
// left inset must stay within half of the 4pt row gap or
|
||||||
// left inset must stay within half of the 4pt row gap or
|
// it steals taps from the adjacent header button
|
||||||
// it steals taps from the adjacent header button
|
hitSlop={{top: 6, bottom: 6, left: 2, right: 12}}
|
||||||
hitSlop={{top: 6, bottom: 6, left: 2, right: 12}}
|
variant="solid"
|
||||||
variant="solid"
|
color="secondary"
|
||||||
color="secondary"
|
size="small"
|
||||||
size="small"
|
shape="round">
|
||||||
shape="round">
|
<ButtonIcon icon={EllipsisIcon} size="sm" />
|
||||||
{statusNudgeActive && <Gradient style={[a.rounded_full]} />}
|
</Button>
|
||||||
<ButtonIcon icon={EllipsisIcon} size="sm" />
|
|
||||||
</Button>
|
|
||||||
{statusNudgeActive && <Dot top={1} right={1} />}
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</Menu.Trigger>
|
</Menu.Trigger>
|
||||||
@@ -413,13 +397,7 @@ let ProfileMenu = ({
|
|||||||
} else {
|
} else {
|
||||||
goLiveDialogControl.open()
|
goLiveDialogControl.open()
|
||||||
}
|
}
|
||||||
saveNux({
|
|
||||||
id: Nux.LiveNowBetaNudge,
|
|
||||||
data: undefined,
|
|
||||||
completed: true,
|
|
||||||
})
|
|
||||||
}}>
|
}}>
|
||||||
{statusNudgeActive && <Gradient />}
|
|
||||||
<Menu.ItemText>
|
<Menu.ItemText>
|
||||||
{status.isDisabled ? (
|
{status.isDisabled ? (
|
||||||
<Trans>Go live (disabled)</Trans>
|
<Trans>Go live (disabled)</Trans>
|
||||||
@@ -429,26 +407,7 @@ let ProfileMenu = ({
|
|||||||
<Trans>Go live</Trans>
|
<Trans>Go live</Trans>
|
||||||
)}
|
)}
|
||||||
</Menu.ItemText>
|
</Menu.ItemText>
|
||||||
{statusNudgeActive && (
|
<Menu.ItemIcon icon={LiveIcon} />
|
||||||
<Menu.ItemText
|
|
||||||
style={[
|
|
||||||
a.flex_0,
|
|
||||||
{
|
|
||||||
color: t.palette.primary_500,
|
|
||||||
right: IS_WEB ? -8 : -4,
|
|
||||||
},
|
|
||||||
]}>
|
|
||||||
<Trans>New</Trans>
|
|
||||||
</Menu.ItemText>
|
|
||||||
)}
|
|
||||||
<Menu.ItemIcon
|
|
||||||
icon={LiveIcon}
|
|
||||||
fill={
|
|
||||||
statusNudgeActive
|
|
||||||
? () => t.palette.primary_500
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
)}
|
)}
|
||||||
{verification.viewer.role === 'verifier' &&
|
{verification.viewer.role === 'verifier' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user