From b9bf84994f93a4d563160018182c66233ecd1bfb Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Fri, 19 Jun 2020 00:58:07 -0400 Subject: [PATCH] Updated Composer for mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - Composer for mobile. Using Textarea instead of Composer component for mobile. --- .../components/autosuggest_textbox.js | 76 +++++++++++++++---- .../containers/compose_form_container.js | 7 +- 2 files changed, 64 insertions(+), 19 deletions(-) diff --git a/app/javascript/gabsocial/components/autosuggest_textbox.js b/app/javascript/gabsocial/components/autosuggest_textbox.js index 1b907e75..c2f88c79 100644 --- a/app/javascript/gabsocial/components/autosuggest_textbox.js +++ b/app/javascript/gabsocial/components/autosuggest_textbox.js @@ -3,9 +3,13 @@ import ImmutablePropTypes from 'react-immutable-proptypes' import isObject from 'lodash.isobject' import ImmutablePureComponent from 'react-immutable-pure-component' import Textarea from 'react-textarea-autosize' -import { CX } from '../constants' +import { + CX, + BREAKPOINT_EXTRA_SMALL, +} from '../constants' import { isRtl } from '../utils/rtl' import { textAtCursorMatchesToken } from '../utils/cursor_token_match' +import Responsive from '../features/ui/util/responsive_component' import AutosuggestAccount from './autosuggest_account' import AutosuggestEmoji from './autosuggest_emoji' import Input from './input' @@ -219,27 +223,69 @@ export default class AutosuggestTextbox extends ImmutablePureComponent { py5: small, }) + const textareaClasses = CX({ + default: 1, + font: 1, + wrap: 1, + resizeNone: 1, + bgTransparent: 1, + outlineNone: 1, + lineHeight125: 1, + colorPrimary: 1, + width100PC: !small, + pt15: !small, + px15: !small, + px10: small, + pb10: !small, + fs16PX: !small, + fs14PX: small, + heightMax200PX: small, + heightMax80VH: !small, + heightMin80PX: !small, + }) + return (
+ + +