@autobusal/routes-order 1.31.1 → 1.31.3

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
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.31.3
4
+
5
+ ### Fixed
6
+
7
+ - **The results page's facts/schedule block now renders on the very first screen**, not only once a date has been picked. `/bus-lines/:from/:to` - the dateless URL the sitemap lists and the prerender crawl snapshots - was always on step 1, so `<Sections>` (price/duration/departures + the per-route schedule table + the pair's JSON-LD) never mounted for a single search engine or non-JS crawler. It now also renders on step 1; the bare `/bus-lines` search form (no pair in the URL) is unaffected since it has nothing to fetch.
8
+
9
+ ## 1.31.2
10
+
11
+ ### Changed
12
+
13
+ - **The route card and booking summary show the operator's `display_name`**, not `company` - an operator that set a brand name (`@autobusal/providers` 1.34.0) now appears under that name in search results and the booking summary, same as everywhere else it's now shown.
14
+
3
15
  ## 1.31.1
4
16
 
5
17
  ### Changed
@@ -131,7 +131,7 @@ const Route = ({ data, type, date, passengers, t, onSave, children }: Props): JS
131
131
 
132
132
  <Trip>
133
133
  <Company>
134
- <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>
134
+ <LinkCompany to={ bookOnUrl ?? data.operator.link } target="_blank" rel="noopener noreferrer" title={ data.operator.display_name }><img src={ data.operator.logo_url || LOGO_FALLBACK } onError={ (e) => { e.currentTarget.onerror = null; e.currentTarget.src = LOGO_FALLBACK; } } alt={ data.operator.display_name } /></LinkCompany>
135
135
 
136
136
  { /* Edited: Ferjolt Ozuni - Date: 2026-08-03
137
137
  The OPERATOR's rating rather than this route's: a single route
@@ -240,7 +240,7 @@ const Route = ({ data, type, date, passengers, t, onSave, children }: Props): JS
240
240
  text={
241
241
  <>
242
242
  <RiBus2Line />
243
- { isExternalRedirect ? t('routes_order.step2.route.book_on', { provider: data.operator.company }) : t('routes_order.step2.route.select') }
243
+ { isExternalRedirect ? t('routes_order.step2.route.book_on', { provider: data.operator.display_name }) : t('routes_order.step2.route.select') }
244
244
  </>
245
245
  }
246
246
  onClick={ () => (isExternalRedirect && bookOnUrl ? window.open(bookOnUrl, '_blank', 'noopener,noreferrer') : onSave(data)) }
package/RoutesOrder.tsx CHANGED
@@ -317,16 +317,26 @@ const RoutesOrder = ({ t }: Props): JSX.Element => {
317
317
  />
318
318
  ) }
319
319
 
320
- { /* Edited: Ferjolt Ozuni - Date: 2026-08-03
321
- Roadmap Tier 3.2. Only on the route-choosing screens, and only
322
- once the URL names a real pair: this is the page a search engine
323
- lands on, and it is the one place the block adds anything. Past
324
- step 2 the reader has picked a coach and is filling in passenger
325
- details - facts about the pair are noise at that point.
326
-
327
- It renders nothing at all for a pair with no facts, so a page that
328
- would only have gained an empty box does not gain a box. */ }
329
- { (showStep2 || showStep3) && (
320
+ { /* Edited: Ferjolt Ozuni - Date: 2026-08-03, widened 2026-08-11
321
+ Roadmap Tier 3.2. NOT gated on step2/step3 (as it was originally)
322
+ - it now also renders on showStep1, which is what actually matters:
323
+ /bus-lines/:from/:to is the URL the sitemap lists and the
324
+ prerender crawl snapshots, and that URL is ALWAYS on step 1 - a
325
+ date has not been picked yet, so step2/step3 never mount and the
326
+ block never rendered for a single crawler. A logged human visitor
327
+ benefits the same way a search engine does: price/duration/
328
+ schedule for the pair, visible before they commit to a date.
329
+
330
+ Bare /bus-lines (no :from/:to) leaves both props undefined,
331
+ useGetFacts short-circuits on that, and Sections' own guard
332
+ returns null with nothing fetched - so the generic search form
333
+ gains no empty box underneath it.
334
+
335
+ Past step 2 the reader has picked a coach and is filling in
336
+ passenger details - facts about the pair are noise at that point,
337
+ which is why it still stops at step 3 and does not follow onto
338
+ checkout. */ }
339
+ { (showStep1 || showStep2 || showStep3) && (
330
340
  <Sections
331
341
  from={ fromCity?.slug ?? params.from }
332
342
  to={ toCity?.slug ?? params.to }
@@ -65,10 +65,10 @@ const About = ({ type, step1, data, number, t }: Props): (JSX.Element | null) =>
65
65
  rather than as the operator being identified. */ }
66
66
  <Carrier>
67
67
  { data.operator.logo_url && (
68
- <Logo src={ data.operator.logo_url } alt={ data.operator.company } />
68
+ <Logo src={ data.operator.logo_url } alt={ data.operator.display_name } />
69
69
  ) }
70
70
 
71
- <Operator>{ data.operator.company }</Operator>
71
+ <Operator>{ data.operator.display_name }</Operator>
72
72
  </Carrier>
73
73
 
74
74
  <Leg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.31.1",
3
+ "version": "1.31.3",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"