ecwyne / meteor-polymer-elements

Add polymer-elements to Meteor project
https://atmospherejs.com/ecwyne/polymer-elements
59 stars 14 forks source link

Breaks Android and iOS, but runs in a browser #10

Closed salamanders closed 9 years ago

salamanders commented 9 years ago

This plugin works in the browser, but when I try to run it in an android or iOS emulator, no luck. I think it is trying to download all of the files for all of the components?

meteor create oneshot
cd oneshot

mkdir server
meteor remove insecure autopublish
meteor add accounts-ui accounts-google
meteor add ecwyne:polymer-elements
meteor run # Throws in all the polymer files
meteor install-sdk android
meteor add-platform android 
meteor run android     
salamanders commented 9 years ago

I'm a bit suspicious - not installing the content into /public means everything will be parsed and sent to the front end through meteor. Which is redundant with polymer's method, yes?

ecwyne commented 9 years ago

These issues are likely mitigated with the newest release of the package.

@salamanders can you confirm this?

salamanders commented 9 years ago

I'm getting in the Android emulator: Page loads. Polymer content doesn't. chrome://inspect shows Failed to load resource: the server responded with a status of 404 (Not Found) http://meteor.local/bower_components/webcomponentsjs/webcomponents.js

Running via localhost:3000 it shows fine.

<head>

  <meta charset="utf-8">
  <title>TEST</title>

  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-capable" content="yes">

  <link rel="import" href="/bower_components/font-roboto/roboto.html">
  <link rel="import" href="/bower_components/core-header-panel/core-header-panel.html">
  <link rel="import" href="/bower_components/paper-checkbox/paper-checkbox.html">

  <style shim-shadowdom>
    html,body {
      font-family: 'RobotoDraft', sans-serif;
    }
    html, body {
      height: 100%;
      margin: 0;
    }
    .core-header {
      height: 60px;
      line-height: 60px;
      font-size: 18px;
      padding: 0 10px;
      background-color: #4F7DC9;
      color: #FFF;
    }
    .content {
      padding: 20px;
      height: 2000px;
      background: linear-gradient(rgb(214, 227, 231), lightblue);
    }
  </style>
</head>

<body>

<core-header-panel flex>
  <div class="core-header">
     TEST
  </div>
  <div class="content">
    CONTENT: {{> hello}}
  </div>
</core-header-panel>

</body>

<template name="hello">
  <button>Click Me</button>
  <p>You've pressed the button {{counter}} times.</p>
  <paper-checkbox checked></paper-checkbox> is a checkbox.
</template>
ecwyne commented 9 years ago

@salamanders is this related to https://github.com/meteor/meteor/issues/2822 ?

salamanders commented 9 years ago

Don't think so. Not currently building with this in a project, so can't repro. Will reopen if encountered again.