SCGR commited on
Commit
e2f9373
Β·
1 Parent(s): c69ce84

bigger text box

Browse files
frontend/src/pages/UploadPage/UploadPage.module.css CHANGED
@@ -404,6 +404,40 @@
404
  border-top: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
405
  }
406
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
  .step2Layout {
408
  display: grid;
409
  grid-template-columns: 1fr 1fr;
@@ -422,6 +456,13 @@
422
  gap: var(--go-ui-spacing-lg);
423
  }
424
 
 
 
 
 
 
 
 
425
  .contentColumn .formGrid {
426
  display: grid;
427
  gap: var(--go-ui-spacing-lg);
@@ -436,9 +477,18 @@
436
  gap: var(--go-ui-spacing-lg);
437
  }
438
 
 
 
 
 
 
439
  .mapColumn {
440
  position: static;
441
  }
 
 
 
 
442
  }
443
 
444
  @media (max-width: 768px) {
 
404
  border-top: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
405
  }
406
 
407
+ .step2Layout {
408
+ display: flex;
409
+ flex-direction: column;
410
+ gap: var(--go-ui-spacing-2xl);
411
+ }
412
+
413
+ .topRow {
414
+ display: grid;
415
+ grid-template-columns: 1fr 1fr;
416
+ gap: var(--go-ui-spacing-2xl);
417
+ align-items: start;
418
+ }
419
+
420
+ .imageSection {
421
+ position: sticky;
422
+ top: var(--go-ui-spacing-lg);
423
+ }
424
+
425
+ .ratingSection {
426
+ display: flex;
427
+ flex-direction: column;
428
+ }
429
+
430
+ .ratingContent {
431
+ display: flex;
432
+ flex-direction: column;
433
+ gap: var(--go-ui-spacing-md);
434
+ }
435
+
436
+ .bottomRow {
437
+ width: 100%;
438
+ }
439
+
440
+ /* Support for step 2a layout (side-by-side) */
441
  .step2Layout {
442
  display: grid;
443
  grid-template-columns: 1fr 1fr;
 
456
  gap: var(--go-ui-spacing-lg);
457
  }
458
 
459
+ /* Support for step 2b layout (top row + bottom row) */
460
+ .step2bLayout {
461
+ display: flex;
462
+ flex-direction: column;
463
+ gap: var(--go-ui-spacing-2xl);
464
+ }
465
+
466
  .contentColumn .formGrid {
467
  display: grid;
468
  gap: var(--go-ui-spacing-lg);
 
477
  gap: var(--go-ui-spacing-lg);
478
  }
479
 
480
+ .topRow {
481
+ grid-template-columns: 1fr;
482
+ gap: var(--go-ui-spacing-lg);
483
+ }
484
+
485
  .mapColumn {
486
  position: static;
487
  }
488
+
489
+ .imageSection {
490
+ position: static;
491
+ }
492
  }
493
 
494
  @media (max-width: 768px) {
frontend/src/pages/UploadPage/UploadPage.tsx CHANGED
@@ -1271,33 +1271,33 @@ export default function UploadPage() {
1271
  )}
1272
 
1273
  {step === '2b' && (
1274
- <div className={styles.step2Layout}>
1275
- <div className={styles.mapColumn}>
1276
- <Container heading="Uploaded Image" headingLevel={3} withHeaderBorder withInternalPadding>
1277
- <div className={styles.uploadedMapContainer}>
1278
- <div className={styles.uploadedMapImage}>
1279
- <img
1280
- src={imageUrl || preview || undefined}
1281
- alt="Uploaded image preview"
1282
- />
1283
- </div>
1284
- <div className={styles.viewFullSizeButton}>
1285
- <Button
1286
- name="view-full-size"
1287
- variant="secondary"
1288
- size={1}
1289
- onClick={() => setIsFullSizeModalOpen(true)}
1290
- >
1291
- View Image
1292
- </Button>
 
 
 
1293
  </div>
1294
- </div>
1295
- </Container>
1296
- </div>
1297
 
1298
- {/* Right Column - Content */}
1299
- <div className={styles.contentColumn}>
1300
- {/* ────── RATING SLIDERS ────── */}
1301
  <div className={styles.metadataSectionCard}>
1302
  <Container
1303
  heading="AI Performance Rating"
@@ -1305,7 +1305,7 @@ export default function UploadPage() {
1305
  withHeaderBorder
1306
  withInternalPadding
1307
  >
1308
- <div className={styles.ratingSection}>
1309
  {!isPerformanceConfirmed && (
1310
  <>
1311
  <p className={styles.ratingDescription}>How well did the AI perform on the task?</p>
@@ -1350,67 +1350,68 @@ export default function UploadPage() {
1350
  </div>
1351
  </Container>
1352
  </div>
 
1353
 
1354
- <div className={styles.metadataSectionCard}>
1355
- <Container
1356
- heading="Generated Text"
1357
- headingLevel={3}
1358
- withHeaderBorder
1359
- withInternalPadding
1360
- >
1361
- <div className="text-left space-y-4">
1362
- <div>
1363
- <TextArea
1364
- name="generatedContent"
1365
- value={`Description:\n${description || 'AI-generated description will appear here...'}\n\nAnalysis:\n${analysis || 'AI-generated analysis will appear here...'}\n\nRecommended Actions:\n${recommendedActions || 'AI-generated recommended actions will appear here...'}`}
1366
- onChange={(value) => {
1367
- // Parse the combined text back into separate fields
1368
- if (value) {
1369
- const lines = value.split('\n');
1370
- const descIndex = lines.findIndex(line => line.startsWith('Description:'));
1371
- const analysisIndex = lines.findIndex(line => line.startsWith('Analysis:'));
1372
- const actionsIndex = lines.findIndex(line => line.startsWith('Recommended Actions:'));
1373
-
1374
- if (descIndex !== -1 && analysisIndex !== -1 && actionsIndex !== -1) {
1375
- setDescription(lines.slice(descIndex + 1, analysisIndex).join('\n').trim());
1376
- setAnalysis(lines.slice(analysisIndex + 1, actionsIndex).join('\n').trim());
1377
- setRecommendedActions(lines.slice(actionsIndex + 1).join('\n').trim());
1378
- }
1379
  }
1380
- }}
1381
- rows={12}
1382
- placeholder="AI-generated content will appear here..."
1383
- />
1384
- </div>
1385
- </div>
1386
-
1387
- {/* ────── SUBMIT BUTTONS ────── */}
1388
- <div className={styles.submitSection}>
1389
- <Button
1390
- name="back"
1391
- variant="secondary"
1392
- onClick={() => handleStepChange('2a')}
1393
- >
1394
- Back
1395
- </Button>
1396
- <IconButton
1397
- name="delete"
1398
- variant="tertiary"
1399
- onClick={handleDelete}
1400
- title="Delete"
1401
- ariaLabel="Delete uploaded image"
1402
- >
1403
- <DeleteBinLineIcon />
1404
- </IconButton>
1405
- <Button
1406
- name="submit"
1407
- onClick={handleSubmit}
1408
- >
1409
- Submit
1410
- </Button>
1411
  </div>
1412
- </Container>
1413
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1414
  </div>
1415
  </div>
1416
  )}
 
1271
  )}
1272
 
1273
  {step === '2b' && (
1274
+ <div className={styles.step2bLayout}>
1275
+ {/* Top Row - Image and Rating horizontally aligned */}
1276
+ <div className={styles.topRow}>
1277
+ <div className={styles.imageSection}>
1278
+ <Container heading="Uploaded Image" headingLevel={3} withHeaderBorder withInternalPadding>
1279
+ <div className={styles.uploadedMapContainer}>
1280
+ <div className={styles.uploadedMapImage}>
1281
+ <img
1282
+ src={imageUrl || preview || undefined}
1283
+ alt="Uploaded image preview"
1284
+ />
1285
+ </div>
1286
+ <div className={styles.viewFullSizeButton}>
1287
+ <Button
1288
+ name="view-full-size"
1289
+ variant="secondary"
1290
+ size={1}
1291
+ onClick={() => setIsFullSizeModalOpen(true)}
1292
+ >
1293
+ View Image
1294
+ </Button>
1295
+ </div>
1296
  </div>
1297
+ </Container>
1298
+ </div>
 
1299
 
1300
+ {/* Rating Section */}
 
 
1301
  <div className={styles.metadataSectionCard}>
1302
  <Container
1303
  heading="AI Performance Rating"
 
1305
  withHeaderBorder
1306
  withInternalPadding
1307
  >
1308
+ <div className={styles.ratingContent}>
1309
  {!isPerformanceConfirmed && (
1310
  <>
1311
  <p className={styles.ratingDescription}>How well did the AI perform on the task?</p>
 
1350
  </div>
1351
  </Container>
1352
  </div>
1353
+ </div>
1354
 
1355
+ {/* Bottom Row - Generated Text spanning full width */}
1356
+ <div className={styles.metadataSectionCard}>
1357
+ <Container
1358
+ heading="Generated Text"
1359
+ headingLevel={3}
1360
+ withHeaderBorder
1361
+ withInternalPadding
1362
+ >
1363
+ <div className="text-left space-y-4">
1364
+ <div>
1365
+ <TextArea
1366
+ name="generatedContent"
1367
+ value={`Description:\n${description || 'AI-generated description will appear here...'}\n\nAnalysis:\n${analysis || 'AI-generated analysis will appear here...'}\n\nRecommended Actions:\n${recommendedActions || 'AI-generated recommended actions will appear here...'}`}
1368
+ onChange={(value) => {
1369
+ // Parse the combined text back into separate fields
1370
+ if (value) {
1371
+ const lines = value.split('\n');
1372
+ const descIndex = lines.findIndex(line => line.startsWith('Description:'));
1373
+ const analysisIndex = lines.findIndex(line => line.startsWith('Analysis:'));
1374
+ const actionsIndex = lines.findIndex(line => line.startsWith('Recommended Actions:'));
1375
+
1376
+ if (descIndex !== -1 && analysisIndex !== -1 && actionsIndex !== -1) {
1377
+ setDescription(lines.slice(descIndex + 1, analysisIndex).join('\n').trim());
1378
+ setAnalysis(lines.slice(analysisIndex + 1, actionsIndex).join('\n').trim());
1379
+ setRecommendedActions(lines.slice(actionsIndex + 1).join('\n').trim());
1380
  }
1381
+ }
1382
+ }}
1383
+ rows={12}
1384
+ placeholder="AI-generated content will appear here..."
1385
+ />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1386
  </div>
1387
+ </div>
1388
+
1389
+ {/* ────── SUBMIT BUTTONS ────── */}
1390
+ <div className={styles.submitSection}>
1391
+ <Button
1392
+ name="back"
1393
+ variant="secondary"
1394
+ onClick={() => handleStepChange('2a')}
1395
+ >
1396
+ Back
1397
+ </Button>
1398
+ <IconButton
1399
+ name="delete"
1400
+ variant="tertiary"
1401
+ onClick={handleDelete}
1402
+ title="Delete"
1403
+ ariaLabel="Delete uploaded image"
1404
+ >
1405
+ <DeleteBinLineIcon />
1406
+ </IconButton>
1407
+ <Button
1408
+ name="submit"
1409
+ onClick={handleSubmit}
1410
+ >
1411
+ Submit
1412
+ </Button>
1413
+ </div>
1414
+ </Container>
1415
  </div>
1416
  </div>
1417
  )}