Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miscellaneous mobile fixes #714

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/components/Chatbot/ChatEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ type TitleProps = {
hint?: string
}
const Title = ({title, Icon, answerType, hint}: TitleProps) => (
<div className="flex-container title padding-bottom-16">
<div className="title-container padding-bottom-16">
<Icon width="40" height="40" />
<span className="default-bold flex-double">{title}</span>
<AnswerInfo answerType={answerType} hint={hint} />
<div className="title-inner-container">
<span className="default-bold">{title}</span>
<AnswerInfo answerType={answerType} hint={hint} />
</div>
</div>
)

Expand Down
16 changes: 15 additions & 1 deletion app/components/Chatbot/chat_entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
4 changes: 4 additions & 0 deletions app/components/Feedback/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>
Expand All @@ -27,6 +28,9 @@ const FeedbackForm = ({onSubmit, onClose, options, className}: FeedbackFormProps

return (
<div ref={clickCheckerRef} className={'feedback-form bordered ' + (className ?? '')}>
<button onClick={onClose} className="mobile-only escape-feedback">
<XLarge />
</button>
<span className="black small padding-bottom-32">What was the problem?</span>
{options?.map((option) => (
<Button
Expand Down
18 changes: 16 additions & 2 deletions app/components/Feedback/feedback.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
border-radius: var(--border-radius);
}

/* Comment to Nemo when he reviews: why didn't you just do this the way you did the settings buttons? */
.select-option {
height: var(--spacing-48);
height: var(--height-48);
border-radius: var(--border-radius);
margin-bottom: var(--spacing-16);
cursor: pointer;
Expand Down Expand Up @@ -70,3 +69,18 @@
transform: translate(-9vw, var(--spacing-56));
margin: var(--spacing-24);
}

.escape-feedback {
position: absolute;
top: 15px;
right: 15px;
line-height: 0;
border: none;
background: #fff;
}

@media (max-width: 780px) {
.feedback-form {
left: -20px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks suspicious - @melissasamworth ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha yes, I didn't try very hard to properly align the feedback form on mobile, because I wanted to wait until the column sizing is fixed on mobile. I could have a crack at fixing the mobile column margin but I feel like @melissasamworth had something specific in mind?

}
}
2 changes: 1 addition & 1 deletion app/routes/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function App() {
]}
settings={chatSettings}
/>
<div className="settings-container" ref={clickDetectorRef}>
<div className="settings-container z-index-1" ref={clickDetectorRef}>
{showSettings && (
<div className="settings bordered flex-container">
<div>Answer detail</div>
Expand Down
Loading