@autobusal/routes-order 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ All notable changes to this package are documented here. This project follows
6
6
  > Note: 1.8.0 was published without a changelog entry. The gap is left as-is
7
7
  > rather than reconstructed after the fact.
8
8
 
9
+ ## 1.13.0
10
+
11
+ The operator's rating on each result card. The operator's rather than the
12
+ route's: a single route rarely has enough published reviews to clear the
13
+ display threshold, and a card with a rating beats one without.
14
+
9
15
  ## [1.12.0] - 2026-08-01
10
16
 
11
17
  ### Removed
@@ -4,7 +4,7 @@ import { HiOutlineArrowNarrowRight, HiOutlineDocumentText } from 'react-icons/hi
4
4
  import { BiHourglass } from 'react-icons/bi';
5
5
  import { RiBus2Line } from 'react-icons/ri';
6
6
  import { formatDuration, splitPrice } from '../refine';
7
- import { Button, RouteFeature, Policy } from '@autobusal/common';
7
+ import { Button, RouteFeature, Policy, Rating } from '@autobusal/common';
8
8
  import { Container, SpecialOffer, FavoriteStop, Trip, Company, Location, Stop, Iso, Time, Price, Amount, Decimals, Currency, PriceNotice, LinkCompany, Details, Detail, ButtonPolicy, TitleDetail, LinkRoute, FeaturesItems } from './styles';
9
9
  import { FoundData } from '@autobusal/providers/types/routes';
10
10
 
@@ -55,6 +55,14 @@ const Route = ({ data, type, passengers, t, onSave, children }: Props): JSX.Elem
55
55
  <Trip>
56
56
  <Company>
57
57
  <LinkCompany to={ bookOnUrl ?? data.operator.link } target="_blank" rel="noopener noreferrer" title={ data.operator.company }><img src={ data.operator.logo_url || LOGO_FALLBACK } onError={ (e) => { e.currentTarget.onerror = null; e.currentTarget.src = LOGO_FALLBACK; } } alt={ data.operator.company } /></LinkCompany>
58
+
59
+ { /* Edited: Ferjolt Ozuni - Date: 2026-08-03
60
+ The OPERATOR's rating rather than this route's: a single route
61
+ rarely has enough published reviews to clear the display
62
+ threshold, and a card with a rating beats one without. Renders
63
+ nothing when there is no rating yet, which is why a brand-new
64
+ operator does not look like a badly rated one. */ }
65
+ <Rating rating={ data.operator.rating } size="small" t={ t } />
58
66
  </Company>
59
67
 
60
68
  <Location>
@@ -63,6 +63,17 @@ export const Trip = styled.div`
63
63
  export const Company = styled.div`
64
64
  flex-basis: 100%;
65
65
 
66
+ /**
67
+ * Edited: Ferjolt Ozuni - Date: 2026-08-03
68
+ * A column now, because the operator's rating sits under the logo. Left
69
+ * as a bare block it would have laid the stars out beside the logo and
70
+ * eaten the 185px this cell gets on desktop.
71
+ */
72
+ display: flex;
73
+ flex-direction: column;
74
+ gap: 6px;
75
+ align-items: flex-start;
76
+
66
77
  @media (min-width: 1024px) {
67
78
  flex: 0 0 185px;
68
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"