• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / maps / 25609402468
25%

Build:
DEFAULT BRANCH: main
Ran 09 May 2026 07:08PM UTC
Jobs 1
Files 97
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 May 2026 07:06PM UTC coverage: 25.219% (+0.7%) from 24.488%
25609402468

push

github

web-flow
feat: add Next Departures map layer (#1180)

* feat: add Next Departures map layer

This commit introduces a new map layer that displays public transport
stops (bus and train) based on the current map viewport.

-   Adds `NextDeparturesLayer` to visualize transport stops using NaPTAN
    data.
-   Implements a custom `useNaPTAN` hook with `react-query` for
efficient
    data fetching and caching.
-   Introduces a dynamic `busStopWithBearing` icon that renders an
    SVG-based arrow indicating the direction of the stop.
-   Provides stop details including name, locality, and bearing within
    map popups.
-   Includes unit tests for icon rotation logic.

```mermaid
sequenceDiagram
    participant M as Map (Leaflet)
    participant L as NextDeparturesLayer
    participant H as useNaPTAN Hook
    participant S as Next Departures Service
    participant A as API

    M->>L: Provides Bounds
    L->>H: Request data for bounds
    H->>S: fetchNaPTAN(bounds)
    S->>A: GET /v1/next-departures/search?bbox=...
    A-->>S: JSON NaPTAN Results
    S-->>H: SearchResponse
    H-->>L: results[]
    L->>M: Render Markers with custom Icons
```

* refactor: move bearing logic to BearingIndicator

This change migrates the bus stop bearing display from a dynamic
`DivIcon` string generator to a reusable React component.

- Created `BearingIndicator` component using `react-leaflet` **Tooltip**
  to render direction arrows.
- Simplified `NextDeparturesLayer` by using the standard `busStop` icon
  wrapped in the new indicator.
- Added CSS to remove default **Tooltip** borders, backgrounds, and
  pointers for a clean SVG-only look.
- Updated unit tests to cover the new component and removed obsolete
  icon generation tests.

* refactor: rename BearingIndicator bearing prop

Renames the `bearing` prop to `direction` to improve clarity and
consistency across the codebase. Removes `bearingAngles` from the
icon suite tests to reflect changes in the exported API.

* fix: pass prec... (continued)

178 of 723 branches covered (24.62%)

Branch coverage included in aggregate %.

23 of 57 new or added lines in 9 files covered. (40.35%)

312 of 1220 relevant lines covered (25.57%)

2.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
0.0
src/components/map/layers/custom/NextDeparturesLayer.tsx
13
0.0
src/services/nextDepartures/index.ts
2
0.0
src/hooks/useNaPTAN.ts
2
0.0
src/hooks/useNextDestination.ts
1
0.0
src/components/map/LivePulse.tsx
Jobs
ID Job ID Ran Files Coverage
1 25609402468.1 09 May 2026 07:08PM UTC 97
25.22
GitHub Action Run
Source Files on build 25609402468
  • Tree
  • List 97
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25609402468
  • 4dced1c5 on github
  • Prev Build on main (#25607532072)
  • Next Build on main (#25609675429)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc