FlightDetailBottomSheetComponent
TheFlightDetailBottomSheetComponent provides a mobile-optimized bottom sheet interface for displaying detailed flight information. It’s used on mobile and tablet viewports as an alternative to the desktop FlightDetailPanelComponent.
Overview
This component appears as a Material Design bottom sheet that slides up from the bottom of the screen when a flight is selected on mobile devices. It displays comprehensive flight data including operator information, aircraft details, position, and performance metrics.The component automatically adjusts its grid layout based on viewport size (mobile vs tablet) for optimal readability.
Component API
Selector
Inputs
The component receives data through Angular Material’sMAT_BOTTOM_SHEET_DATA injection token:
The ICAO24 identifier of the flight to display
Optional aircraft photo data including thumbnail URL, photographer, and attribution
Outputs
The component dismisses itself by callingMatBottomSheetRef.dismiss(). The parent component can subscribe to the afterDismissed() observable to detect when the sheet closes.
Public Methods
Closes the bottom sheet and dismisses it with reason
'user'Properties
Computed signal that looks up the current flight from the store by
flightIdComputed grid row height for operator section:
- Mobile:
'3:1' - Tablet:
'5:1'
Computed grid row height for aircraft info section:
- Mobile:
'10:11' - Tablet:
'5:3'
Computed grid row height for flight info section:
- Mobile:
'11:12' - Tablet:
'6:4'
Usage
The component is opened byFlightsShellComponent when a flight is selected on mobile/tablet viewports:
FlightsShellComponent usage
Layout Structure
The bottom sheet displays flight data in a responsive grid layout:Operator Section
- Airline logo or operator name
- Flight callsign
- Origin country
Aircraft Section
- Aircraft photo (if available)
- Model and type code
- Registration number
- Owner information
Position & Flight Data
- Current position (latitude/longitude)
- Altitude (barometric and geometric)
- Velocity and heading
- Vertical rate
- Squawk code
- On-ground status indicator
Responsive Behavior
The component usesViewportService to detect device type and adjusts its grid layout accordingly:
| Viewport | Grid Ratio | Behavior |
|---|---|---|
| Mobile | Vertical layout | Sections stack vertically with tall aspect ratios |
| Tablet | Mixed layout | More compact with adjusted proportions |
Integration with Store
The component integrates withFlightsStoreService to:
- Look up flight data by ICAO24 ID
- React to flight data updates in real-time
- Access the complete flights array through signals
Signal-based lookup
Close Behavior
The bottom sheet can be closed:- User initiated: Tap close button → dismisses with
'user'reason - Flight switch: When selecting a different flight → dismisses with
'switch-flight'reason - Viewport change: When resizing to desktop → dismisses with
'viewport-change'reason
Dependencies
Related Components
- FlightDetailPanelComponent - Desktop equivalent
- FlightsShellComponent - Opens this bottom sheet
- AirlineDisplayComponent - Displays airline logos
- FlightStatusLedComponent - Shows flight status indicator
Source
~/workspace/source/src/app/features/flights/flight-detail-bottom-sheet/flight-detail-bottom-sheet.component.ts