Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
878b9cf
simplify-ui: git/ — remove redundant wrappers, dead styles/comments, …
chrisnojima May 30, 2026
166d34b
simplify-ui: devices/ — deduplicate icon logic, extract constants, re…
chrisnojima May 30, 2026
8607d51
simplify-ui: wallets/ — rename Container, extract shared styles, remo…
chrisnojima May 30, 2026
da355be
simplify-ui: tracker/ — fix hover-opacity typo, dedup utilities, rena…
chrisnojima May 30, 2026
e032970
simplify-ui: settings/ — remove redundant wrappers, move styles to pr…
chrisnojima May 30, 2026
7155cfc
simplify-ui: crypto/ — inline IIFEs, merge imports, clean up style pr…
chrisnojima May 30, 2026
63aa6e2
simplify-ui: teams/ — merge styles, fix functions-as-values, extract …
chrisnojima May 30, 2026
3028767
simplify-ui: signup/ — extract shared input width, fix prop shorthand…
chrisnojima May 30, 2026
a94d80f
simplify-ui: people/ — remove identity maps, dead code, inline wrappe…
chrisnojima May 30, 2026
c25ad52
simplify-ui: profile/ — remove dead code, dedup styles, replace Kb sh…
chrisnojima May 30, 2026
89291de
address PR feedback: safe nav in async callback, fix avatar overlay p…
chrisnojima May 30, 2026
6ab5047
simplify-ui: full codebase pass — rename Containers, remove dead code…
chrisnojima May 30, 2026
090da4f
fix back button hover area: remove inline-block and size(14) from ico…
chrisnojima May 30, 2026
16cc93f
fix Checkbox centering: add alignSelf=flex-start to ClickableBox3
chrisnojima May 30, 2026
f2fbba0
WIP
chrisnojima May 30, 2026
4a05da6
fix iOS e2e: restore testID on mobile crypto nav rows
chrisnojima May 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions shared/chat/audio/audio-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const AudioPlayer = (props: Props) => {
color={url ? Kb.Styles.globalColors.blue : Kb.Styles.globalColors.grey}
/>
</Kb.ClickableBox3>
<Kb.Box2 direction="vertical" style={styles.visContainer} gap="xxtiny" fullHeight={true} justifyContent="flex-end">
<Kb.Box2 direction="vertical" alignItems="flex-start" style={styles.visContainer} gap="xxtiny" fullHeight={true} justifyContent="flex-end">
<AudioVis height={big ? 32 : 18} amps={visAmps} maxWidth={maxWidth} playedRatio={playedRatio} />
<Kb.Text type="BodyTiny">{formatAudioRecordDuration(timeLeft)}</Kb.Text>
</Kb.Box2>
Expand All @@ -123,7 +123,6 @@ const styles = Kb.Styles.styleSheetCreate(() => ({
backgroundColor: Kb.Styles.globalColors.white,
},
visContainer: {
alignItems: 'flex-start',
minWidth: 40,
},
}))
Expand Down
6 changes: 2 additions & 4 deletions shared/chat/avatars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ const Avatars = function Avatars(p: Props) {
if (!participantTwo) {
return (
<Kb.Box2 direction="vertical" relative={true} style={containerStyle}>
<Kb.Box2 direction="vertical" relative={true}>
<Kb.Avatar username={participantOne} size={singleSize} style={{opacity}} />
<OverlayIcon isHovered={isHovered} isSelected={isSelected} isMuted={isMuted} isLocked={isLocked} />
</Kb.Box2>
<Kb.Avatar username={participantOne} size={singleSize} style={{opacity}} />
<OverlayIcon isHovered={isHovered} isSelected={isSelected} isMuted={isMuted} isLocked={isLocked} />
</Kb.Box2>
)
}
Expand Down
4 changes: 2 additions & 2 deletions shared/chat/blocking/block-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const ReportOptions = (props: ReportOptionsProps) => {
)
}

const Container = function BlockModal(ownProps: OwnProps) {
const BlockModal = (ownProps: OwnProps) => {
const {context, conversationIDKey, blockUserByDefault = false, filterUserByDefault = false} = ownProps
const {flagUserByDefault = false, reportsUserByDefault = false, team: teamname} = ownProps
let {username: adderUsername, others} = ownProps
Expand Down Expand Up @@ -496,7 +496,7 @@ const Container = function BlockModal(ownProps: OwnProps) {
)
}

export default Container
export default BlockModal

const getListHeightStyle = (numOthers: number, expanded: boolean) => ({
height:
Expand Down
3 changes: 1 addition & 2 deletions shared/chat/blocking/invitation-to-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const BlockButtons = () => {
</Kb.Box2>
</Kb.Box2>
) : (
<Kb.Box2 direction="horizontal" gap="xsmall" style={styles.container} centerChildren={false}>
<Kb.Box2 direction="horizontal" gap="xsmall" alignItems="center" style={styles.container}>
<Kb.Text type="BodySmall">
{team ? `${adder} added you to this team.` : `You don't follow ${adder}.`}
</Kb.Text>
Expand All @@ -166,7 +166,6 @@ const styles = Kb.Styles.styleSheetCreate(
}),
buttonContainer: {maxWidth: 322},
container: {
alignItems: 'center',
alignSelf: 'flex-start',
marginLeft: 57,
},
Expand Down
6 changes: 1 addition & 5 deletions shared/chat/conversation/attachment-get-titles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,4 @@ const styles = Kb.Styles.styleSheetCreate(
}) as const
)

const Container = (ownProps: OwnProps) => {
return <ContainerInner {...ownProps} />
}

export default Container
export default ContainerInner
9 changes: 2 additions & 7 deletions shared/chat/conversation/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import {useConversationThreadSelector} from './thread-context'
const ConversationError = () => {
const text = useConversationThreadSelector(s => s.meta.snippet) ?? ''
return (
<Kb.Box2 direction="vertical" fullWidth={true} style={styles.container} gap="small">
<Kb.Box2 direction="vertical" fullWidth={true} padding="medium" gap="small">
<Kb.Text type="Header">There was an error loading this conversation.</Kb.Text>
<Kb.Text type="Body">
The error is:
</Kb.Text>
<Kb.Text type="Body">The error is:</Kb.Text>
<Kb.Box2 direction="horizontal" fullWidth={true}>
<Kb.CopyableText style={styles.errorText} value={text} />
</Kb.Box2>
Expand All @@ -19,9 +17,6 @@ const ConversationError = () => {
const styles = Kb.Styles.styleSheetCreate(
() =>
({
container: {
padding: Kb.Styles.globalMargins.medium,
},
errorText: {flexGrow: 1},
}) as const
)
Expand Down
6 changes: 1 addition & 5 deletions shared/chat/conversation/fwd-msg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,4 @@ const styles = Kb.Styles.styleSheetCreate(
}) as const
)

const TeamPicker = (props: Props) => {
return <TeamPickerInner {...props} />
}

export default TeamPicker
export default TeamPickerInner
13 changes: 4 additions & 9 deletions shared/chat/conversation/info-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,17 @@ type Props = {
tab?: 'settings' | 'members' | 'attachments' | 'bots'
}

const InfoPanelConnector = (ownProps: Props) => {
const conversationIDKey = ownProps.conversationIDKey ?? Chat.noConversationIDKey
return <InfoPanelConnectorInner {...ownProps} conversationIDKey={conversationIDKey} />
}

const InfoPanelConnectorInner = (ownProps: Props & {conversationIDKey: T.Chat.ConversationIDKey}) => {
const {conversationIDKey} = ownProps
const InfoPanelConnector = ({conversationIDKey: _conversationIDKey, tab}: Props) => {
const conversationIDKey = _conversationIDKey ?? Chat.noConversationIDKey
const meta = useConversationMeta(conversationIDKey)
const shouldNavigateOut = meta.conversationIDKey === Chat.noConversationIDKey
const isPreview = meta.membershipType === 'youArePreviewing'
const channelname = meta.channelname
const teamname = meta.teamname
const {role: yourRole} = useChatTeam(meta.teamID, teamname)

const [uncontrolledSelectedTab, onSelectTab] = React.useState<Panel>(() => ownProps.tab ?? 'members')
const selectedTab = ownProps.tab ?? uncontrolledSelectedTab
const [uncontrolledSelectedTab, onSelectTab] = React.useState<Panel>(() => tab ?? 'members')
const selectedTab = tab ?? uncontrolledSelectedTab

const hideInfoPanel = React.useEffectEvent(() => {
showConversationInfoPanel(conversationIDKey, false, undefined)
Expand Down
3 changes: 1 addition & 2 deletions shared/chat/conversation/list-area/jump-to-recent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Props = {

const JumpToRecent = (props: Props) => {
return (
<Kb.Box2 direction="vertical" style={styles.outerContainer}>
<Kb.Box2 direction="vertical" alignItems="center" style={styles.outerContainer}>
<Kb.Button label="Jump to recent messages" onClick={props.onClick} small={true}>
<Kb.Icon
color={Kb.Styles.globalColors.whiteOrWhite}
Expand All @@ -26,7 +26,6 @@ const styles = Kb.Styles.styleSheetCreate(
arrowText: {paddingRight: Kb.Styles.globalMargins.tiny},
outerContainer: Kb.Styles.platformStyles({
common: {
alignItems: 'center',
bottom: 0,
...Kb.Styles.paddingV(Kb.Styles.globalMargins.small),
position: 'absolute',
Expand Down
8 changes: 2 additions & 6 deletions shared/chat/conversation/messages/text/reply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ function ReplyStructure(p: RS) {

return (
<Kb.ClickableBox3 direction="horizontal" gap="tiny" fullWidth={true} style={styles.replyContainer} className={Kb.Styles.classNames('ReplyBox')} onClick={onClick}>
<Kb.Box2 direction="horizontal" style={styles.quoteContainer} />
<Kb.Box2 direction="horizontal" alignSelf="stretch" style={styles.quoteContainer} />
<Kb.Box2 direction="vertical" gap="xtiny" flex={1}>
<Kb.Box2 direction="horizontal" fullWidth={true}>
<AvatarHolder />
</Kb.Box2>
<Kb.Box2 direction="horizontal" fullWidth={true} gap="tiny">
{showImage && <ReplyImage />}
<Kb.Box2 direction="horizontal" flex={1} style={styles.replyTextContainer}>
<Kb.Box2 direction="horizontal" flex={1} alignSelf="flex-start">
{isDeleted ? (
<Kb.Text type="BodyTiny" style={styles.replyEdited} virtualText={true}>
The original message was deleted.
Expand Down Expand Up @@ -128,7 +128,6 @@ const styles = Kb.Styles.styleSheetCreate(
() =>
({
quoteContainer: {
alignSelf: 'stretch',
backgroundColor: Kb.Styles.globalColors.grey,
paddingLeft: Kb.Styles.globalMargins.xtiny,
},
Expand All @@ -137,9 +136,6 @@ const styles = Kb.Styles.styleSheetCreate(
paddingTop: Kb.Styles.globalMargins.xtiny,
},
replyEdited: {color: Kb.Styles.globalColors.black_35},
replyTextContainer: {
alignSelf: 'flex-start',
},
replyUsername: {alignSelf: 'center'},
replyUsernameHighlighted: {color: Kb.Styles.globalColors.blackOrBlack},
textHighlighted: {color: Kb.Styles.globalColors.black_50OrBlack_50},
Expand Down
12 changes: 1 addition & 11 deletions shared/chat/conversation/no-conversation.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import * as Kb from '@/common-adapters'

const NoConversation = () => (
<Kb.Box2 direction="vertical" gap="xsmall" centerChildren={true} flex={1} style={styles.noConvoText}>
<Kb.Box2 direction="vertical" gap="xsmall" centerChildren={true} flex={1} alignSelf="center">
<Kb.ImageIcon type="icon-fancy-encrypted-computer-desktop-150-72" />
<Kb.Text type="BodySmall">All conversations are end-to-end encrypted.</Kb.Text>
</Kb.Box2>
)

const styles = Kb.Styles.styleSheetCreate(
() =>
({
noConvoText: {
alignSelf: 'center',
justifyContent: 'center',
},
}) as const
)

export default NoConversation
3 changes: 1 addition & 2 deletions shared/chat/conversation/pinned-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const PinnedMessage = function PinnedMessage() {
const sizing = imageWidth && imageHeight ? zoomImage(imageWidth, imageHeight, 30) : undefined
const pin = (
<Kb.ClickableBox3 direction="horizontal" fullWidth={true} gap="tiny" className="hover_container" onClick={onClick} style={styles.container}>
<Kb.Box2 direction="horizontal" style={styles.blueBar} />
<Kb.Box2 direction="horizontal" alignSelf="stretch" style={styles.blueBar} />
{!!imageURL && (
<Kb.Box2 direction="vertical" overflow="hidden" relative={true}>
<Kb.Box2 direction="vertical" style={{...(sizing ? sizing.margins : {})}}>
Expand Down Expand Up @@ -177,7 +177,6 @@ const styles = Kb.Styles.styleSheetCreate(
({
author: {color: Kb.Styles.globalColors.black},
blueBar: {
alignSelf: 'stretch',
backgroundColor: Kb.Styles.globalColors.blue,
width: Kb.Styles.globalMargins.xtiny,
},
Expand Down
7 changes: 1 addition & 6 deletions shared/chat/conversation/you-are-reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import * as Kb from '@/common-adapters'

const YouAreReset = () => (
<Kb.Box2 direction="vertical" fullWidth={true} flex={1}>
<Kb.Box2
direction="vertical"
centerChildren={true}
fullWidth={true}
flex={1}
>
<Kb.Box2 direction="vertical" centerChildren={true} fullWidth={true} flex={1}>
<Kb.ImageIcon type={isMobile ? 'icon-skull-64' : 'icon-skull-48'} />
</Kb.Box2>
<Kb.Box2 direction="vertical" alignItems="center" fullWidth={true} style={styles.box}>
Expand Down
8 changes: 4 additions & 4 deletions shared/chat/create-channel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const CreateChannel = (p: Props) => {
onChangeText={props.onDescriptionChange}
/>
</Kb.Box2>
<Kb.ButtonBar fullWidth={true} style={desktopStyles.buttonBar}>
<Kb.ButtonBar fullWidth={true} style={buttonBarStyle}>
<Kb.Button type="Dim" onClick={props.onBack} label="Cancel" />
<Kb.WaitingButton
waitingKey={C.waitingKeyTeamsCreateChannel(props.teamID)}
Expand Down Expand Up @@ -96,7 +96,7 @@ const CreateChannel = (p: Props) => {
onChangeText={props.onDescriptionChange}
/>
</Kb.Box2>
<Kb.ButtonBar fullWidth={true} style={nativeStyles.buttonBar}>
<Kb.ButtonBar fullWidth={true} style={buttonBarStyle}>
<Kb.WaitingButton
waitingKey={C.waitingKeyTeamsCreateChannel(props.teamID)}
onClick={props.onSubmit}
Expand All @@ -108,6 +108,8 @@ const CreateChannel = (p: Props) => {
)
}

const buttonBarStyle = {alignItems: 'center'} as const

const desktopStyles = Kb.Styles.styleSheetCreate(
() =>
({
Expand All @@ -126,15 +128,13 @@ const desktopStyles = Kb.Styles.styleSheetCreate(
paddingRight: Kb.Styles.globalMargins.large,
paddingTop: Kb.Styles.globalMargins.medium,
},
buttonBar: {alignItems: 'center'},
}) as const
)

const nativeStyles = Kb.Styles.styleSheetCreate(
() =>
({
box: {padding: 16},
buttonBar: {alignItems: 'center'},
}) as const
)

Expand Down
5 changes: 1 addition & 4 deletions shared/chat/delete-history-warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ const DeleteHistoryWarning = (props: Props) => {
return (
<Kb.Box2
direction="vertical"
style={Kb.Styles.collapseStyles([
styles.padding,
styles.box,
])}
style={Kb.Styles.collapseStyles([styles.padding, styles.box])}
>
<Kb.ImageIcon type={isMobile ? 'icon-message-deletion-64' : 'icon-message-deletion-48'} />
<Kb.Text style={{padding: Kb.Styles.globalMargins.small}} type="Header">
Expand Down
17 changes: 6 additions & 11 deletions shared/chat/emoji-picker/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ const useReacji = ({
}
}

const useSkinTone = () => {
const currentSkinTone = useCurrentSkinTone()
const setSkinTone = useSetSkinTone()
return {currentSkinTone, setSkinTone}
}

const useCustomReacji = (
conversationIDKey: T.Chat.ConversationIDKey,
onlyInTeam: boolean | undefined,
Expand Down Expand Up @@ -107,7 +101,8 @@ const WrapperMobile = (props: Props) => {
)
const [width, setWidth] = React.useState(0)
const onLayout = (evt: LayoutEvent) => setWidth(evt.nativeEvent.layout.width)
const {currentSkinTone, setSkinTone} = useSkinTone()
const currentSkinTone = useCurrentSkinTone()
const setSkinTone = useSetSkinTone()
const [skinTonePickerExpanded, setSkinTonePickerExpanded] = React.useState(false)
const onCancel = C.Router2.navigateUp
const addEmoji = () =>
Expand Down Expand Up @@ -149,7 +144,7 @@ const WrapperMobile = (props: Props) => {
skinTone={currentSkinTone}
hideFrequentEmoji={props.hideFrequentEmoji ?? false}
/>
<Kb.Box2 direction="horizontal" fullWidth={true} alignItems="center" style={styles.footerContainer}>
<Kb.Box2 direction="horizontal" fullWidth={true} alignItems="center" noShrink={true} style={styles.footerContainer}>
<SkinTonePicker
currentSkinTone={currentSkinTone}
onExpandChange={setSkinTonePickerExpanded}
Expand All @@ -174,7 +169,8 @@ const EmojiPickerDesktopInner = (props: Props) => {
const {onDidPick} = props
const conversationIDKey = props.conversationIDKey ?? T.Chat.noConversationIDKey
const {filter, onChoose, setFilter: _setFilter, topReacjis} = useReacji(props)
const {currentSkinTone, setSkinTone} = useSkinTone()
const currentSkinTone = useCurrentSkinTone()
const setSkinTone = useSetSkinTone()
const [hoveredEmoji, setHoveredEmoji] = React.useState(emojiData.defaultHoverEmoji)
const {waiting, customEmojiGroups} = useCustomReacji(
conversationIDKey,
Expand Down Expand Up @@ -235,7 +231,7 @@ const EmojiPickerDesktopInner = (props: Props) => {
direction="horizontal"
fullWidth={true}
alignItems="center"
style={styles.footerContainer}
noShrink={true} style={styles.footerContainer}
gap="small"
>
<Kb.Emoji
Expand Down Expand Up @@ -306,7 +302,6 @@ const styles = Kb.Styles.styleSheetCreate(
},
footerContainer: Kb.Styles.platformStyles({
common: {
flexShrink: 0,
...Kb.Styles.paddingH(Kb.Styles.globalMargins.small),
},
isElectron: {
Expand Down
3 changes: 1 addition & 2 deletions shared/chat/emoji-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function EmojiPicker(props: Props) {
}

const getSectionHeader = (title: string) => (
<Kb.Box2 direction="horizontal" fullWidth={true} style={styles.sectionHeader}>
<Kb.Box2 direction="horizontal" fullWidth={true} alignItems="center" style={styles.sectionHeader}>
<Kb.Text type="BodySmallSemibold">{title}</Kb.Text>
</Kb.Box2>
)
Expand Down Expand Up @@ -455,7 +455,6 @@ const styles = Kb.Styles.styleSheetCreate(
...Kb.Styles.padding(Kb.Styles.globalMargins.medium, 0),
},
sectionHeader: {
alignItems: 'center',
backgroundColor: Kb.Styles.globalColors.white,
height: 32,
paddingLeft: Kb.Styles.globalMargins.tiny,
Expand Down
4 changes: 1 addition & 3 deletions shared/chat/inbox-and-conversation-get-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ export default Kb.Styles.isTablet
headerTitleContainerStyle: {},
}
: {
headerTitle: () => {
return <InboxAndConvoHeader />
},
headerTitle: () => <InboxAndConvoHeader />,
}
Loading