diff --git a/src/status_im/chat/handlers/animation.cljs b/src/status_im/chat/handlers/animation.cljs index 2bd08c7a3b..a1ea5c98a5 100644 --- a/src/status_im/chat/handlers/animation.cljs +++ b/src/status_im/chat/handlers/animation.cljs @@ -1,11 +1,9 @@ (ns status-im.chat.handlers.animation (:require [re-frame.core :refer [register-handler after dispatch debug]] [re-frame.middleware :refer [path]] - [status-im.models.commands :as commands] [status-im.handlers.content-suggestions :refer [get-content-suggestions]] [status-im.chat.constants :refer [input-height request-info-height response-height-normal minimum-suggestion-height]] - [status-im.chat.styles.response-suggestions :as response-suggestions-styles] [status-im.constants :refer [response-input-hiding-duration]])) ;; todo magic value diff --git a/src/status_im/chat/styles/response_suggestions.cljs b/src/status_im/chat/styles/response_suggestions.cljs deleted file mode 100644 index 2561f2ae53..0000000000 --- a/src/status_im/chat/styles/response_suggestions.cljs +++ /dev/null @@ -1,59 +0,0 @@ -(ns status-im.chat.styles.response-suggestions - (:require [status-im.components.styles :refer [font - font-medium - color-light-blue-transparent - color-white - color-black - color-blue - color-blue-transparent - selected-message-color - online-color - separator-color - text1-color - text2-color - text3-color]])) - -(def header-height 50) -(def suggestion-height 56) - -(def header-container - {:paddingLeft 16 - :height header-height - :backgroundColor color-white}) - -(def header-text - {:marginTop 18 - :fontSize 13 - :fontFamily font-medium - :color text2-color}) - -(def suggestion-container - {:flexDirection :column - :paddingLeft 16 - :height suggestion-height - :backgroundColor color-white}) - -(def suggestion-sub-container - {:height suggestion-height - :borderBottomWidth 1 - :borderBottomColor separator-color}) - -(def value-text - {:marginTop 10 - :fontSize 12 - :fontFamily font - :color text1-color}) - -(def description-text - {:marginTop 2 - :fontSize 12 - :fontFamily font - :color text2-color}) - -(def suggestions-container - {:flexDirection :row - :flex 1 - :marginVertical 1 - :marginHorizontal 0 - :backgroundColor color-white - :borderRadius 5}) diff --git a/src/status_im/chat/views/response.cljs b/src/status_im/chat/views/response.cljs index a079ef805a..4336ce9c04 100644 --- a/src/status_im/chat/views/response.cljs +++ b/src/status_im/chat/views/response.cljs @@ -11,7 +11,6 @@ text-input touchable-highlight]] [status-im.components.drag-drop :as drag] - [status-im.chat.views.response-suggestions :refer [response-suggestions-view]] [status-im.chat.styles.response :as st] [status-im.components.animation :as anim] [status-im.components.react :as react])) @@ -107,8 +106,18 @@ (into [animated-view {:style (st/response-view response-height)}] children))}))) +(defview placeholder [] + [suggestions [:get-content-suggestions]] + (when (seq suggestions) + [view st/input-placeholder])) + +(defview response-suggestions-view [] + [suggestions [:get-content-suggestions]] + (when (seq suggestions) suggestions)) + (defn response-view [] (let [response-height (anim/create-value 0)] [container response-height [request-info response-height] - [response-suggestions-view]])) + [response-suggestions-view] + [placeholder]])) diff --git a/src/status_im/chat/views/response_suggestions.cljs b/src/status_im/chat/views/response_suggestions.cljs deleted file mode 100644 index 3c6f9b549d..0000000000 --- a/src/status_im/chat/views/response_suggestions.cljs +++ /dev/null @@ -1,7 +0,0 @@ -(ns status-im.chat.views.response-suggestions - (:require-macros [status-im.utils.views :refer [defview]]) - (:require [re-frame.core :refer [subscribe dispatch]])) - -(defview response-suggestions-view [] - [suggestions [:get-content-suggestions]] - (when (seq suggestions) suggestions))