From c09345c603a8cb343448147c35a07aba16f3e0d1 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 23 Oct 2024 10:25:56 -0500 Subject: [PATCH] Hide tags behind button --- .../Composer/OutlineTags/index.web.tsx | 4 +- src/view/com/composer/Composer.tsx | 46 ++++++++++++++++++- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/components/Composer/OutlineTags/index.web.tsx b/src/components/Composer/OutlineTags/index.web.tsx index 29f8f58c45..7327910a4a 100644 --- a/src/components/Composer/OutlineTags/index.web.tsx +++ b/src/components/Composer/OutlineTags/index.web.tsx @@ -217,7 +217,7 @@ export function OutlineTags({ }, [closeDropdownAndReset]) return ( - + {tags.map((tag, i) => ( removeTag(tag)}> @@ -247,7 +247,7 @@ export function OutlineTags({ paddingVertical: 4, }, ]} - placeholder="Add outline tags" + placeholder="Add tags" autoCapitalize="none" autoCorrect={false} autoComplete="off" diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index fa61623cc6..9e9c14c3d5 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -106,8 +106,10 @@ import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, native, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {OutlineTags} from '#/components/Composer/OutlineTags' +import {Divider} from '#/components/Divider' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import {EmojiArc_Stroke2_Corner0_Rounded as EmojiSmile} from '#/components/icons/Emoji' +import {Hashtag_Stroke2_Corner0_Rounded as Hashtag} from '#/components/icons/Hashtag' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' import * as Prompt from '#/components/Prompt' import {Text as NewText} from '#/components/Typography' @@ -522,6 +524,9 @@ export const ComposePost = ({ [dispatch], ) + const [showOutlineTags, setShowOutlineTags] = useState(false) + const outlineTagsVisible = showOutlineTags || draft.tags.length > 0 + const { scrollHandler, onScrollViewContentSizeChange, @@ -758,10 +763,33 @@ export const ComposePost = ({ - + {outlineTagsVisible && ( + + + + + + + + + + + + )} + style={[ + a.flex_row, + a.pb_md, + a.px_lg, + t.atoms.bg, + bottomBarAnimatedStyle, + ]}> + + {!outlineTagsVisible && ( + + )}