📱(frontend) improve feedback screen responsiveness on mobile

Tighten the feedback screen layout on mobile viewports so it fits
comfortably on small phone screens and reads naturally without
horizontal scroll or cramped controls.
This commit is contained in:
lebaudantoine
2026-08-24 14:31:02 +02:00
committed by aleb_the_flash
parent 6e2a7f0ca6
commit 954991c7c3
3 changed files with 43 additions and 15 deletions
+1
View File
@@ -12,6 +12,7 @@ and this project adheres to
- 📱(frontend) collapse mobile control bar items on narrow viewports - 📱(frontend) collapse mobile control bar items on narrow viewports
- 📱(frontend) stack idle modal buttons in a column on mobile - 📱(frontend) stack idle modal buttons in a column on mobile
- 📱(frontend) improve feedback screen responsiveness on mobile
## [1.28.0] - 2026-08-24 ## [1.28.0] - 2026-08-24
@@ -15,7 +15,8 @@ const Card = styled('div', {
marginTop: '1.5rem', marginTop: '1.5rem',
borderRadius: '0.25rem', borderRadius: '0.25rem',
boxShadow: '', boxShadow: '',
minWidth: '380px', width: '100%',
maxWidth: '380px',
minHeight: '196px', minHeight: '196px',
}, },
}) })
@@ -37,8 +38,11 @@ const ratingButtonRecipe = cva({
color: 'initial', color: 'initial',
border: 'none', border: 'none',
borderRadius: 0, borderRadius: 0,
padding: '0.5rem 0.85rem', padding: { base: '0.5rem 0.25rem', xsm: '0.5rem 0.85rem' },
flexGrow: '1', flexGrow: '1',
flexBasis: 0,
minWidth: 0,
textAlign: 'center',
cursor: 'pointer', cursor: 'pointer',
}, },
variants: { variants: {
@@ -99,7 +103,9 @@ const OpenFeedback = ({
return ( return (
<Card> <Card>
<H lvl={3}>{t('question')}</H> <H lvl={3} centered>
{t('question')}
</H>
<TextArea <TextArea
id="feedbackInput" id="feedbackInput"
name="feedback" name="feedback"
@@ -168,7 +174,9 @@ const RateQuality = ({
return ( return (
<Card> <Card>
<H lvl={3}>{t('question')}</H> <H lvl={3} centered>
{t('question')}
</H>
<Bar> <Bar>
{[...Array(maxRating)].map((_, index) => ( {[...Array(maxRating)].map((_, index) => (
<RACButton <RACButton
@@ -228,7 +236,9 @@ const ConfirmationMessage = ({ onNext }: { onNext: () => void }) => {
}} }}
> >
<VStack gap={0}> <VStack gap={0}>
<H lvl={3}>{t('heading')}</H> <H lvl={3} centered>
{t('heading')}
</H>
<Text as="p" variant="paragraph" centered> <Text as="p" variant="paragraph" centered>
{t('body')} {t('body')}
</Text> </Text>
@@ -1,7 +1,8 @@
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { Button } from '@/primitives' import { Button } from '@/primitives'
import { Screen } from '@/layout/Screen' import { Screen } from '@/layout/Screen'
import { Center, HStack, styled, VStack } from '@/styled-system/jsx' import { Center, Stack, styled, VStack } from '@/styled-system/jsx'
import { css } from '@/styled-system/css'
import { Rating } from '@/features/rooms/components/Rating.tsx' import { Rating } from '@/features/rooms/components/Rating.tsx'
import { useLocation } from 'wouter' import { useLocation } from 'wouter'
import { useMemo } from 'react' import { useMemo } from 'react'
@@ -14,14 +15,18 @@ const Heading = styled('h1', {
fontStyle: 'normal', fontStyle: 'normal',
fontStretch: 'normal', fontStretch: 'normal',
fontOpticalSizing: 'auto', fontOpticalSizing: 'auto',
fontSize: '2.3rem', fontSize: { base: '1.75rem', xsm: '2.3rem' },
lineHeight: '2.5rem', lineHeight: { base: '2.125rem', xsm: '2.5rem' },
letterSpacing: '0', letterSpacing: '0',
paddingBottom: '2rem', paddingBottom: { base: '1.5rem', xsm: '2rem' },
textAlign: 'center', textAlign: 'center',
}, },
}) })
const buttonClass = css({
width: { base: '100%', xsm: 'auto' },
})
enum DisconnectReasonKey { enum DisconnectReasonKey {
DuplicateIdentity = 'duplicateIdentity', DuplicateIdentity = 'duplicateIdentity',
ParticipantRemoved = 'participantRemoved', ParticipantRemoved = 'participantRemoved',
@@ -54,19 +59,31 @@ const FeedbackRoute = () => {
return ( return (
<Screen layout="centered" footer={false}> <Screen layout="centered" footer={false}>
<Center> <Center width="100%">
<VStack> <VStack width="100%" paddingX="1rem">
<Heading>{t(`feedback.heading.${reasonKey || 'normal'}`)}</Heading> <Heading>{t(`feedback.heading.${reasonKey || 'normal'}`)}</Heading>
<HStack> <Stack
direction={{ base: 'column', xsm: 'row' }}
width={{ base: '100%', xsm: 'auto' }}
maxWidth="380px"
>
{showBackButton && ( {showBackButton && (
<Button variant="secondary" onPress={() => window.history.back()}> <Button
variant="secondary"
className={buttonClass}
onPress={() => window.history.back()}
>
{t('feedback.back')} {t('feedback.back')}
</Button> </Button>
)} )}
<Button variant="primary" onPress={() => setLocation('/')}> <Button
variant="primary"
className={buttonClass}
onPress={() => setLocation('/')}
>
{t('feedback.home')} {t('feedback.home')}
</Button> </Button>
</HStack> </Stack>
<Rating metadata={metadata} /> <Rating metadata={metadata} />
</VStack> </VStack>
</Center> </Center>