Open kyubisation opened 6 months ago
thank you for the specification!
my thoughts:
sbb-pearl-chain:
sbb-pearl-chain-leg:
-Question about 'skipped': 'Skipped' can represent either the departure stop or the arrival stop. Should the leg siblings be aware of each skipped property, or should we implement it with two separate properties: 'departureSkipped' and 'arrivalSkipped'?
@kyubisation . Thanks for writing the specification. It looks good for me in general. Some topics:
@WalkingOS I think it's better to use arrivalSkipped and departureSkipped.
Feature Description
We want to refactor the pearl chain to be more idiomatic to web components.
<sbb-pearl-chain>
:arrival
anddeparture
SbbDateLike | null
null
null
<time>
elements in the Shadow DOM (similar to how it is now)marker: 'static' | 'pulsing' = 'static'
, which controls whether the active state marker should pulse or not (static)data-now
, it should be possible to override the current time<sbb-pearl-chain-leg>
:disruption
,past
and string propertyskip: 'departure' | 'arrival' = 'departure'
arrival
anddeparture
SbbDateLike | null
--sbb-pearl-chain-leg-weight
, which is applied to the flex ruleflex: var(--sbb-pearl-chain-leg-weight, 1) var(--sbb-pearl-chain-leg-weight, 1);
(see example https://stackblitz.com/edit/js-vjmxgz?file=style.css) (This allows just subtracting the departure Date from the arrival Date and setting this value as--sbb-pearl-chain-leg-weight
and flex will automatically calculate width)DOM Examples
Without time being displayed
With time being displayed
Definition of Done