From ae1e35f44035f3bca97e5b1429c16a85cb4d286b Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Tue, 10 Mar 2026 15:46:30 -0400 Subject: [PATCH 1/3] use dummy input for desktop chat search --- shared/chat/inbox/filter-row.tsx | 40 ++++++++++++++----- shared/common-adapters/plain-input.d.ts | 1 - .../common-adapters/plain-input.desktop.tsx | 3 +- shared/common-adapters/search-filter.tsx | 2 - 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/shared/chat/inbox/filter-row.tsx b/shared/chat/inbox/filter-row.tsx index 8a5651be6445..da752e077380 100644 --- a/shared/chat/inbox/filter-row.tsx +++ b/shared/chat/inbox/filter-row.tsx @@ -75,6 +75,7 @@ const ConversationFilterInput = React.memo(function ConversationFilterInput(ownP appendNewChatBuilder() }, [appendNewChatBuilder]) Kb.useHotKey('mod+n', onHotKeys) + Kb.useHotKey('mod+k', onStartSearch) React.useEffect(() => { if (isSearching) { @@ -82,28 +83,29 @@ const ConversationFilterInput = React.memo(function ConversationFilterInput(ownP } }, [isSearching]) - const searchInput = ( + const searchInput = isSearching ? ( + ) : ( + + + + {Kb.Styles.isMobile ? 'Search' : `Search (\u2318K)`} + + ) return ( void onKeyUp?: (event: React.KeyboardEvent) => void spellCheck?: boolean - tabIndex?: number // desktop only // Mobile only children?: React.ReactNode allowFontScaling?: boolean diff --git a/shared/common-adapters/plain-input.desktop.tsx b/shared/common-adapters/plain-input.desktop.tsx index 2ee05c107220..acbffba61cbc 100644 --- a/shared/common-adapters/plain-input.desktop.tsx +++ b/shared/common-adapters/plain-input.desktop.tsx @@ -40,7 +40,7 @@ const PlainInput = React.memo( const {growAndScroll, multiline, onFocus: _onFocus, selectTextOnFocus, onChangeText} = p const {maxBytes, globalCaptureKeypress, onBlur, onClick, style, resize, maxLength} = p const {rowsMin, rowsMax, textType, padding, flexable = true, type} = p - const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className, tabIndex} = p + const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className} = p const inputRef = React.useRef(null) const isComposingIMERef = React.useRef(false) const mountedRef = React.useRef(true) @@ -216,7 +216,6 @@ const PlainInput = React.memo( placeholder, ref: inputRef, spellCheck, - tabIndex, value, ...(maxLength ? {maxLength} : {}), ...(disabled ? {readOnly: true} : {}), diff --git a/shared/common-adapters/search-filter.tsx b/shared/common-adapters/search-filter.tsx index 44ba9eeebb52..0590aedf9182 100644 --- a/shared/common-adapters/search-filter.tsx +++ b/shared/common-adapters/search-filter.tsx @@ -57,7 +57,6 @@ type Props = { onKeyDown?: (event: React.KeyboardEvent) => void onKeyUp?: (event: React.KeyboardEvent) => void onKeyPress?: (event: NativeSyntheticEvent<{key: string}>) => void - tabIndex?: number // desktop only measureRef?: React.RefObject } @@ -202,7 +201,6 @@ const SearchFilter = React.forwardRef(function SearchFil onKeyUp={props.onKeyUp} onKeyPress={props.onKeyPress} onEnterKeyDown={props.onEnterKeyDown} - tabIndex={props.tabIndex} ref={inputRef} hideBorder={true} containerStyle={styles.inputContainer} From 94230630bbdbe5289ae17bf72319ebc991880a9c Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Tue, 10 Mar 2026 16:00:50 -0400 Subject: [PATCH 2/3] fix styling, use dummy for desktop also --- shared/chat/inbox/filter-row.tsx | 48 +++++++++++++++++++------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/shared/chat/inbox/filter-row.tsx b/shared/chat/inbox/filter-row.tsx index da752e077380..349d0a0e2615 100644 --- a/shared/chat/inbox/filter-row.tsx +++ b/shared/chat/inbox/filter-row.tsx @@ -100,12 +100,14 @@ const ConversationFilterInput = React.memo(function ConversationFilterInput(ownP onEnterKeyDown={onEnterKeyDown} /> ) : ( - - - - {Kb.Styles.isMobile ? 'Search' : `Search (\u2318K)`} - - + + + + + {Kb.Styles.isMobile ? 'Search' : `Search (\u2318K)`} + + + ) return ( Date: Tue, 10 Mar 2026 16:03:16 -0400 Subject: [PATCH 3/3] lint --- shared/chat/inbox/filter-row.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/shared/chat/inbox/filter-row.tsx b/shared/chat/inbox/filter-row.tsx index 349d0a0e2615..edb820dd9ca0 100644 --- a/shared/chat/inbox/filter-row.tsx +++ b/shared/chat/inbox/filter-row.tsx @@ -152,17 +152,6 @@ const styles = Kb.Styles.styleSheetCreate( // hacky, redo the layout of this component later isTablet: {maxWidth: 270 - 16 * 2}, }), - searchPlaceholderOuter: Kb.Styles.platformStyles({ - common: {flex: 1}, - isElectron: Kb.Styles.desktopStyles.windowDraggingClickable, - isMobile: { - paddingBottom: Kb.Styles.globalMargins.tiny, - paddingLeft: Kb.Styles.globalMargins.small, - paddingRight: Kb.Styles.globalMargins.small, - paddingTop: Kb.Styles.globalMargins.tiny, - }, - isTablet: {paddingLeft: 0, paddingRight: 0}, - }), searchPlaceholder: { ...Kb.Styles.globalStyles.flexBoxRow, ...Kb.Styles.globalStyles.flexGrow, @@ -179,6 +168,17 @@ const styles = Kb.Styles.styleSheetCreate( isElectron: {marginRight: Kb.Styles.globalMargins.tiny, marginTop: 2}, isMobile: {marginRight: Kb.Styles.globalMargins.tiny}, }), + searchPlaceholderOuter: Kb.Styles.platformStyles({ + common: {flex: 1}, + isElectron: Kb.Styles.desktopStyles.windowDraggingClickable, + isMobile: { + paddingBottom: Kb.Styles.globalMargins.tiny, + paddingLeft: Kb.Styles.globalMargins.small, + paddingRight: Kb.Styles.globalMargins.small, + paddingTop: Kb.Styles.globalMargins.tiny, + }, + isTablet: {paddingLeft: 0, paddingRight: 0}, + }), searchPlaceholderText: {color: Kb.Styles.globalColors.black_50}, whiteBg: {backgroundColor: Kb.Styles.globalColors.white}, }) as const