Polymer / shop

The Shop app
https://shop.polymer-project.org/
986 stars 494 forks source link

Update deps; add drawer state to store #196

Closed keanulee closed 5 years ago

keanulee commented 5 years ago

Oops broke the tabs. Fix in progress...

keanulee commented 5 years ago

I reset the commit history completely since the previous ones were just broken. Also tried to make the formatting of HTML template strings consistent:

return html`
<h1></h1>
${condition ? html`
  <p></p>
` : condition2 ? html`
  <section></section>
` : null}`;
frankiefu commented 5 years ago

There is a strange behavior when running in Safari. When I clicked on the category tab (Men's Outerwear) the order of the tabs changed, like this:

screen shot 2018-10-11 at 11 55 59 am
keanulee commented 5 years ago

Looks like for Safari, polymer serve transforms object spread to a shim that uses Object.defineProperty(). This changes the ordering of keys, but only in Safari:

> obj = {a:1,b:2,c:3}
< {a: 1, b: 2, c: 3}
> Object.defineProperty(obj, 'a', { value:2 })
< {b: 2, c: 3, a: 2}

Could use Object.assign() instead of spread. This isn't new to this PR though so wouldn't block on this.