Commit Graph

93 Commits

Author SHA1 Message Date
gnezim 9ff034d19f OnlineBoard search: render Купить/Онлайн регистрация in expanded row
Angular's board search results expansion shows [Купить] [Онлайн
регистрация] [Детали рейса]. React only rendered Details. Added a
`renderActions` prop on FlightCard/FlightList so the feature layer
can inject extra buttons without the ui layer importing from
features. OnlineBoardSearchPage wires it to FlightActions with
showShare=false (the row already has a dedicated share icon).

Visibility rules fall through to canBuyTicket / canRegister (same
as BoardDetailsHeader), so cancelled/past flights still hide the
Buy button and carriers without a registrationUrl still hide the
Online Registration button — matching Angular's per-flight gating.

Integration test mocks useAppSettings to avoid requiring the real
ApiClientProvider in flight-search.test.tsx.
2026-04-20 18:27:31 +03:00
gnezim 8de1f197fd Replace padding/margin 10px/20px literals with vars.$space-m/$space-xl tokens (3 files) 2026-04-20 18:17:41 +03:00
gnezim 9778d6ba8a Replace 8px padding/gap/margin literals with vars.$space-s2 across 7 SCSS files 2026-04-20 18:04:33 +03:00
gnezim 50885b7afd font-size 22px/30px → fonts.$font-size-xl2/$font-size-xxl across 4 SCSS files 2026-04-20 17:54:01 +03:00
gnezim 623f282f56 font-size 18px/20px → fonts.$font-size-xl/$font-size-xl1 across 16 SCSS files (brand palette parity) 2026-04-20 17:52:31 +03:00
gnezim 93684c1bbb font-size: 14px → fonts.$font-size-m across 15 SCSS files (brand palette parity) 2026-04-20 17:48:12 +03:00
gnezim 41ed2bdc1d font-size: 12px → fonts.$font-size-s across 21 SCSS files (brand palette parity) 2026-04-20 17:37:03 +03:00
gnezim 2037ba0141 Swap font-weight 400/700 literals for fonts.$font-regular/$font-bold tokens across 8 SCSS files 2026-04-20 17:25:01 +03:00
gnezim 4a653849f4 Final font-weight: 500 sweep: 9 more SCSS files use fonts.$font-medium (brand palette parity) 2026-04-20 17:21:22 +03:00
gnezim 43a7380059 Replace font-weight: 500 literals with fonts.$font-medium across 8 SCSS files (brand palette parity) 2026-04-20 17:08:06 +03:00
gnezim 40c3ed62fa OperatorLogo: add round-variant paths for 12 missing carriers (RO/DP/OM/KL/AY/DL/OK/JU/UX/BT/AM/AR) 2026-04-20 15:56:51 +03:00
gnezim ea25f5c017 Replace 4 rgba(46,87,255,0.04/0.06/0.08) hover tints with $blue-extra-light / $blue-icon (brand palette) 2026-04-20 15:50:30 +03:00
gnezim aecf06c829 TimeGroup day-change: render as chip with blue-icon border + blue-light text (Angular day-change-square parity) 2026-04-20 15:46:50 +03:00
gnezim 3f04ade411 CityPickerPopup: #ffffff → colors.$white (brand palette parity) 2026-04-20 15:44:24 +03:00
gnezim f823aafb35 FlightCard/FlightDetailsAccordion: #8a8a8a → $light-gray (brand palette parity) 2026-04-20 15:28:15 +03:00
gnezim daf3ed35a5 FlightStatus label colors: match icon palette (green for in-flight/arrived, orange for delayed) 2026-04-20 14:24:04 +03:00
gnezim 3c869198d6 FlightStatus icon colors: use brand palette (Angular statusColors parity) 2026-04-20 14:22:29 +03:00
gnezim b4aea2a6fd FlightList: empty state matches Angular page-empty-list (icon + title + text, desktop/mobile layouts) 2026-04-20 13:56:54 +03:00
gnezim d7a9ae5d79 FlightCard schedule grid: match Angular schedule-list-flight-header (80px number, minmax(45,240)px stations) 2026-04-20 13:52:59 +03:00
gnezim c28cfc2fd3 ScrollUpButton: 40×40, extra-blue bg, right: 30px / bottom: 80px (Angular parity) 2026-04-20 13:03:23 +03:00
gnezim 0e74d9d196 FlightCard schedule mode + DayGroupedFlightList headers: number column 80→60px (Angular parity) 2026-04-20 13:00:51 +03:00
gnezim a4e99fee64 FlightCard: row grid [60px|120px|100px|1fr|85-145px|120px|1fr|10px] + padding 15px/20px (Angular parity) 2026-04-20 12:59:28 +03:00
gnezim b306127cfc Breadcrumbs: middle-crumb links in solid white, only last crumb faded (Angular parity) 2026-04-20 12:55:41 +03:00
gnezim b7a358dadc CityAutocomplete item: 48px row height + bottom divider (Angular parity) 2026-04-20 12:42:04 +03:00
gnezim d2f418f494 Show CityAutocomplete clear (×) button for any truthy value, not just resolved cities
Previously hasValue was computed from `selectedCity` — which required
the dictionaries to be loaded AND the raw code to map to a known city.
If the dictionaries were slow or the user typed free text, the clear
button stayed hidden and the filter became stuck with no way to wipe it.

Angular's CityAutocomplete uses `[ngClass]="{'has-value': city}"` on
the raw two-way-bound model, so any truthy value reveals the clear
button. Mirror that: `hasValue` is now true whenever the resolved
city, the outbound code, or the AutoComplete inputValue (free text or
suggestion object) is truthy.
2026-04-20 11:55:48 +03:00
gnezim 706b8f444b Clear the last 19 lint warnings — make check now passes clean
- BuyTicketButton / FlightsMiniListItem: narrow firstLeg/lastLeg with
  explicit null guards (throw / return '').
- FlightSchedule.tsx: `match?.[1] ?? iso` for the regex capture.
- OnlineBoardSearchPage + schedule/api: `split('T')[0] ?? iso` for the
  date-prefix extraction.
- ServicesPanel: icon lookup uses a third '' fallback instead of `!`.
- buildCountryCityRows: explicit `break` if cities[i] is undefined.
- useAppSettings: `match?.[1]` null-check before parseInt.
- datetime/index.ts: guard bare HH:MM capture groups together.
- ScheduleDetailsCatchAllRoute: drop unused `t` + useTranslation import.
- ScheduleDetailsPage.tsx: prefix unused `getLegs` with underscore.
- 4 seo/json-ld tests: drop now-redundant eslint-disable comments.
- calendarRange.test + api.test: prefix unused helper names with `_`.

Warning count: 19 → 0. make check (typecheck + lint + test) exits 0.
2026-04-20 09:30:34 +03:00
gnezim 8d409572b7 Drop 11 more non-null assertions across 5 files
- ErrorPage.tsx: FALLBACK_CONFIG literal instead of ERROR_CONFIG["500"]!
- ErrorBoundary.tsx: hoist FALLBACK_RU / FALLBACK_EN to consts so
  pickStrings returns them without the bang.
- routesToPolylines.ts: narrow spider-mode block on filterState.departure
  truthy; guard each route-code lookup.
- FlightsMapStartPage.tsx: narrow firstRoute/depCode/arrCode together
  instead of asserting each individually.
- OnlineBoardDetailsPage.tsx: IIFE over legs[i+1] for TransferBar;
  `_canonicalOrigin` prefix for currently-unused prop.

Warning count: 30 → 19.
2026-04-20 09:22:49 +03:00
gnezim 298f007463 Drop 11 non-null assertions in api.ts, DayGroupedFlightList, FlightCard
Regex capture groups and array boundary accesses replaced with nullish
fallbacks / explicit guards. Warning count: 41 → 30.
2026-04-20 09:19:14 +03:00
gnezim 1fc96b603e Drop 14 non-null assertions in ScheduleFlightBody + CityPickerPopup
- ScheduleFlightBody.tsx: hms regex capture uses `?? "0"` fallback;
  inline IIFEs expose last-leg and transfer-to-next in narrowed scope.
- CityPickerPopup.tsx: row.city1/city2/city1Airports are lifted into
  locals so the narrowing survives into JSX event handler closures.

Warning count: 55 → 41.
2026-04-20 08:33:33 +03:00
gnezim a982d9a669 Fix lint: route sessionStorage through shared storage module, drop dead imports
- storage.ts: add sessionStore wrapper (getRaw/setRaw/delete/clear) so
  transientPrefill + ScheduleStartPage tests don't trip the
  no-restricted-globals rule.
- transientPrefill.ts + ScheduleStartPage.test.tsx: use sessionStore.
- closestFlight.ts: hoist bracket-index key so no newline-before-[ ASI.
- Test files: hoist typeof import(...) into named type alias with
  type-only namespace import.
- Drop unused imports: FlightCard (Link, languageToLocale),
  OnlineBoardDetailsPage (operatingCarrier),
  ScheduleSearchPage (FlightList, inline import() types),
  PageLayout (FeedbackButton).
- Drop react-hooks/exhaustive-deps disable comments for a rule not
  registered in eslint.config.js.
2026-04-20 08:15:21 +03:00
gnezim 68e7b3e9ec Normalize 4/6/8px radii to vars.$border-radius (3px) across 5 SCSS files 2026-04-20 07:10:12 +03:00
gnezim 3577745477 Style Breadcrumbs as Angular's translucent pill (dark-blue-opacity bg, 3/10 padding) 2026-04-20 06:40:33 +03:00
gnezim da3f2713ac CityPickerPopup: gps-button uses $blue-light / $white / $blue-light--hover tokens 2026-04-20 06:38:14 +03:00
gnezim b6ed257a6a ErrorPage: use design tokens for code/input/focus colors 2026-04-20 06:35:33 +03:00
gnezim ef845f587f Final token sweep: pastel blues, blues, greys to design tokens (8 files) 2026-04-20 06:14:55 +03:00
gnezim b8ab5af8aa Token cleanup for TimeGroup + FlightCard (#333/#f37b09/#fff/#e68200/#5b6b80 → tokens) 2026-04-20 06:08:43 +03:00
gnezim c8257baf26 Replace border-radius: 4px with vars.$border-radius (3px) to match Angular 2026-04-20 04:26:19 +03:00
gnezim 627f155f87 Replace #022040/#1a3a5c navy hex with colors.$blue-dark token 2026-04-20 04:21:47 +03:00
gnezim 2d7646d793 Replace custom brand hex with design tokens ($blue, $orange, $green, $red) across 13 SCSS files 2026-04-20 04:19:43 +03:00
gnezim fb82fc6ad1 Replace pastel-blue dividers/bg with $border and $blue-extra-light tokens (6 files) 2026-04-20 03:58:13 +03:00
gnezim 3bae0ee98f Replace hardcoded #e0e0e0 borders with $border-input and normalize $border-radius to 3px 2026-04-20 03:54:06 +03:00
gnezim 4aadab25e9 Normalize body-text #222 to colors.$text-color across 10 SCSS files 2026-04-20 03:50:54 +03:00
gnezim 1cd39b094e Match Angular per-carrier OperatorLogo aspect ratios (120x31 SU, etc) 2026-04-20 03:30:15 +03:00
gnezim 1156dd6f90 Replace hardcoded #6b7280/#1c2330/#8a8a8a greys with design tokens ($light-gray/$text-color) 2026-04-20 03:02:10 +03:00
gnezim c4ba540e1c Normalize caption/time-note greys to $light-gray (#657282) across FlightCard, CityAutocomplete, details accordion, board header, and filter 2026-04-20 02:57:41 +03:00
gnezim 7cf15f11ab Match Angular typography: terminal-link color, board header padding/grid 2026-04-20 02:31:27 +03:00
gnezim 74d7c119d5 Match Angular FlightCard grid tracks, tablet overrides, and search-frame radius 2026-04-20 02:28:09 +03:00
gnezim 353bd62296 Render branded 404 page on invalid URLs and malformed params
Replace the inline 'Invalid parameters' fallbacks and the framework's
default '404' text with the existing Aeroflot 404 screen. Unknown
locale, malformed flight/route/station params, and unmatched URLs
(including bad paths like onlineboard//route/...) now all land on the
same ErrorPage component.
2026-04-20 02:23:16 +03:00
gnezim 0e9191be05 Match Angular PageLayout: 24px tablet padding, single title wrapper 2026-04-20 02:07:51 +03:00
gnezim ddc8e9f6dc Wire Вы искали sidebar accordion to live search history
Each schedule + onlineboard search now records itself into the
existing useSearchHistory localStorage hook, with a structured
params payload (departure/arrival/dates/flightNumber). The
SearchHistory sidebar renders the rich Angular layout: clock or
plane icon, optional sub-title (e.g. "Расписание рейсов, в одну
сторону"), city pair, and date range, with inbound dates appended
for round-trip searches.
2026-04-20 00:12:58 +03:00