From bb37175c028992ab952847cb50abe04cf6e9a7a6 Mon Sep 17 00:00:00 2001 From: dakota002 Date: Thu, 9 May 2024 11:40:42 -0400 Subject: [PATCH] UTC, Grid, and fix button height --- .../CircularEditForm.tsx | 336 +++++++++--------- .../CircularsEditForm.module.scss | 5 + 2 files changed, 182 insertions(+), 159 deletions(-) create mode 100644 app/routes/circulars.edit.$circularId/CircularsEditForm.module.scss diff --git a/app/routes/circulars.edit.$circularId/CircularEditForm.tsx b/app/routes/circulars.edit.$circularId/CircularEditForm.tsx index ad3a207544..245b382caf 100644 --- a/app/routes/circulars.edit.$circularId/CircularEditForm.tsx +++ b/app/routes/circulars.edit.$circularId/CircularEditForm.tsx @@ -10,6 +10,7 @@ import { Button, ButtonGroup, DatePicker, + Grid, Icon, InputGroup, InputPrefix, @@ -44,6 +45,8 @@ import CollapsableInfo from '~/components/CollapsableInfo' import Spinner from '~/components/Spinner' import { useFeature, useModStatus } from '~/root' +import styles from './CircularsEditForm.module.css' + function SyntaxExample({ label, children, @@ -186,7 +189,7 @@ export function CircularEditForm({ const userIsModerator = useModStatus() useEffect(() => { - setDateString(`${date} ${time}`) + setDateString(`${date} ${time} UTC`) }, [date, time]) return ( @@ -194,183 +197,198 @@ export function CircularEditForm({

{headerText} GCN Circular

- {circularId !== undefined && ( - <> - - - From + + + {circularId !== undefined && ( + <> + + + From + + setUpdatedSubmitter(event.target.value) + } + required + disabled={!userIsModerator} + /> + + + )} + + + + + {circularId === undefined ? 'From' : 'Editor'} + + {formattedContributor} + + + + + + + + + Date + { + setDate(value ?? '') + }} + name="submissionDatePicker" + id="submissionDatePicker" + /> + + + Time + { + setTime(value ?? '') + }} + step={1} + label="" + /> + + + + + Subject setUpdatedSubmitter(event.target.value)} + placeholder={useSubjectPlaceholder()} + defaultValue={defaultSubject} required - disabled={!userIsModerator} + onChange={({ target: { value } }) => { + setSubject(value) + setSubjectValid(subjectIsValid(value)) + }} /> - - )} - - - {circularId === undefined ? 'From' : 'Editor'} - - {formattedContributor} - + - - - - - - Date - { - setDate(value ?? '') - }} - name="submissionDatePicker" - id="submissionDatePicker" - /> - { - setTime(value ?? '') - }} - step={1} - label="" - /> - - - Subject - { - setSubject(value) - setSubjectValid(subjectIsValid(value)) - }} - /> - - - - - - {useFeature('CIRCULARS_MARKDOWN') ? ( - { - setBody(value) - }} - markdownStateSetter={setFormat} - /> - ) : ( - <> - - setShowPreview(false)} - > - Edit - - setShowPreview(true)}> - Preview - - -