Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Commit

Permalink
Fixing horizontal focus in Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ma3a committed Jul 16, 2023
1 parent 7c3d209 commit 50da92e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 36 deletions.
33 changes: 15 additions & 18 deletions src/pages/ManuallyAdjustTimePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,32 @@ export const ManuallyAdjustTimePage: VFC = () => {
</div>

{tableRows.map((row, idx) => (
<div
<Focusable
flow-children="horizontal"
style={{
gridTemplateColumns: '50% 25% 25%',
...TableCSS.table__row,
...rowCorrectnessClass(row),
}}
>
<div>
<Dropdown
rgOptions={gameOptions}
selectedOption={row.appId}
onChange={(e) => onGameChange(idx, e.data)}
/>
</div>
<Dropdown
rgOptions={gameOptions}
selectedOption={row.appId}
onChange={(e) => onGameChange(idx, e.data)}
/>
<div>
{map(row.playTimeTrackedSec, (it) =>
humanReadableTime(it)
)}
</div>
<div>
<TextField
mustBeNumeric
value={row.desiredHours?.toFixed(2)?.toString()}
onChange={(e) =>
onDesiredHoursChange(idx, e.target.value)
}
/>
</div>
</div>
<TextField
mustBeNumeric
value={row.desiredHours?.toFixed(2)?.toString()}
onChange={(e) =>
onDesiredHoursChange(idx, e.target.value)
}
/>
</Focusable>
))}
</div>
</PanelSection>
Expand Down
33 changes: 15 additions & 18 deletions src/pages/SteamlessTimeMigrationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export const SteamlessTimeMigrationPage: VFC = () => {
</div>

{tableRows.map((row, idx) => (
<div
<Focusable
flow-children="horizontal"
style={{
gridTemplateColumns: '20% 15% 25% 15% 15%',
...TableCSS.table__row,
Expand All @@ -132,28 +133,24 @@ export const SteamlessTimeMigrationPage: VFC = () => {
<div>
{humanReadableTime(row.steamlessTimeTrackedSec)}
</div>
<div>
<Dropdown
rgOptions={gameOptions}
selectedOption={row.appId}
onChange={(e) => onGameChange(idx, e.data)}
/>
</div>
<Dropdown
rgOptions={gameOptions}
selectedOption={row.appId}
onChange={(e) => onGameChange(idx, e.data)}
/>
<div>
{map(row.playTimeTrackedSec, (it) =>
humanReadableTime(it)
)}
</div>
<div>
<TextField
mustBeNumeric
value={row.desiredHours?.toFixed(2)?.toString()}
onChange={(e) =>
onDesiredHoursChange(idx, e.target.value)
}
/>
</div>
</div>
<TextField
mustBeNumeric
value={row.desiredHours?.toFixed(2)?.toString()}
onChange={(e) =>
onDesiredHoursChange(idx, e.target.value)
}
/>
</Focusable>
))}
</div>
</PanelSection>
Expand Down

0 comments on commit 50da92e

Please sign in to comment.