Skip to content

Commit 8dca04f

Browse files
authored
Merge branch 'main' into release-via-github-actions
2 parents 5cfd208 + 0c8c083 commit 8dca04f

File tree

14 files changed

+35
-53
lines changed

14 files changed

+35
-53
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ index.js
88
legacy.html
99
/src/styles/embeds/all.js
1010
/src/styles/host/main.js
11-
selenium-standalone.jar
12-
WDIO.*.xml
1311
test-output.xml
1412
lint-output.xml
1513
/errorShots
1614

1715
docs/src
18-
/selenium-errorshots
1916
_site
2017
.sass-cache
2118
.jekyll-metadata

.npmignore

-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ index.html
55
legacy.html
66
/src/styles/embeds/all.js
77
/src/styles/host/main.js
8-
selenium-standalone.jar
9-
WDIO.*.xml
108
.travis.yml
119
test-output.xml
1210
lint-output.xml
1311
/errorShots
14-
/selenium-errorshots
1512
/test/build
1613
config.json

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.16.0
1+
v18.20.0

.travis.yml

-13
This file was deleted.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# How to contribute
22
We ❤️ pull requests. If you'd like to fix a bug, contribute a feature or
33
just correct a typo, please feel free to do so, as long as you follow
4-
our [Code of Conduct](https://github.com/Shopify/js-buy-sdk/blob/master/CODE_OF_CONDUCT.md).
4+
our [Code of Conduct](https://github.com/Shopify/js-buy-sdk/blob/main/CODE_OF_CONDUCT.md).
55

66
If you're thinking of adding a big new feature, consider opening an
77
issue first to discuss it to ensure it aligns to the direction of the

DEPLOYING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Deploying and publishing BuyButton.js
22

3-
Pull from master and install all dependencies
3+
Pull from main and install all dependencies
44
```
5-
git pull origin master
5+
git pull origin main
66
yarn install
77
```
88
Then run
@@ -18,7 +18,7 @@ Which will do 3 things:
1818
- create a tag
1919

2020
```
21-
git push origin master --tags
21+
git push origin main --tags
2222
```
2323

24-
Then deploy to S3 and NPM via [Shipit](https://shipit.shopify.io/shopify/buy-button-js/production)
24+
Then deploy via [Shipit](https://shipit.shopify.io/shopify/buy-button-js/production)

dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: buy-button-js
33

44
up:
55
- node:
6-
version: v16.16.0
7-
yarn: 1.22.15
6+
version: v18.20.0
7+
yarn: 1.22.22
88

99
commands:
1010
test:

docs/configuration/index.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ <h2>product</h2>
127127
<td>templates</td>
128128
<td>object</td>
129129
<td>mustache templates used to display contents</td>
130-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/product.js">product.js</a></td>
130+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/product.js">product.js</a></td>
131131
<td></td>
132132
</tr>
133133
</tbody>
@@ -237,7 +237,7 @@ <h2>modalProduct</h2>
237237
<td>templates</td>
238238
<td>object</td>
239239
<td>mustache templates used to display contents</td>
240-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/product.js">product.js</a></td>
240+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/product.js">product.js</a></td>
241241
<td></td>
242242
</tr>
243243
</tbody>
@@ -294,7 +294,7 @@ <h2>modal</h2>
294294
<td>templates</td>
295295
<td>object</td>
296296
<td>mustache templates used to display contents</td>
297-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/modal.js">modal.js</a></td>
297+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/modal.js">modal.js</a></td>
298298
<td></td>
299299
</tr>
300300
</tbody>
@@ -407,7 +407,7 @@ <h2>option</h2>
407407
<td>templates</td>
408408
<td>object</td>
409409
<td>mustache templates used to display contents</td>
410-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/option.js">option.js</a></td>
410+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/option.js">option.js</a></td>
411411
<td></td>
412412
</tr>
413413
</tbody>
@@ -495,7 +495,7 @@ <h2>cart</h2>
495495
<td>templates</td>
496496
<td>object</td>
497497
<td>mustache templates used to display contents</td>
498-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/cart.js">cart.js</a></td>
498+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/cart.js">cart.js</a></td>
499499
<td></td>
500500
</tr>
501501
</tbody>
@@ -556,7 +556,7 @@ <h2>lineItem</h2>
556556
<td>templates</td>
557557
<td>object</td>
558558
<td>mustache templates used to display contents</td>
559-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/line-item.js">line-item.js</a></td>
559+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/line-item.js">line-item.js</a></td>
560560
<td></td>
561561
</tr>
562562
</tbody>
@@ -637,7 +637,7 @@ <h2>toggle</h2>
637637
<td>templates</td>
638638
<td>object</td>
639639
<td>mustache templates used to display contents</td>
640-
<td><a href="https://github.com/Shopify/buy-button-js/blob/master/src/templates/toggle.js">toggle.js</a></td>
640+
<td><a href="https://github.com/Shopify/buy-button-js/blob/main/src/templates/toggle.js">toggle.js</a></td>
641641
<td></td>
642642
</tr>
643643
</tbody>

docs/customization/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ var order = [
6868

6969
**Type**: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
7070

71-
**Default value**: dependent on component. [View default values for all components](https://github.com/Shopify/buy-button-js/blob/master/src/defaults/components.js)
71+
**Default value**: dependent on component. [View default values for all components](https://github.com/Shopify/buy-button-js/blob/main/src/defaults/components.js)
7272

7373
### `contents`
7474

@@ -83,7 +83,7 @@ var contents = {
8383
```
8484

8585
**Type**: object
86-
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/master/src/defaults/components.js)
86+
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/main/src/defaults/components.js)
8787

8888
### `text`
8989

@@ -99,7 +99,7 @@ var text = {
9999

100100
**Type**: object
101101

102-
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/master/src/defaults/components.js)
102+
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/main/src/defaults/components.js)
103103

104104
### `styles`
105105

@@ -118,7 +118,7 @@ var styles = {
118118

119119
**Type**: object
120120

121-
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/master/src/defaults/components.js)
121+
**Default value**: dependent on component. [View component defaults](https://github.com/Shopify/buy-button-js/blob/main/src/defaults/components.js)
122122

123123
### `events`
124124

@@ -419,7 +419,7 @@ Determines class names added to elements within components. It is unlikely you w
419419

420420
**Type**: Object
421421

422-
**Default values**: dependent on component. [View defaults](https://github.com/Shopify/buy-button-js/blob/master/src/defaults/components.js).
422+
**Default values**: dependent on component. [View defaults](https://github.com/Shopify/buy-button-js/blob/main/src/defaults/components.js).
423423

424424
### `templates`
425425
Determines the HTML for each element in a component. Templates are specified as strings using the [Mustache](https://github.com/janl/mustache.js/) templating engine, which implements the [Mustache](https://mustache.github.io/) syntax.

docs/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
- `npm run doc-serve`
1818

1919
## Deployment
20-
Changes to the `docs` directory will automatically be deployed to http://shopify.github.io/js-buy-sdk/ when added to `master` (remote).
20+
Changes to the `docs` directory will automatically be deployed to http://shopify.github.io/js-buy-sdk/ when added to `main` (remote).

package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@
9595
"testem": "2.17.0",
9696
"watch": "1.0.2",
9797
"watchify": "3.11.1",
98-
"wdio-dot-reporter": "0.0.6",
99-
"wdio-junit-reporter": "0.1.0",
100-
"wdio-mocha-framework": "0.5.13",
10198
"webdriverio": "4.2.8",
10299
"whatwg-fetch": "3.0.0"
103100
},
@@ -106,11 +103,8 @@
106103
"browserify": "16.3.0",
107104
"morphdom": "2.6.1",
108105
"mustache": "3.0.1",
109-
"sass": "1.54.3",
106+
"sass": "1.69.0",
110107
"shopify-buy": "2.20.0",
111108
"uglify-js": "3.16.3"
112-
},
113-
"resolutions": {
114-
"fibers": "5.0.0"
115109
}
116110
}

readme.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# BuyButton.js
22

33
[BuyButton.js on NPM](https://www.npmjs.com/package/@shopify/buy-button-js)
4-
[![Travis](https://travis-ci.com/Shopify/buy-button-js.svg?branch=master)](https://travis-ci.com/Shopify/buy-button-js)
54

65
BuyButton.js is a highly customizable UI library for adding e-commerce functionality to any website. It allows you to create interactive UI components such as product listings and shopping carts with minimal configuration, while allowing you to easily customize the appearance and behaviour of the components.
76
It uses the [JS Buy SDK](http://shopify.github.io/js-buy-sdk/) to connect to your Shopify store, giving you access to your products and collections.
87

98
To get started, take a look at [the documentation](http://shopify.github.io/buy-button-js/).
109
For questions, suggestions and feedback, please <a href="https://github.com/Shopify/buy-button-js/issues">create an issue</a>.
1110

11+
> [!NOTE]
12+
> The Buy Button JS library will soon be updated to use v3 of the JS Buy SDK library
13+
1214
## Development
1315

1416
```
@@ -54,4 +56,4 @@ yarn run docs
5456

5557
Doc server will run at <http://localhost:4000/buy-button-js/>
5658
Docs source files are located in /docs.
57-
Docs are automatically deployed to gh-pages from master.
59+
Docs are automatically deployed to gh-pages from main.

src/iframe.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import {addClassToElement, removeClassFromElement} from './utils/element-class';
66
const iframeStyles = {
77
width: '100%',
88
overflow: 'hidden',
9-
border: 'none',
9+
// Firefox for some reason sets 'border: medium' even if we set it to 'border: none'
10+
// when using JavaScript to set the style. The workaround is to set individual border styles
11+
'border-width': '0',
12+
'border-style': 'none',
1013
};
1114

1215
const iframeAttrs = {
@@ -91,6 +94,7 @@ export default class iframe {
9194
Object.keys(iframeStyles).forEach((key) => {
9295
this.el.style[key] = iframeStyles[key];
9396
});
97+
9498
Object.keys(iframeAttrs).forEach((key) => this.el.setAttribute(key, iframeAttrs[key]));
9599
this.el.setAttribute('name', config.name);
96100
this.styleTag = null;

test/unit/iframe.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ describe('Iframe class', () => {
117117
assert.calledWith(setWidthStub, constructorConfig.width);
118118
});
119119

120-
it('sets width to 100%, overflow to hidden, and border to none in iframe\'s style', () => {
120+
it('sets width to 100%, overflow to hidden, borderWidth to 0px and borderStyle to none in iframe\'s style', () => {
121121
iframe = new Iframe(parent, constructorConfig);
122122
assert.equal(iframe.el.style.width, '100%');
123123
assert.equal(iframe.el.style.overflow, 'hidden');
124-
assert.include(iframe.el.style.border, 'none');
124+
assert.include(iframe.el.style.borderStyle, 'none');
125+
assert.include(iframe.el.style.borderWidth, '0px');
125126
});
126127

127128
it('disables scrolling, allows transparency, and removes border in iframe\'s attributes', () => {
@@ -507,4 +508,4 @@ describe('Iframe class', () => {
507508
});
508509
});
509510
});
510-
});
511+
});

0 commit comments

Comments
 (0)