From 5f9a1615692cccd5f1bb3a1097ac53565eb47270 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 9 Jun 2024 13:42:31 -0400 Subject: [PATCH 1/2] miscellaneous mobile fixes --- app/components/Chatbot/ChatEntry.tsx | 8 +++++--- app/components/Chatbot/chat_entry.css | 16 +++++++++++++++- app/components/Feedback/Form.tsx | 4 ++++ app/components/Feedback/feedback.css | 18 ++++++++++++++++-- app/routes/chat.tsx | 2 +- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app/components/Chatbot/ChatEntry.tsx b/app/components/Chatbot/ChatEntry.tsx index 8f40e4e4..3a9657d6 100644 --- a/app/components/Chatbot/ChatEntry.tsx +++ b/app/components/Chatbot/ChatEntry.tsx @@ -51,10 +51,12 @@ type TitleProps = { hint?: string } const Title = ({title, Icon, answerType, hint}: TitleProps) => ( -
+
- {title} - +
+ {title} + +
) diff --git a/app/components/Chatbot/chat_entry.css b/app/components/Chatbot/chat_entry.css index e8d7a2c1..45bfc7c6 100644 --- a/app/components/Chatbot/chat_entry.css +++ b/app/components/Chatbot/chat_entry.css @@ -8,12 +8,18 @@ article.stampy { border-radius: var(--border-radius); } -.chat-entry .title { +.chat-entry .title-container { display: flex; gap: var(--spacing-16); align-items: center; } +.title-inner-container { + display: flex; + justify-content: space-between; + flex-grow: 1; +} + .phase-message { margin-left: 57px; color: var(--colors-cool-grey-600); @@ -176,3 +182,11 @@ article.stampy { visibility: visible; transition-delay: 0s; } + +@media (max-width: 780px) { + .title-inner-container { + flex-direction: column; + align-items: start; + justify-content: flex-start; + } +} diff --git a/app/components/Feedback/Form.tsx b/app/components/Feedback/Form.tsx index 9ff683aa..d2b25836 100644 --- a/app/components/Feedback/Form.tsx +++ b/app/components/Feedback/Form.tsx @@ -2,6 +2,7 @@ import {useState} from 'react' import Button from '~/components/Button' import useOutsideOnClick from '~/hooks/useOnOutsideClick' import './feedback.css' +import {XLarge} from '../icons-generated' export type FeedbackFormProps = { onSubmit?: (msg: string, option?: string) => Promise @@ -27,6 +28,9 @@ const FeedbackForm = ({onSubmit, onClose, options, className}: FeedbackFormProps return (
+ What was the problem? {options?.map((option) => ( What was the problem? {options?.map((option) => (