Commit Graph

394 Commits

Author SHA1 Message Date
gnezim 439624244d Audit DayTabs behavior per TZ 4.1.13.1 (7-day window, paging, padding, active range)
- Fix daysAfter: 7→14 in OnlineBoardSearchPage (TZ active range is today-1 to today+14)
- Add inactive padding tabs on the last page when it has fewer than 7 slots; right-arrow stays disabled on last page regardless (TZ §4.1.13.1)
- Add aria-current="date" to active DayTabButton for accessible highlight (TZ requires visual highlight + screen-reader signal)
- Add auto-scroll via scrollIntoView when selectedDate changes externally (URL-driven day navigation)
- Convert DayTabButton to forwardRef to support the activeBtnRef scroll anchor
- 9 new TZ-labelled tests locking in all the above behaviors
2026-04-21 22:45:08 +03:00
gnezim 38a512004f Add scroll-to-current-time + auto-expand-nearest on Online-Board today's tab per TZ 4.1.13
- New findNearestFlightIndex helper (scrollToCurrentTime.ts) with 5 unit tests
- FlightList: lock scroll-to-nearest behind a ref so live SignalR updates
  don't yank the viewport back to the auto-selected flight after the user
  has manually scrolled elsewhere
- OnlineBoardSearchPage integration tests: verify today/future/past tab
  selection logic via findClosestFlightId (the id-based variant already
  wired to FlightList.initialCurrentFlightId)
2026-04-21 22:39:33 +03:00
gnezim a5c64a2270 Search execution, cancellation, and error handling per TZ §4.1.10/11/12
- AbortController wired through ApiClient → api functions → hooks so a
  new search immediately aborts the previous in-flight request (§4.1.12)
- cancel() exposed from useOnlineBoard / useScheduleSearch; Escape key
  triggers it while the loader is showing (§4.1.12)
- «Отменить поиск» button rendered during loading; hides when idle (§4.1.12)
- data-searching attribute on search pages disables filter/tabs/breadcrumbs
  via pointer-events:none CSS while a search is running (§4.1.10/11)
- Submit buttons disabled for 30 s after each search (hardcoded, per TZ
  §4.1.10/11: «не должно выноситься в конфигурационный файл»)
- Per-status error messages: BOARD.ERROR-TIMEOUT / ERROR-4XX / ERROR-5XX
  replace the generic LOAD-FAILED-MESSAGE (§4.1.10.1/11.1)
- Error messages added to all 9 locales
- 8 new tests: 3 for AbortController wiring, 5 for error banners + cancel
  button visibility
2026-04-21 22:08:11 +03:00
gnezim c509131649 Tighten filter validation per TZ 4.1.9.3 + 4.1.9.4 2026-04-21 21:50:46 +03:00
gnezim 66518a6f0c Enforce 1h minimum gap on time-range slider per TZ 4.1.9 Tables 12/14 2026-04-21 21:36:07 +03:00
gnezim 83951d4292 Add clear-button (X) to filter fields per TZ 4.1.9 Tables 11/12/14
- OB flight-number: X was always visible; now conditionally rendered only
  when the field has a value (hides when empty)
- OB flight-date and route-date: add X button next to calendar icon,
  clears date state and hides itself when empty
- Schedule outbound and return date-range calendars: same inline X pattern
- CSS: .calendar-input-wrapper + .calendar-clear-btn added to both SCSS
  files (absolute-positioned left of the calendar icon)
- CityAutocomplete: already correct (CSS show/hide via has-value class)
- 21 new tests across OnlineBoardFilter, ScheduleFilter, CityAutocomplete
  (aria-label, visibility toggling, click-to-clear); all 640 pass
2026-04-21 20:05:53 +03:00
gnezim 8f4d5fcaa2 Add Current-Week label substitution to Schedule date-range picker per TZ 4.1.9 Table 14 2026-04-21 19:59:27 +03:00
gnezim 04a3d9cd7c Add Today/Tomorrow label substitution to Online-Board date picker per TZ 4.1.9 Tables 11+12 2026-04-21 19:55:36 +03:00
gnezim b27ee2ae8b Verify start-page info-section content per TZ Table 8 + Table 9
Add assertion tests confirming both OnlineBoardStartPage and ScheduleStartPage
render the required info-section headings and content blocks per TZ specifications.

OnlineBoardStartPage (TZ Table 8):
- Heading: 'Что такое Онлайн-табло и что я могу в нем увидеть?'
- 4 info blocks: Актуальная информация, Информация об услугах, Купить билет, Расписание

ScheduleStartPage (TZ Table 9):
- First heading: 'Как пользоваться расписанием?' + 4 info blocks
- Second heading: 'Возможности расписания' + 2 capabilities blocks
- Blocks 5-6 (Купить билет, Расписание) now rendered under capabilities heading

Tests added:
- OnlineBoardStartPage: 6 new assertions (4.1.6-R-info-heading through 4.1.6-R-popular)
- ScheduleStartPage: 8 new assertions (4.1.7-R-info-heading-1 through 4.1.7-R-popular)
2026-04-21 19:25:45 +03:00
gnezim fbb84fc0da Align Flight-Map first-entry toggle defaults with TZ 4.1.1-R14/R21 2026-04-21 19:22:16 +03:00
gnezim 4b6cb5bc40 Audit popular-requests Top-4 click-prefill against TZ §4.1.5 (6 kinds)
Board kinds (Arrival, Departure, Route, FlightNumber): buildOnlineBoardPrefillState
now emits date=today in every case; OnlineBoardStartPage wires it through to
OnlineBoardFilter via initialDate.

Schedule one-way (Route/Schedule): click handler now includes dateFrom/dateTo
= current ISO week (Mon-Sun) in the transient prefill written to sessionStorage.

Schedule round-trip (RouteWithBack/Schedule): additionally includes
returnDateFrom/returnDateTo = next ISO week.

SchedulePrefillState extended with the four new optional date fields;
yyyymmddToDate helper added to ScheduleStartPage; currentWeekBounds /
nextWeekBounds helpers implement the TZ week-boundary logic.

Nine new §4.1.5-labeled tests (4 unit + 5 integration) added; existing
prefill-state tests updated to expect the new date fields. All 55 tests pass.
2026-04-21 19:19:38 +03:00
gnezim c3c1f830b9 Wire first-entry geolocation into Schedule start page (TZ 4.1.1-R8) 2026-04-21 19:11:57 +03:00
gnezim b023cb922a Wire first-entry geolocation + mobile time default into Online-Board start page (TZ 4.1.1) 2026-04-21 19:09:34 +03:00
gnezim 9aed10c281 Add useIsMobileViewport hook + Online-Board mobile time defaults per TZ 4.1.1-R4/R5 2026-04-21 19:03:54 +03:00
gnezim bc0b10bd8e Migrate flights-map to shared useGeoCityDefault hook 2026-04-21 19:01:07 +03:00
gnezim a6454dc07f Fix exactOptionalPropertyTypes errors in cross-section store hydration initializers 2026-04-21 18:04:36 +03:00
gnezim 47fee9d7b5 Wire cross-section filter hydration into Board/Schedule/Map per TZ 4.1.8 Table 10 2026-04-21 18:03:27 +03:00
gnezim 2fe5364187 Verify TZ Table 7 Карта полетов breadcrumb = [Главная] only 2026-04-21 17:53:16 +03:00
gnezim 266a6f910c Fix ScheduleDetailsPage happy-path breadcrumb + add missing breadcrumb tests
The final (success) return branch was passing a hardcoded 1-item breadcrumb
array instead of the computed `breadcrumbs` variable, so the leaf crumb built
from ?request= was silently dropped for loaded flights. Loading/error/empty
branches were already correct. Adds 3 unit tests to lock the wiring.
2026-04-21 17:50:57 +03:00
gnezim 5728861c5c Schedule search → details links emit ?request= + details page shows leaf breadcrumb (TZ §4.1.2 row 11, §4.1.4 rows 11-13) 2026-04-21 17:45:36 +03:00
gnezim 1821f7f78e Add TZ Table 7 mode-specific leaf breadcrumb + clickable back-to-search link on Online-Board details
Per TZ §4.1.4 Table 7 rows 6–8, the details page now builds a 3-item
breadcrumb trail [Home, Онлайн-Табло, <leaf>] where <leaf> is mode-aware:
- flight: "Номер рейса: SU-1234" (hyphen per TZ)
- departure: "Вылет: {station}"
- arrival: "Прилет: {station}"
- route: "Маршрут: {dep}-{arr}"

The leaf crumb is a clickable link back to the source search page with
time-range preserved in the URL. Share-link entries (no ?request=) get
only [Home, Онлайн-Табло] with no leaf.

Breadcrumbs component updated to allow last-item links (was suppressed),
since TZ explicitly requires the leaf to be navigatable.

CONFLICT (deferred to Task 16): TZ row 6 says departure/arrival leaf
should show both dep+arr cities; parentRequest only carries one station,
so only that station is shown. Departure/arrival search returns flights
to many arrival cities — "both cities" makes no sense at search-mode level.
2026-04-21 17:35:49 +03:00
gnezim bcaf3ab503 Verify Flight-Map title 'Карта полетов' per TZ Table 6 rows 1-3 2026-04-21 17:27:18 +03:00
gnezim df4ac19f7d Branch schedule details title by direct vs connecting per TZ Table 6 rows 11-13 2026-04-21 17:24:16 +03:00
gnezim f03562e4cd Align Online-Board page titles with TZ Table 6 (сегодня/завтра/ДД.ММ.ГГГГ date display)
- Add formatDateForTitle helper: returns today/tomorrow labels or dd.MM.yyyy
- Switch all search page title builders to use formatDateForTitle; descriptions keep dd.MM.yyyy
- FLIGHT-DETAILS title now uses routeCities (no date) per TZ rows 6-8; adds TITLE-NO-ROUTE fallback for SSR when cities not yet loaded
- buildFlightDetailsSeoFromId accepts optional cityNames param
- Update ru/en i18n TITLE strings to TZ Table 6 format; add TITLE-NO-ROUTE to all 9 locales
- Tests: 32 cases covering today/tomorrow/arbitrary-date branches and routeCities logic
2026-04-21 17:18:59 +03:00
gnezim 4f840486b8 Consolidate scattered +330/+6mo date-window literals into shared dateWindow module 2026-04-21 17:09:17 +03:00
gnezim 8b22f0601f Use shared detailsRequestParam codec for mini-list parent-request (route + flight kinds) 2026-04-21 16:37:32 +03:00
gnezim 7577e703c2 Close SharePanel on Escape + mark as role=dialog with aria-label (a11y + PrimeNG parity) 2026-04-21 08:32:21 +03:00
gnezim 36db7d3f2e Add aria-label to OnlineBoard search forms (flight-number + route) for a11y 2026-04-21 08:30:25 +03:00
gnezim 3d815fa9e3 Add aria-label to Schedule search forms (a11y discoverable forms) 2026-04-20 23:08:55 +03:00
gnezim fd101819af Add aria-invalid to flight-number input when error is present (a11y) 2026-04-20 23:07:12 +03:00
gnezim 9948bcd3dc Add role=alert to filter validation tooltips so errors are announced to screen readers 2026-04-20 22:34:25 +03:00
gnezim 5d5a403bf0 Add role=status + aria-live=polite to SignalR connection status badges (a11y) 2026-04-20 22:25:37 +03:00
gnezim 22d9fca5b2 Add role=alert/status to error+not-found banners across details + search pages (a11y) 2026-04-20 22:24:05 +03:00
gnezim 590a8aac14 Add aria-pressed to active DayTab + WeekTab buttons (a11y) 2026-04-20 22:12:00 +03:00
gnezim 8679a7ecc7 i18n WeekTabs aria-labels (was hardcoded English) using existing A11Y-PREV/NEXT-PAGE keys 2026-04-20 22:07:32 +03:00
gnezim e8701eb5b7 Add aria-hidden to decorative arrow-icon spans in OnlineBoardFilter accordion headers 2026-04-20 22:03:35 +03:00
gnezim 841099287a Add aria-expanded to FlightSchedule + FlightDetailsAccordion accordion triggers (a11y) 2026-04-20 21:53:14 +03:00
gnezim 32d80332ff Add aria-expanded to accordion role=button triggers (a11y parity for filter + SearchHistory) 2026-04-20 21:51:47 +03:00
gnezim 5aae968610 Clarify IOperatingBy.flightNumber doc — it IS used for code-share display 2026-04-20 21:31:45 +03:00
gnezim 81a6a296fd Drop redundant 'px' on zero-value paddings (CSS lint cleanup) 2026-04-20 21:04:09 +03:00
gnezim db0365833f Tokenize 12px padding literal in FlightsMiniList 2026-04-20 20:50:04 +03:00
gnezim 9f5ebae747 Tokenize font-weight: normal → fonts.$font-regular across 3 SCSS files 2026-04-20 20:48:27 +03:00
gnezim 24da3ab9d1 Add tooltips to schedule direction-switch buttons (Angular pTooltip parity) 2026-04-20 20:37:06 +03:00
gnezim 90f6af41dd Tokenize 8px/10px/12px padding+gap literals in ScheduleDetailsPage + FlightDetailsAccordion + FlightSchedule 2026-04-20 20:22:46 +03:00
gnezim 93926dedb8 Tokenize 8px margin literals in ScheduleStartPage + ScheduleFlightBody 2026-04-20 20:16:22 +03:00
gnezim 9250b5633a Tokenize remaining literals: BoardDetailsHeader padding/gap, WeekTabs/DayQuickPick padding, TimeGroup font-weight:300 → $font-light 2026-04-20 20:12:03 +03:00
gnezim d942cb55bc Add IFlyWarning component shown on details pages for SU5801-5948 flights (Angular parity) 2026-04-20 20:02:45 +03:00
gnezim 28c88873a5 Tokenize 10px/12px button padding literals in FlightCard + ScheduleFlightBody + CityPickerPopup 2026-04-20 19:57:00 +03:00
gnezim 00be15a51a Tokenize 12px/8px padding literals in DayTabs + details-panels (Angular parity) 2026-04-20 19:55:07 +03:00
gnezim c820cc6baf Render FullRouteTimeline on Schedule details for multi-leg flights (Angular parity) 2026-04-20 19:53:21 +03:00