Invite friends QA polish
- Drawer: move the share button inline with the display name (right-aligned) and keep the drawer open when opening the share sheet - Settings: remove the redundant "Find and invite friends" item and rename the existing contacts link to "Find and invite friends" - Invite dialog: add a "Done" button and a full-width header divider using the Dialog.Header renderLeft + edge-to-edge content padding pattern - NUX announcement: wire up the promo illustration as the full-bleed header background with the "New Feature" tag overlaid - Fix "Try it": mount the invite dialog persistently in NuxDialogs so it survives the announcement being dismissed, then open it after the handoff
This commit is contained in:
@@ -3,12 +3,17 @@ import {InviteFriendsDialogInner} from './InviteFriendsDialogInner'
|
||||
|
||||
export function InviteFriendsDialog({
|
||||
control,
|
||||
onClose,
|
||||
}: {
|
||||
control: Dialog.DialogControlProps
|
||||
onClose?: () => void
|
||||
}) {
|
||||
return (
|
||||
<Dialog.Outer control={control} nativeOptions={{preventExpansion: true}}>
|
||||
<Dialog.Handle />
|
||||
<Dialog.Outer
|
||||
control={control}
|
||||
onClose={onClose}
|
||||
nativeOptions={{preventExpansion: true}}>
|
||||
{/* <Dialog.Handle /> */}
|
||||
<InviteFriendsDialogInner control={control} />
|
||||
</Dialog.Outer>
|
||||
)
|
||||
|
||||
@@ -5,6 +5,9 @@ import {type DialogControlProps} from '#/components/Dialog'
|
||||
* Callers may still create a Dialog control and pass it; opening it does
|
||||
* nothing on web.
|
||||
*/
|
||||
export function InviteFriendsDialog(_props: {control: DialogControlProps}) {
|
||||
export function InviteFriendsDialog(_props: {
|
||||
control: DialogControlProps
|
||||
onClose?: () => void
|
||||
}) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import {logger} from '#/logger'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
import {useSession} from '#/state/session'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {Button, ButtonText} from '#/components/Button'
|
||||
import * as Dialog from '#/components/Dialog'
|
||||
import {Divider} from '#/components/Divider'
|
||||
import {Error as ErrorMessage} from '#/components/Error'
|
||||
@@ -120,13 +121,24 @@ export function InviteFriendsDialogInner({
|
||||
return (
|
||||
<Dialog.ScrollableInner
|
||||
label={l`Invite friends`}
|
||||
contentContainerStyle={[a.pt_sm]}
|
||||
contentContainerStyle={[a.pt_0, a.px_0]}
|
||||
header={
|
||||
<Dialog.Header>
|
||||
<Dialog.Header
|
||||
renderLeft={() => (
|
||||
<Button
|
||||
label={l`Done`}
|
||||
onPress={() => control.close()}
|
||||
size="small"
|
||||
color="primary"
|
||||
variant="ghost"
|
||||
style={[a.rounded_full]}>
|
||||
<ButtonText style={[a.text_md]}>{l`Done`}</ButtonText>
|
||||
</Button>
|
||||
)}>
|
||||
<Dialog.HeaderText>{l`Invite Friends`}</Dialog.HeaderText>
|
||||
</Dialog.Header>
|
||||
}>
|
||||
<View style={[a.align_center, a.pt_xl]}>
|
||||
<View style={[a.align_center, a.pt_xl, a.px_xl]}>
|
||||
<ThemePicker value={themeKey} onChange={setThemeKey} />
|
||||
|
||||
<View style={[a.mt_5xl]}>
|
||||
|
||||
Reference in New Issue
Block a user