Skip to content

Commit 2fc499e

Browse files
authored
Merge pull request #605 from Stackla/feat/add-support-for-expanded-tile-variation
ref: add support for skeleton loader, and expanded tile variants
2 parents 98f143d + 5c5229a commit 2fc499e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+159
-167
lines changed

esbuild.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const getTemplatesEndpoint = () => {
2424
return "https://templates.teaser.stackla.com"
2525
case "development":
2626
return "http://localhost:4003"
27+
default:
28+
return "http://localhost:4003"
2729
}
2830
}
2931

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"vitest": "^3.2.4"
103103
},
104104
"dependencies": {
105-
"@stackla/widget-utils": "workspace:*",
105+
"@stackla/widget-utils": "^4.1.2",
106106
"apicache": "^1.6.3",
107107
"cookie-parser": "^1.4.7",
108108
"cors": "^2.8.5",

tests/fixtures/widget.options.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const widgetOptions: SharedWidgetOptions["widgetOptions"] & {
2828
show_votes: true,
2929
show_cross_sellers: true,
3030
show_add_to_cart: true,
31-
show_carousel_grouping: false
31+
show_carousel_grouping: false,
32+
expanded_tile_variant: "horizontal"
3233
},
3334
tile_options: {
3435
show_comments: true,

types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { Sdk, SwiperData } from "@stackla/widget-utils/types"
1+
export { ISdk, SwiperData } from "@stackla/widget-utils/types"
22
export { BaseConfig } from "./IBaseConfig"
33
export { IWidgetSettings } from "./IWidgetSettings"

widgets/blankcanvas/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export const config: {
7171
// Whether to show the add to cart
7272
show_add_to_cart: true,
7373
// Whether to show the carousel grouping
74-
show_carousel_grouping: true
74+
show_carousel_grouping: true,
75+
expanded_tile_variant: "horizontal"
7576
},
7677
inlineTile: {
7778
// Whether to show the navigation options of the tile

widgets/carousel/inline-carousel-swiper.loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Sdk } from "types"
1+
import { ISdk } from "types"
22
import { initializeInlineSwiper } from "../utils/inline-swiper.loader"
33

4-
declare const sdk: Sdk
4+
declare const sdk: ISdk
55

66
export function initializeInlineSwiperListeners() {
77
initializeInlineSwiper({

widgets/carousel/widget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Sdk } from "types"
1+
import { ISdk } from "types"
22

3-
declare const sdk: Sdk
3+
declare const sdk: ISdk
44

55
import { loadWidget } from "@stackla/widget-utils"
66
import { initializeInlineSwiperListeners } from "./inline-carousel-swiper.loader"

widgets/libs/vertical-expanded-tiles/base.template.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ISdk } from "@stackla/widget-utils"
2-
import { StoryExpandedTile } from "./tile.template"
2+
import { VerticalExpandedTile } from "./tile.template"
33
import { createElement } from "@stackla/widget-utils"
44

55
export function StoryExpandedTiles(sdk: ISdk) {
@@ -8,7 +8,7 @@ export function StoryExpandedTiles(sdk: ISdk) {
88
const navigationArrowsEnabled = show_nav
99

1010
return (
11-
<div class="expanded-tile-wrapper" variation="story">
11+
<div class="expanded-tile-wrapper" variation="vertical">
1212
<div class="swiper swiper-expanded story-expanded">
1313
<div class="align-center">
1414
<div class="swiper-expanded-button-wrapper">
@@ -31,7 +31,7 @@ export function StoryExpandedTiles(sdk: ISdk) {
3131
data-id={tile.id}
3232
data-yt-id={tile.youtube_id || ""}
3333
data-tiktok-id={tile.tiktok_id || ""}>
34-
<StoryExpandedTile sdk={sdk} tile={tile} />
34+
<VerticalExpandedTile sdk={sdk} tile={tile} />
3535
</div>
3636
))}
3737
</div>

0 commit comments

Comments
 (0)