Restore Schedule inline-expand to match Angular (revert TIRREDESIGN-4 forward-ship)

The Schedule row had been switched to navigate-on-click in commit
a26adad as a forward-looking implementation of TIRREDESIGN-4. Angular
on the live test stand still uses inline-expand (verified 2026-04-23
on flights.test.aeroflot.ru — clicking a row toggles
.flight-list-item.selected and renders schedule-search-result-flight-
body / connecting-flight-body inline). React must not lead Angular —
restore the inline-expand wiring so both stays in lockstep.

Drops the schedule-specific branch in FlightList that disabled
expandable and wired onClick to navigate. The expand-via-onFlightClick-
or-renderExpandedBody rule applies uniformly to Board and Schedule
rows again, exactly like before commit a26adad.
This commit is contained in:
2026-04-23 14:59:13 +03:00
parent e52d673658
commit 72e6149320
+11 -14
View File
@@ -116,22 +116,19 @@ export const FlightList: FC<FlightListProps> = ({
<FlightCard
flight={flight}
direction={direction}
// TIRREDESIGN-4: on Schedule the whole row navigates straight to
// the flight-details card — no inline accordion expand. Board
// rows keep the legacy expand-on-click behaviour (extra ETA /
// actual-time details exposed inline next to the row).
expandable={direction === "schedule" ? false : Boolean(onFlightClick)}
// Both Board and Schedule rows expand inline on click, matching
// Angular's `list-scheduled-flight` / `list-flight` (verified
// 2026-04-23 against the live test site — the spec's "no
// expanded view" change in TIRREDESIGN-4 is forward-looking
// and Angular hasn't migrated yet, so React must not lead).
// Schedule's expanded body is supplied by `renderExpandedBody`
// from DayGroupedFlightList (ScheduleFlightBody — timeline,
// leg rows, transfer pills, action buttons). Navigation to
// the details page is triggered by `Детали рейса` inside it.
expandable={Boolean(onFlightClick) || Boolean(renderExpandedBody)}
initialExpanded={flight.id === initialCurrentFlightId}
{...(onFlightClick
? {
onViewDetails: () => onFlightClick(flight),
// When expandable is off we need a row-level onClick to
// trigger navigation — rowClickable in FlightCard depends
// on `expandable || Boolean(onClick)`.
...(direction === "schedule"
? { onClick: () => onFlightClick(flight) }
: {}),
}
? { onViewDetails: () => onFlightClick(flight) }
: {})}
{...(renderExpandedBody ? { renderExpandedBody } : {})}
{...(renderActions ? { renderActions } : {})}