Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Switch "Edit in Plunker" to use POSTs #7186

Closed
chirayuk opened this issue Apr 22, 2014 · 3 comments
Closed

Switch "Edit in Plunker" to use POSTs #7186

chirayuk opened this issue Apr 22, 2014 · 3 comments
Assignees
Milestone

Comments

@chirayuk
Copy link
Contributor

"Edit in Plunker" used to use POSTs to create pre-seeded examples.  At some point, this was switched over to a scheme that relied on hardcoded regex matching and URLs that are stored on plunker's servers.  This leads to breakages such as issue #7166.  It also makes it really hard for someone who wants to maintain to code to figure out how the whole thing fits together.  We should go back to using POSTs to create plunkers and remove this tight coupling / brittleness.

@chirayuk
Copy link
Contributor Author

See also #7166 (comment)

@chirayuk
Copy link
Contributor Author

If nobody ends up picking this, I'm happy to do it.  I may just not get to it anytime soon so just ping me if/when this becomes urgent.

@petebacondarwin
Copy link
Contributor

I will sort this out this week.

@petebacondarwin petebacondarwin self-assigned this Apr 22, 2014
@petebacondarwin petebacondarwin added this to the 1.3.0-beta.7 milestone Apr 22, 2014
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Apr 22, 2014
The previous solution for opening Plunkers from the docs relied on tight
coupling between the docs site and the plunkr site, in particular the
URL to the example code on the docs server was hard coded in the Plunker
site.

This change goes back to the old POST method of creating a Plunker, but
with a subtle difference: In the very old docs, the content was injected
directly into the example HTML at build time.  This was easy enough to
do as the example actually ran in the current page but also increased
the size of the doc page.

The new examples are run in completely separate iframes. This new version
of showing a Plunker loads the file content for the Plunker from the
server by accessing the example's manifest.json file using $http requests.

This also has the additional benefit that you can now generate plunkers
from examples that are running locally or, frankly, in any folder on any
server, such as personal builds on the Jenkins CI server.

Closes angular#7186
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Apr 22, 2014
The previous solution for opening Plunkers from the docs relied on tight
coupling between the docs site and the plunkr site, in particular the
URL to the example code on the docs server was hard coded in the Plunker
site.

This change goes back to the old POST method of creating a Plunker, but
with a subtle difference: In the very old docs, the content was injected
directly into the example HTML at build time.  This was easy enough to
do as the example actually ran in the current page but also increased
the size of the doc page.

The new examples are run in completely separate iframes. This new version
of showing a Plunker loads the file content for the Plunker from the
server by accessing the example's manifest.json file using $http requests.

This also has the additional benefit that you can now generate plunkers
from examples that are running locally or, frankly, in any folder on any
server, such as personal builds on the Jenkins CI server.

Closes angular#7186
Closes angular#7198
petebacondarwin added a commit that referenced this issue Apr 24, 2014
The previous solution for opening Plunkers from the docs relied on tight
coupling between the docs site and the plunkr site, in particular the
URL to the example code on the docs server was hard coded in the Plunker
site.

This change goes back to the old POST method of creating a Plunker, but
with a subtle difference: In the very old docs, the content was injected
directly into the example HTML at build time.  This was easy enough to
do as the example actually ran in the current page but also increased
the size of the doc page.

The new examples are run in completely separate iframes. This new version
of showing a Plunker loads the file content for the Plunker from the
server by accessing the example's manifest.json file using $http requests.

This also has the additional benefit that you can now generate plunkers
from examples that are running locally or, frankly, in any folder on any
server, such as personal builds on the Jenkins CI server.

Closes #7186
Closes #7198
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants