Skip to content

Commit

Permalink
fix: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons committed Jan 15, 2024
1 parent ba2af84 commit dc537ad
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import '../navigation';
const playStory = async (trigger: string, canvasElement: HTMLElement): Promise<void> => {
const canvas = within(canvasElement);

await waitForComponentsReady(() =>
canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'),
await waitForComponentsReady(
() => canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'),
);

const button = canvas.getByTestId('navigation-trigger');
Expand Down
4 changes: 2 additions & 2 deletions src/components/navigation/navigation/navigation.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import '../../button';
const playStory = async ({ canvasElement }: StoryContext): Promise<void> => {
const canvas = within(canvasElement);

await waitForComponentsReady(() =>
canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'),
await waitForComponentsReady(
() => canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'),
);

const button = canvas.getByTestId('navigation-trigger');
Expand Down
58 changes: 31 additions & 27 deletions src/components/notification/notification.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ const simpleNotification = (
title-content="${title}"
disable-animation
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() => ((notification as SbbNotificationElement).disableAnimation = disabelAnimation),
{ once: true },
),
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() => ((notification as SbbNotificationElement).disableAnimation = disabelAnimation),
{ once: true },
),
)}
>
This is a ${type} notification.
Expand All @@ -116,13 +117,14 @@ const DefaultTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
Expand All @@ -136,13 +138,14 @@ const MultipleNotificationsTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
Expand All @@ -160,13 +163,14 @@ const SlottedTitleTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
<span slot="title">Slotted title</span>
Expand Down
5 changes: 2 additions & 3 deletions src/components/timetable-row/timetable-row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,8 @@ export class SbbTimetableRowElement extends LitElement {

// add prefix "new" if quay was changed
const changedQuayPrefix = departure?.quayChanged ? `${i18nNew[this._language.current]} ` : '';
return `${changedQuayPrefix}${
this._getQuayTypeStrings()?.long
} ${departure?.quayFormatted}, `;
return `${changedQuayPrefix}${this._getQuayTypeStrings()
?.long} ${departure?.quayFormatted}, `;
};

const meansOfTransportText =
Expand Down

0 comments on commit dc537ad

Please sign in to comment.