Increase chat bubble max width to 85% (was 80%) (#10930)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -15,7 +15,11 @@ import {EmojiSmile_Stroke2_Corner0_Rounded as EmojiSmileIcon} from '#/components
|
||||
import * as Toast from '#/components/Toast'
|
||||
import type * as bsky from '#/types/bsky'
|
||||
import {EmojiReactionPicker} from './EmojiReactionPicker'
|
||||
import {canReact, hasReachedReactionLimit} from './util'
|
||||
import {
|
||||
canReact,
|
||||
hasReachedReactionLimit,
|
||||
MESSAGE_BUBBLE_MAX_WIDTH,
|
||||
} from './util'
|
||||
|
||||
export function ActionsWrapper({
|
||||
message,
|
||||
@@ -163,7 +167,10 @@ export function ActionsWrapper({
|
||||
</MessageContextMenu>
|
||||
</View>
|
||||
<View
|
||||
style={[{maxWidth: '80%'}, isFromSelf ? a.align_end : a.align_start]}>
|
||||
style={[
|
||||
{maxWidth: MESSAGE_BUBBLE_MAX_WIDTH},
|
||||
isFromSelf ? a.align_end : a.align_start,
|
||||
]}>
|
||||
{children}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -62,6 +62,7 @@ import {groupReactions} from './ReactionsDialog'
|
||||
import {
|
||||
CLUSTERED_MESSAGE_THRESHOLD_MS,
|
||||
filterBlockedReactions,
|
||||
MESSAGE_BUBBLE_MAX_WIDTH,
|
||||
MESSAGE_GAP_THRESHOLD_MS,
|
||||
} from './util'
|
||||
|
||||
@@ -661,7 +662,7 @@ function BlockedPlaceholder({
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
style={[{maxWidth: '80%'}, a.self_start]}
|
||||
style={[{maxWidth: MESSAGE_BUBBLE_MAX_WIDTH}, a.self_start]}
|
||||
label={
|
||||
profile.viewer?.blocking
|
||||
? l`This message is hidden because you are blocking this user.`
|
||||
|
||||
@@ -15,6 +15,7 @@ import Animated, {
|
||||
import {useHaptics} from '#/lib/haptics'
|
||||
import {atoms as a, tokens, useTheme} from '#/alf'
|
||||
import {ArrowCornerDownRight_Stroke2_Corner3_Rounded as ReplyIcon} from '#/components/icons/ArrowCornerDownRight'
|
||||
import {MESSAGE_BUBBLE_MAX_WIDTH} from './util'
|
||||
|
||||
// Distance the bubble must travel before releasing fires a reply.
|
||||
const ACTIVATION_THRESHOLD = 56
|
||||
@@ -184,7 +185,7 @@ export function SwipeToReply({
|
||||
leaving the gutter free for the back/scroll gestures. */}
|
||||
<Animated.View
|
||||
style={[
|
||||
{maxWidth: '80%'},
|
||||
{maxWidth: MESSAGE_BUBBLE_MAX_WIDTH},
|
||||
isFromSelf ? a.self_end : a.self_start,
|
||||
contentStyle,
|
||||
]}>
|
||||
|
||||
@@ -11,12 +11,18 @@ import {isBlockedOrBlocking} from '#/lib/moderation/blocked-and-muted'
|
||||
import {logger} from '#/logger'
|
||||
import {type Shadow} from '#/state/cache/profile-shadow'
|
||||
import {type ConvoState, ConvoStatus} from '#/state/messages/convo/types'
|
||||
import {platform} from '#/alf'
|
||||
import {type ReportSubject} from '#/components/moderation/ReportDialog/types'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
export const MESSAGE_GAP_THRESHOLD_MS = 60 * 60 * 1000
|
||||
export const CLUSTERED_MESSAGE_THRESHOLD_MS = 5 * 60 * 1000
|
||||
|
||||
export const MESSAGE_BUBBLE_MAX_WIDTH = platform({
|
||||
web: '80%' as const,
|
||||
default: '85%' as const,
|
||||
})
|
||||
|
||||
export function canBeMessaged(profile: bsky.profile.AnyProfileView) {
|
||||
switch (profile.associated?.chat?.allowIncoming) {
|
||||
case 'none':
|
||||
|
||||
Reference in New Issue
Block a user