Skip to content

Commit

Permalink
Merge pull request #14 from adjust/v111
Browse files Browse the repository at this point in the history
Version 1.1.1
  • Loading branch information
YaraMatkova authored Jan 30, 2024
2 parents e165864 + 1845240 commit acda734
Show file tree
Hide file tree
Showing 13 changed files with 588 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Version 1.1.1 (30th January 2024)

#### Fixed
- Fixed issue with CTA size when banner body contains long text.

---

### Version 1.1.0 (25th January 2024)

#### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To <a id="loading-snippet">load Smart Banner SDK through CDN</a> paste the follo
</script>
```

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.
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.


## <a id="initialization">Initialization</a>
Expand Down
3 changes: 2 additions & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@adjustcom/smart-banner-sdk": "^1.1.0",
"@adjustcom/smart-banner-sdk": "^1.1.1",
"@adjustcom/smart-banner-sdk-layout": "^3.0.7",
"lorem-ipsum": "^2.0.8"
},
"author": "Adjust GmbH",
Expand Down
4 changes: 3 additions & 1 deletion demo/src/demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { App } from './view/app';
import { VisualTest } from './view/components/visual-tests';
import 'assets/styles.module.scss';

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

App().render(appRoot);
// App().render(appRoot);
VisualTest().render(appRoot)
33 changes: 33 additions & 0 deletions demo/src/view/components/visual-tests/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { SmartBannerLayoutFactory, SmartBannerViewData } from '@adjustcom/smart-banner-sdk-layout';

import json from '../../../../../fake-data/visual-tests/texts-lengths-in-small-banner.json';

const records = json as any as SmartBannerViewData[];

export function VisualTest(banners: SmartBannerViewData[] = records) {
const render = (appRoot: HTMLElement) => {

const root = document.createElement('div');
root.style.height = '100vh';
root.style.display = 'flex';
root.style.flexDirection = 'column';
root.style.flexWrap = 'wrap';

const elements: HTMLElement[] = [];

for (let record of banners) {
const elem = document.createElement('div');
elem.style.padding = '3px';

const preview = SmartBannerLayoutFactory.createPreview(record);
preview.render(elem);

elements.push(elem);
}

root.append(...elements);
appRoot.append(root);
};

return { render };
}
3 changes: 2 additions & 1 deletion demo/tsconfig.demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"./../typings.d.ts"
],
"compilerOptions": {
"allowJs": true
"allowJs": true,
"resolveJsonModule": true,
}
}
2 changes: 1 addition & 1 deletion demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (env, args) => ({
}),
],
resolve: {
extensions: ['.ts', '.js', '.scss', '.svg'],
extensions: ['.ts', '.js', '.scss', '.svg', '.json'],
alias: {
assets: path.resolve(__dirname, 'assets'),
},
Expand Down
Loading

0 comments on commit acda734

Please sign in to comment.