Skip to content

Commit c533c9d

Browse files
Cleaned some stuff up
Removed all the selectable things in Match Scouting, Fixed the buttons in Pit App, and fixed an error in addFakeData.
1 parent 910308f commit c533c9d

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

client/src/apps/match/MatchApp.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,8 @@ function MatchApp() {
11011101
<main className='mx-auto flex w-full max-w-5xl flex-col gap-4 px-4 pb-10 pt-5 md:px-6'>
11021102
<header className={`${sectionClass} flex flex-wrap items-center justify-between gap-3`}>
11031103
<div>
1104-
<h1 className='text-xl font-semibold text-[#48c55c]'>Match Scouting</h1>
1105-
<p className='mt-1 text-xs text-gray-400'>
1104+
<h1 className='select-none text-xl font-semibold text-[#48c55c]'>Match Scouting</h1>
1105+
<p className='select-none mt-1 text-xs text-gray-400'>
11061106
{scouterName || 'Scout Not Signed In'}{' '}
11071107
{robotPosition ? `(${robotPosition})` : ''}
11081108
</p>
@@ -1122,8 +1122,8 @@ function MatchApp() {
11221122
</header>
11231123

11241124
<section className={sectionClass}>
1125-
<h2 className='text-base font-semibold text-[#48c55c]'>Overview</h2>
1126-
<div className='mt-3 grid gap-3 md:grid-cols-2'>
1125+
<h2 className='select-none text-base font-semibold text-[#48c55c]'>Overview</h2>
1126+
<div className='select-none mt-3 grid gap-3 md:grid-cols-2'>
11271127
<div>
11281128
<p className='text-xs uppercase tracking-wide text-gray-300'>Match Number</p>
11291129
<NumberInput
@@ -1143,7 +1143,7 @@ function MatchApp() {
11431143
</div>
11441144
</div>
11451145

1146-
<div className='mt-3'>
1146+
<div className='select-none mt-3'>
11471147
<p className='text-xs uppercase tracking-wide text-gray-300'>Starting Position</p>
11481148
<div className='select-none mt-1 flex flex-wrap gap-2'>
11491149
<MultiButton
@@ -1165,15 +1165,15 @@ function MatchApp() {
11651165
boxClassName='size-4'>
11661166
<span className='ml-1.5'>Robot Absent</span>
11671167
</Checkbox>
1168-
<p className='text-gray-400'>
1168+
<p className='select-none text-gray-400'>
11691169
Team auto-fills from hardcoded schedule using match number + scout
11701170
position.
11711171
</p>
11721172
</div>
11731173
</section>
11741174

11751175
<section className={sectionClass}>
1176-
<div className='flex flex-wrap items-center justify-between gap-3'>
1176+
<div className='select-none flex flex-wrap items-center justify-between gap-3'>
11771177
<div>
11781178
<h2 className='text-base font-semibold text-[#48c55c]'>Auto Path</h2>
11791179
<p className='text-xs text-gray-300'>
@@ -1201,7 +1201,7 @@ function MatchApp() {
12011201
</div>
12021202

12031203
{autoPanelOpen && (
1204-
<div className='mt-3 space-y-3'>
1204+
<div className='select-none mt-3 space-y-3'>
12051205
<div className='flex flex-wrap items-center gap-2 text-xs text-gray-300'>
12061206
<span className='rounded border border-white/15 bg-[#111827] px-2 py-1'>
12071207
Alliance: {allianceColor.toUpperCase()}
@@ -1335,7 +1335,7 @@ function MatchApp() {
13351335
</section>
13361336

13371337
<section className={sectionClass}>
1338-
<div className='flex items-end justify-between gap-3'>
1338+
<div className='select-none flex items-end justify-between gap-3'>
13391339
<div>
13401340
<p className='text-xs uppercase tracking-wide text-gray-300'>Match Timer</p>
13411341
<p className='font-mono text-4xl font-semibold text-[#48c55c]'>
@@ -1426,7 +1426,7 @@ function MatchApp() {
14261426
</section>
14271427

14281428
<section className={sectionClass}>
1429-
<div className='flex flex-wrap items-center justify-between gap-2'>
1429+
<div className='select-none flex flex-wrap items-center justify-between gap-2'>
14301430
<h2 className='text-base font-semibold text-[#48c55c]'>Timeline</h2>
14311431
<p className='text-xs text-gray-300'>
14321432
Elapsed {elapsedSec.toFixed(1)}s / {MATCH_TOTAL_SEC}s
@@ -1439,7 +1439,7 @@ function MatchApp() {
14391439
onPointerMove={handleTimelinePointerMove}
14401440
onPointerUp={stopTimelineScrub}
14411441
onPointerCancel={stopTimelineScrub}
1442-
className={`relative mt-2 h-24 cursor-ew-resize overflow-hidden rounded-xl border border-white/15 bg-[#0f1522] ${
1442+
className={`select-none relative mt-2 h-24 cursor-ew-resize overflow-hidden rounded-xl border border-white/15 bg-[#0f1522] ${
14431443
scrubbingTimeline ? 'ring-2 ring-[#48c55c]/60' : ''
14441444
}`}>
14451445
<div className='absolute inset-0 bg-gradient-to-r from-[#141b2a] via-[#101826] to-[#0c1320]' />
@@ -1500,7 +1500,7 @@ function MatchApp() {
15001500
/>
15011501
</div>
15021502

1503-
<div className='mt-2 flex flex-wrap items-center gap-4 text-[11px] text-gray-300'>
1503+
<div className='select-none mt-2 flex flex-wrap items-center gap-4 text-[11px] text-gray-300'>
15041504
<p>Drag timeline to jump to any time.</p>
15051505
<p className='flex items-center gap-1.5'>
15061506
<span className='inline-block size-2 rounded-sm bg-emerald-400/90' />
@@ -1513,8 +1513,8 @@ function MatchApp() {
15131513
</div>
15141514
</section>
15151515
<section className={sectionClass}>
1516-
<h2 className='text-base font-semibold text-[#48c55c]'>Endgame</h2>
1517-
<p className='mt-1 text-xs text-gray-300'>Climbing Result</p>
1516+
<h2 className='select-none text-base font-semibold text-[#48c55c]'>Endgame</h2>
1517+
<p className='select-none mt-1 text-xs text-gray-300'>Climbing Result</p>
15181518
<div className='select-none mt-2 flex flex-wrap gap-2'>
15191519
<MultiButton
15201520
onChange={setTeleTower}
@@ -1531,7 +1531,7 @@ function MatchApp() {
15311531
Expanded Match Content
15321532
</summary>
15331533

1534-
<div className='mt-4 grid gap-4 md:grid-cols-2'>
1534+
<div className='select-none mt-4 grid gap-4 md:grid-cols-2'>
15351535
<div>
15361536
<p className='text-xs uppercase tracking-wide text-gray-300'>Driver Quality</p>
15371537
<div className='select-none mt-1 flex flex-wrap gap-2'>
@@ -1589,7 +1589,7 @@ function MatchApp() {
15891589
</div>
15901590
</div>
15911591

1592-
<div className='mt-4 grid gap-4 md:grid-cols-2'>
1592+
<div className='select-none mt-4 grid gap-4 md:grid-cols-2'>
15931593
<div>
15941594
<p className='text-xs font-semibold uppercase tracking-wide text-gray-300'>
15951595
Fouls
@@ -1734,7 +1734,7 @@ function MatchApp() {
17341734
className='select-none rounded-lg bg-[#48c55c] px-4 py-3 text-sm font-semibold text-black'>
17351735
Submit Match
17361736
</button>
1737-
<p className='text-xs text-gray-300'>
1737+
<p className='select-none text-xs text-gray-300'>
17381738
Queue: <span className='font-semibold text-white'>{queue.length}</span>
17391739
</p>
17401740
<button

client/src/apps/pit/PitApp.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function PitApp() {
221221
<h2 className='text-lg font-semibold text-[#48c55c]'>
222222
Drivebase
223223
</h2>
224-
<div className='mt-3 flex flex-wr ap gap-2'>
224+
<div className='mt-3 flex flex-wrap gap-2'>
225225
<MultiButton
226226
onChange={setDrivebase}
227227
value={drivebase}
@@ -243,8 +243,12 @@ function PitApp() {
243243
SDS
244244
</summary>
245245
<MultiButton
246-
className='mr-5'
247-
onChange={setSDSSwerveType}
246+
className='mr-2'
247+
onChange={(value: SDSSwerveModuleType) => {
248+
setSDSSwerveType(value);
249+
setWPCSwerveType(undefined);
250+
setOtherSwerveType(undefined);
251+
}}
248252
value={sdsSwerveType}
249253
labels={['MK4', 'MK4i', 'MK4n', 'MK4c','MK5n','MK5i']}
250254
values={['mk4','mk4i','mk4n','mk4c','mk5n','mk5i']}
@@ -260,8 +264,12 @@ function PitApp() {
260264
L. = Legacy ; F. = Flipped
261265
</p>
262266
<MultiButton
263-
className='mr-5'
264-
onChange={setWPCSwerveType}
267+
className='mr-2'
268+
onChange={(value: WPCSwerveModuleType) => {
269+
setWPCSwerveType(value);
270+
setSDSSwerveType(undefined);
271+
setOtherSwerveType(undefined);
272+
}}
265273
value={wpcSwerveType}
266274
labels={['L. Nonflipped', 'L. Flippedbelt', 'L. Flippedgear', 'SwerveX','SwerveX F.','X2/X2', 'X2S/X2S']}
267275
values={['lNonFlipped','lFlippedBelt','lFlippedGear','swerveX','swerveXF','x2x2', 'x2Sx2S']}
@@ -271,7 +279,11 @@ function PitApp() {
271279
</details>
272280
<MultiButton
273281
className='mt-5'
274-
onChange={setOtherSwerveType}
282+
onChange={(value: OtherSwerveModuleType) => {
283+
setOtherSwerveType(value);
284+
setSDSSwerveType(undefined);
285+
setWPCSwerveType(undefined);
286+
}}
275287
value={otherSwerveType}
276288
labels={['Other']}
277289
values={['other']}

server/scripts/addFakeData.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,11 @@ for (let matchNumber = 1; matchNumber <= matchCount; matchNumber++) {
524524
? choose(['stuck', 'tipped', 'comms', 'mechanism', 'other'])
525525
: 'None',
526526
driverQuality: weightedChoice([
527-
['great', 0.2 + profile.tele * 0.35],
528-
['good', 0.35],
529-
['ok', 0.3],
530-
['rough', 0.15 + (1 - profile.tele) * 0.2],
527+
['Poor', 0.2 + profile.tele * 0.35],
528+
['Rough', 0.35],
529+
['Ok', 0.3],
530+
['Good', 0.15 + (1 - profile.tele) * 0.2],
531+
['Great', 0.1],
531532
]),
532533
defenseProvided: weightedChoice([
533534
['None', 0.45],

0 commit comments

Comments
 (0)