Skip to content

Commit acda734

Browse files
authored
Merge pull request #14 from adjust/v111
Version 1.1.1
2 parents e165864 + 1845240 commit acda734

File tree

13 files changed

+588
-13
lines changed

13 files changed

+588
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### Version 1.1.1 (30th January 2024)
2+
3+
#### Fixed
4+
- Fixed issue with CTA size when banner body contains long text.
5+
6+
---
7+
18
### Version 1.1.0 (25th January 2024)
29

310
#### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To <a id="loading-snippet">load Smart Banner SDK through CDN</a> paste the follo
3232
</script>
3333
```
3434

35-
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-smart-banner-1.1.0.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-smart-banner-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
35+
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-smart-banner-1.1.1.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-smart-banner-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
3636

3737

3838
## <a id="initialization">Initialization</a>

demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"test": "echo \"Error: no test specified\" && exit 1"
1111
},
1212
"dependencies": {
13-
"@adjustcom/smart-banner-sdk": "^1.1.0",
13+
"@adjustcom/smart-banner-sdk": "^1.1.1",
14+
"@adjustcom/smart-banner-sdk-layout": "^3.0.7",
1415
"lorem-ipsum": "^2.0.8"
1516
},
1617
"author": "Adjust GmbH",

demo/src/demo.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { App } from './view/app';
2+
import { VisualTest } from './view/components/visual-tests';
23
import 'assets/styles.module.scss';
34

45
let appRoot = document.getElementById('app_root');
@@ -9,4 +10,5 @@ if (!appRoot) {
910
document.body.appendChild(appRoot);
1011
}
1112

12-
App().render(appRoot);
13+
// App().render(appRoot);
14+
VisualTest().render(appRoot)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { SmartBannerLayoutFactory, SmartBannerViewData } from '@adjustcom/smart-banner-sdk-layout';
2+
3+
import json from '../../../../../fake-data/visual-tests/texts-lengths-in-small-banner.json';
4+
5+
const records = json as any as SmartBannerViewData[];
6+
7+
export function VisualTest(banners: SmartBannerViewData[] = records) {
8+
const render = (appRoot: HTMLElement) => {
9+
10+
const root = document.createElement('div');
11+
root.style.height = '100vh';
12+
root.style.display = 'flex';
13+
root.style.flexDirection = 'column';
14+
root.style.flexWrap = 'wrap';
15+
16+
const elements: HTMLElement[] = [];
17+
18+
for (let record of banners) {
19+
const elem = document.createElement('div');
20+
elem.style.padding = '3px';
21+
22+
const preview = SmartBannerLayoutFactory.createPreview(record);
23+
preview.render(elem);
24+
25+
elements.push(elem);
26+
}
27+
28+
root.append(...elements);
29+
appRoot.append(root);
30+
};
31+
32+
return { render };
33+
}

demo/tsconfig.demo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"./../typings.d.ts"
66
],
77
"compilerOptions": {
8-
"allowJs": true
8+
"allowJs": true,
9+
"resolveJsonModule": true,
910
}
1011
}

demo/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (env, args) => ({
2121
}),
2222
],
2323
resolve: {
24-
extensions: ['.ts', '.js', '.scss', '.svg'],
24+
extensions: ['.ts', '.js', '.scss', '.svg', '.json'],
2525
alias: {
2626
assets: path.resolve(__dirname, 'assets'),
2727
},

0 commit comments

Comments
 (0)