From 1b190210b3ab3f8d4277d7e23c5518d2f5ab9d88 Mon Sep 17 00:00:00 2001 From: Thomas Kam Date: Sun, 14 Jul 2024 02:55:32 -0400 Subject: [PATCH] more mobile view --- .../conversation-admin/CheckboxField.js | 38 +++++++++---------- .../comment-moderation/comment.js | 4 +- .../comment-moderation/index.js | 8 ++-- .../conversation-admin/conversation-config.js | 10 +++-- .../conversation-admin/seed-comment.js | 1 + .../stats/conversation-stats-number-card.js | 2 +- .../conversations-and-account/conversation.js | 1 + 7 files changed, 34 insertions(+), 30 deletions(-) diff --git a/client-admin/src/components/conversation-admin/CheckboxField.js b/client-admin/src/components/conversation-admin/CheckboxField.js index 4be6fa4fc7..18210e7d31 100644 --- a/client-admin/src/components/conversation-admin/CheckboxField.js +++ b/client-admin/src/components/conversation-admin/CheckboxField.js @@ -1,6 +1,6 @@ import React, { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' -import { Box, Flex, Text } from 'theme-ui' +import { Flex } from 'theme-ui' import PropTypes from 'prop-types' import { handleZidMetadataUpdate } from '../../actions' @@ -32,25 +32,23 @@ export const CheckboxField = ({ } return ( - - - handleIntegerBoolValueChange(field) - : () => handleBoolValueChange(field) - } - /> - - - {children} - + + handleIntegerBoolValueChange(field) + : () => handleBoolValueChange(field) + } + /> + ) } diff --git a/client-admin/src/components/conversation-admin/comment-moderation/comment.js b/client-admin/src/components/conversation-admin/comment-moderation/comment.js index af51b377d5..eb51287ea3 100644 --- a/client-admin/src/components/conversation-admin/comment-moderation/comment.js +++ b/client-admin/src/components/conversation-admin/comment-moderation/comment.js @@ -25,7 +25,7 @@ class Comment extends React.Component { render() { return ( - + {this.props.comment.txt} ) : null} - + Moderate - + - Unmoderated{' '} + Unmoderated
{this.props.unmoderated.unmoderated_comments ? this.props.unmoderated.unmoderated_comments.length : null} @@ -85,7 +85,7 @@ class CommentModeration extends React.Component { variant: url === 'accepted' ? 'links.activeNav' : 'links.nav' }} to={`${match.url}/accepted`}> - Accepted{' '} + Accepted
{this.props.accepted.accepted_comments ? this.props.accepted.accepted_comments.length : null} @@ -96,7 +96,7 @@ class CommentModeration extends React.Component { variant: url === 'rejected' ? 'links.activeNav' : 'links.nav' }} to={`${match.url}/rejected`}> - Rejected{' '} + Rejected
{this.props.rejected.rejected_comments ? this.props.rejected.rejected_comments.length : null} diff --git a/client-admin/src/components/conversation-admin/conversation-config.js b/client-admin/src/components/conversation-admin/conversation-config.js index ae8d18cbd9..e5ed59f7fb 100644 --- a/client-admin/src/components/conversation-admin/conversation-config.js +++ b/client-admin/src/components/conversation-admin/conversation-config.js @@ -10,7 +10,7 @@ import { } from '../../actions' import ComponentHelpers from '../../util/component-helpers' import NoPermission from './no-permission' -import { Heading, Box, Text, jsx } from 'theme-ui' +import { Heading, Box, Text, jsx, Label } from 'theme-ui' import emoji from 'react-easy-emoji' import { CheckboxField } from './CheckboxField' @@ -76,18 +76,20 @@ class ConversationConfig extends React.Component { - Topic + (this.topic = c)} sx={{ fontFamily: 'body', fontSize: [2], width: '35em', + maxWidth: '100%', borderRadius: 2, padding: [2], border: '1px solid', borderColor: 'mediumGray' }} + name="topic" data-test-id="topic" onBlur={this.handleStringValueChange('topic').bind(this)} onChange={this.handleConfigInputTyping('topic').bind(this)} @@ -96,13 +98,14 @@ class ConversationConfig extends React.Component { - Description +