@autobusal/routes-order 1.37.0 → 1.37.1
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/Found/Route/Route.tsx +26 -10
- package/Found/Route/styles.ts +43 -7
- package/package.json +1 -1
package/Found/Route/Route.tsx
CHANGED
|
@@ -249,7 +249,7 @@ const Route = ({ data, type, date, passengers, t, onSave, children }: Props): JS
|
|
|
249
249
|
per-person fare - so this says how many people it covers
|
|
250
250
|
rather than the "per adult" line the competitors use, which
|
|
251
251
|
would be wrong here for any multi-passenger search. */ }
|
|
252
|
-
<PriceNotice>
|
|
252
|
+
<PriceNotice className="price-notice">
|
|
253
253
|
{ t(
|
|
254
254
|
passengers === 1
|
|
255
255
|
? 'routes_order.step2.route.price_notice_single'
|
|
@@ -270,20 +270,36 @@ const Route = ({ data, type, date, passengers, t, onSave, children }: Props): JS
|
|
|
270
270
|
}
|
|
271
271
|
onClick={ () => (isExternalRedirect && bookOnUrl ? window.open(bookOnUrl, '_blank', 'noopener,noreferrer') : onSave(data)) }
|
|
272
272
|
/>
|
|
273
|
+
|
|
274
|
+
{ /* Claude - 2026-08-31 (Ferjolt: "the 'Details' should be right
|
|
275
|
+
below 'Select route' button, in the same line as 'Taxes
|
|
276
|
+
included - total for 1 passenger'").
|
|
277
|
+
|
|
278
|
+
MOVED INTO the price block rather than positioned from outside
|
|
279
|
+
it. It used to be a sibling of the whole Trip, which put it in
|
|
280
|
+
a different container from the tax note it now shares a line
|
|
281
|
+
with - and two elements in different flex contexts cannot be
|
|
282
|
+
put on one row without pulling one of them out of flow, which
|
|
283
|
+
breaks the moment the note wraps to two lines in a longer
|
|
284
|
+
language.
|
|
285
|
+
|
|
286
|
+
Here they are simply the last two children of one flex row:
|
|
287
|
+
the note takes the space it needs on the left, this sits hard
|
|
288
|
+
right under the button, and a wrap moves both together. */ }
|
|
289
|
+
<ButtonDetails
|
|
290
|
+
className="details-toggle"
|
|
291
|
+
type="button"
|
|
292
|
+
aria-expanded={ details }
|
|
293
|
+
onClick={ () => setDetails(!details) }
|
|
294
|
+
>
|
|
295
|
+
{ details ? <HiChevronUp /> : <HiChevronDown /> }
|
|
296
|
+
{ t('routes_order.step2.route.details') }
|
|
297
|
+
</ButtonDetails>
|
|
273
298
|
</Price>
|
|
274
299
|
</Trip>
|
|
275
300
|
|
|
276
301
|
{ children }
|
|
277
302
|
|
|
278
|
-
<ButtonDetails
|
|
279
|
-
type="button"
|
|
280
|
-
aria-expanded={ details }
|
|
281
|
-
onClick={ () => setDetails(!details) }
|
|
282
|
-
>
|
|
283
|
-
{ details ? <HiChevronUp /> : <HiChevronDown /> }
|
|
284
|
-
{ t('routes_order.step2.route.details') }
|
|
285
|
-
</ButtonDetails>
|
|
286
|
-
|
|
287
303
|
<Details $open={ details }>
|
|
288
304
|
{ /* Edited: Ferjolt Ozuni - Date: 2026-08-01
|
|
289
305
|
Amenities were a separate full-width block under the card.
|
package/Found/Route/styles.ts
CHANGED
|
@@ -485,6 +485,31 @@ export const Price = styled.div`
|
|
|
485
485
|
|
|
486
486
|
& > *:nth-child(3) { order: 2; }
|
|
487
487
|
|
|
488
|
+
/*
|
|
489
|
+
* Claude - 2026-08-31: the note and the details toggle share the second
|
|
490
|
+
* row - note left, toggle hard right under the button.
|
|
491
|
+
*
|
|
492
|
+
* BY CLASS, not by nth-child, and that is the point of the change. The
|
|
493
|
+
* rules above count positions, and this block has a conditional first
|
|
494
|
+
* child: a route with a dynamic-price drop renders a struck-through
|
|
495
|
+
* <Standard> before the amount, which shifts every index by one. Adding
|
|
496
|
+
* two more positional rules on top of that would have been two more things
|
|
497
|
+
* to be silently wrong on exactly the cards carrying an offer.
|
|
498
|
+
*
|
|
499
|
+
* These come after the positional rules and match on the same specificity,
|
|
500
|
+
* so they win where they overlap and leave the rest alone.
|
|
501
|
+
*/
|
|
502
|
+
& > .price-notice {
|
|
503
|
+
order: 3;
|
|
504
|
+
flex: 1 1 auto;
|
|
505
|
+
flex-basis: auto;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
& > .details-toggle {
|
|
509
|
+
order: 4;
|
|
510
|
+
flex: 0 0 auto;
|
|
511
|
+
}
|
|
512
|
+
|
|
488
513
|
@media (min-width: 768px) {
|
|
489
514
|
flex: 0 0 165px;
|
|
490
515
|
flex-direction: column;
|
|
@@ -497,6 +522,18 @@ export const Price = styled.div`
|
|
|
497
522
|
order: initial;
|
|
498
523
|
flex-basis: auto;
|
|
499
524
|
}
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
* The same reset for the two matched by class. This cell is a COLUMN
|
|
528
|
+
* above 768px, so both simply stack under the button in source order -
|
|
529
|
+
* which is where the details toggle has always sat on a wide screen,
|
|
530
|
+
* just now inside the price cell rather than under the whole card.
|
|
531
|
+
*/
|
|
532
|
+
& > .price-notice,
|
|
533
|
+
& > .details-toggle {
|
|
534
|
+
order: initial;
|
|
535
|
+
flex-basis: auto;
|
|
536
|
+
}
|
|
500
537
|
}
|
|
501
538
|
`;
|
|
502
539
|
|
|
@@ -703,16 +740,15 @@ export const ButtonDetails = styled.button`
|
|
|
703
740
|
color: ${ props => props.theme.font.faded };
|
|
704
741
|
|
|
705
742
|
/*
|
|
706
|
-
* Claude - 2026-08-31 (Ferjolt: "'Details' should be
|
|
707
|
-
* 'Select route' button
|
|
743
|
+
* Claude - 2026-08-31 (Ferjolt: "the 'Details' should be right below
|
|
744
|
+
* 'Select route' button, in the same line as 'Taxes included - total for 1
|
|
745
|
+
* passenger'").
|
|
708
746
|
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
712
|
-
* where the thumb already is after reading the price.
|
|
747
|
+
* No self-alignment any more: it is a child of the price row now, and that
|
|
748
|
+
* row's own rules put it hard right on the second line, beside the tax
|
|
749
|
+
* note. Only the size is set here.
|
|
713
750
|
*/
|
|
714
751
|
@media (max-width: 639px) {
|
|
715
|
-
align-self: flex-end;
|
|
716
752
|
font-size: ${ props => props.theme.size.xs };
|
|
717
753
|
}
|
|
718
754
|
|