Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Remove tools/services.md and add stackblitz.md #2529

Closed
wants to merge 68 commits into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Apr 19, 2018

  • Remove tools/services page
  • Add page about P3 on Stackblitz & link to a starter app
  • Add stackblitz page to Resources menu

Fixes #2523

@ghost ghost changed the title update to use unpkg 3.0-ify tools/services.md Apr 19, 2018
@ghost ghost requested a review from arthurevans April 19, 2018 00:35
@ghost ghost assigned arthurevans Apr 19, 2018
@ghost
Copy link
Author

ghost commented Apr 19, 2018

Will need to update paths when 3.0 is released

@ghost ghost added the 3.0 update label Apr 19, 2018
Arthur Evans and others added 5 commits April 30, 2018 15:29
@ghost ghost changed the title 3.0-ify tools/services.md Remove tools/services.md and add stackblitz.md May 1, 2018
@ghost
Copy link
Author

ghost commented May 1, 2018

@arthurevans @e111077 wdyt


<!-- toc -->

[StackBlitz](https://stackblitz.com) is an online IDE for web apps. You can use StackBlitz to prototype and preview Polymer elements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"online IDE for web apps" sounds possibly a bit intimidating to me for what we're using it for. "editor for web projects"?


index.html
```
<script src="index.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <script> tag shouldn't be necessary. If we do want the script tag, I think we need the whole <head> section for Stackblitz to behave. @e111077?

window.customElements.define('my-app', MyApp);
```

* StackBlitz compiles all es6 modules down to es5 for compatibility with older browsers. Make sure you run `custom-elements-es5-adapter.js` (part of the [`@webcomponents/webcomponentsjs` suite of polyfills](https://github.com/webcomponents/webcomponentsjs) from your `index.html` file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just include this above, with an inline HTML comment?


[StackBlitz](https://stackblitz.com) is an online IDE for web apps. You can use StackBlitz to prototype and preview Polymer elements.

Here's a [template for Polymer 3.0 to help you get started](https://stackblitz.com/edit/start-polymer3?file=start-polymer3.js).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we embed this demo right here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably not use <stack-blitz>.

  1. it currently does not have functionality to open an existing online project (should be trivial to implement)
  2. without the contents being cached, it'll ask the user to DL 2MB+

I make sure to lazy load it when we use it in <demo-tabs>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a shot, it looked a bit rubbish. More work required when I have more time

index.html {.caption}
```
<!-- StackBlitz compiles es6 code to es5 for compatibility with older browsers. Include the custom elements adapter to make your code work in ES6-native browsers. -->
<script src="node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need the webcomponents-bundle.js / webcomponents-lite.js?

@ghost
Copy link
Author

ghost commented May 1, 2018

  • needs arthur lgtm


[StackBlitz](https://stackblitz.com) is an online editor for web projects. You can use StackBlitz to prototype and preview Polymer elements.

Here's a [template for Polymer 3.0 to help you get started](https://stackblitz.com/edit/start-polymer3?file=start-polymer3.js).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick note: having this link means that you'll have to eventually update the project to have 3.0.0 as a dependency instead of the prerelease

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also in polymer pre.13 we will need to change webcomponents-lite to webcomponents-bundle and webcomponentsjs to version 2.0.0-0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@arthurevans arthurevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise LGTM.

@@ -0,0 +1,39 @@
---
title: "Polymer 3.0 on Stackblitz"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stackblitz => StackBlitz


Here's a [template for Polymer 3.0 to help you get started](https://stackblitz.com/edit/start-polymer3?file=start-polymer3.js).

Please note that at the time of writing, StackBlitz requires an `index.js` and `index.html` file to be present in the root folder for all JavaScript projects. You'll need to import your app shell from `index.js`, like so:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we mention using this to prototype elements, I think "app shell" is too specific.

Maybe "... import JavaScript modules, such as elements, from index.js:"

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no and removed cla: yes labels May 1, 2018
@ghost
Copy link
Author

ghost commented May 1, 2018

fml

@ghost ghost closed this May 1, 2018
@ghost ghost mentioned this pull request May 1, 2018
@ghost ghost deleted the 3-0-tools-services branch May 5, 2018 02:50
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants