@@ -26,6 +26,7 @@ import {
2626 IconCheck ,
2727 IconCirclePlus ,
2828 IconCircleX ,
29+ IconHelp ,
2930 IconInfoCircle ,
3031 IconPlus ,
3132 IconX ,
@@ -51,7 +52,9 @@ import { Identifier } from "./formula/formulaParts";
5152const CreateExerciseForm = ( ) => {
5253 const [ opened , { open, close } ] = useDisclosure ( false ) ;
5354
54- const [ [ lhsFormulaStr , rhsFormulaStr ] , setFormulaStr ] = useState < [ string , string ] > ( [ "" , "" ] ) ;
55+ const [ [ lhsFormulaStr , rhsFormulaStr ] , setFormulaStr ] = useState <
56+ [ string , string ]
57+ > ( [ "" , "" ] ) ;
5558 const [ debouncedLhsFormulaStr ] = useDebouncedValue ( lhsFormulaStr , 150 ) ;
5659 const [ debouncedRhsFormulaStr ] = useDebouncedValue ( rhsFormulaStr , 150 ) ;
5760
@@ -146,12 +149,12 @@ const CreateExerciseForm = () => {
146149 useEffect ( ( ) => {
147150 if ( ! debouncedLhsFormulaStr ) return ;
148151 parseFormulaRequest ( debouncedLhsFormulaStr , true ) ;
149- } , [ debouncedLhsFormulaStr ] )
152+ } , [ debouncedLhsFormulaStr ] ) ;
150153
151154 useEffect ( ( ) => {
152155 if ( ! debouncedRhsFormulaStr ) return ;
153156 parseFormulaRequest ( debouncedRhsFormulaStr , false ) ;
154- } , [ debouncedRhsFormulaStr ] )
157+ } , [ debouncedRhsFormulaStr ] ) ;
155158
156159 const parseFormulaRequest = async ( formula : string , lhs : boolean ) => {
157160 if ( lhs ) {
@@ -231,7 +234,14 @@ const CreateExerciseForm = () => {
231234 </ ListItem >
232235 </ List >
233236 < Divider mt = { "md" } />
234- < Stack justify = "center" align = "stretch" gap = { 10 } >
237+ < Stack justify = "center" align = "stretch" gap = { 0 } >
238+ < Group >
239+ < Title order = { 4 } > Statement</ Title >
240+ < Tooltip label = { < GrammarTooltip /> } >
241+ < IconHelp />
242+ </ Tooltip >
243+ </ Group >
244+
235245 < Group justify = "center" >
236246 < Card withBorder miw = { "50%" } mih = { 125 } mt = { "xl" } >
237247 < Card . Section h = { "100%" } >
@@ -264,7 +274,6 @@ const CreateExerciseForm = () => {
264274 </ Card . Section >
265275 </ Card >
266276 </ Group >
267-
268277 < Grid pt = { "xl" } align = "center" grow columns = { 26 } >
269278 < Grid . Col span = { 12 } >
270279 < Group justify = "right" align = "center" >
@@ -280,7 +289,9 @@ const CreateExerciseForm = () => {
280289 ) ) }
281290 < TextInput
282291 placeholder = "Enter Formula"
283- onChange = { ( e ) => setFormulaStr ( ( [ _ , rhs ] ) => [ e ?. currentTarget ?. value , rhs ] ) }
292+ onChange = { ( e ) =>
293+ setFormulaStr ( ( [ _ , rhs ] ) => [ e ?. currentTarget ?. value , rhs ] )
294+ }
284295 rightSection = {
285296 < ActionIcon
286297 variant = "transparent"
@@ -310,7 +321,12 @@ const CreateExerciseForm = () => {
310321 ) : (
311322 < TextInput
312323 placeholder = "Enter Formula"
313- onChange = { ( e ) => setFormulaStr ( ( [ lhs , _ ] ) => [ lhs , e ?. currentTarget ?. value ] ) }
324+ onChange = { ( e ) =>
325+ setFormulaStr ( ( [ lhs , _ ] ) => [
326+ lhs ,
327+ e ?. currentTarget ?. value ,
328+ ] )
329+ }
314330 rightSection = {
315331 < ActionIcon
316332 variant = "transparent"
@@ -329,6 +345,7 @@ const CreateExerciseForm = () => {
329345 </ Grid . Col >
330346 </ Grid >
331347 < Divider my = { "md" } />
348+ < Title order = { 4 } > Side Conditions</ Title >
332349 < Stack align = "center" >
333350 { sideCon . map ( ( sc , i ) => (
334351 < Group key = { i } gap = { 1 } >
@@ -391,7 +408,8 @@ const CreateExerciseForm = () => {
391408 </ Group >
392409 </ Stack >
393410 < Divider my = { "md" } />
394- < Group justify = "center" >
411+ { /* <Title order={4}>Side Conditions</Title> */ }
412+ < Group justify = "center" pb = { "md" } >
395413 { hasRhs ? (
396414 < Text > ✅ Structure</ Text >
397415 ) : (
0 commit comments