-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sbb-train-formation): introduce new types and refactoring #3199
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM 👍
Some questions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Nice work! 😃
|
||
@include sbb.if-forced-colors { | ||
--sbb-train-formation-sector-line-color: CanvasText; | ||
} | ||
} | ||
|
||
:host([hide-wagon-label]) { | ||
--sbb-train-formation-wagon-label-display: none; | ||
// TODO: Move to sbb-train-wagon after CSS refactoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably move to global CSS with the CSS refactoring, as we don't want to repeat these SVGs in each SSR rendered component
} | ||
</${unsafeStatic(TAG_NAME)}> | ||
`; | ||
const typeLabel = (): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick; Could probably be extracted into a private method?
Closes #2681
BREAKING CHANGE: The
hide-wagen-label
property of thesbb-train-formation
was removed. Now it automatically doesn't show the label if no label is set on all the wagons.The i18n
i18nClosedCompartmentLabel()
method doesn't takewagonNumber
as an argument anymore but is a constant now.Additionally, there are some visual changes:
sbb-train-wagon
: Theouccpancy
property doesn't default tonone
anymore but tonull
. Please replace the currently undefined occupancy property with the valuenone
.sbb-train-wagon
: Previously for the locomotive the label was not displayed, but now it would, as soon as there is one providedsbb-train-formation
: The inline padding (left / right) was removed but can be set by CSS variable. See documentation.