| Summary: | Use online editor to edit images | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Tomasz Zarna <tomasz.zarna> | ||||
| Component: | Client | Assignee: | Susan McCourt <susan> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | john.arthorne, ken_walker, libingw, malgorzata.tomczyk, mamacdon, susan | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.5 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 372914, 373443, 373450 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Tomasz Zarna
This would be an excellent cross-site integration example for 0.4. The API for pixlr defaults to using a get, so at least we don't have the "pixlr must host the plug-in to post" issue. If we can set an Orion "site" to be world readable, then getting the image into the editor is not an issue. (In reply to comment #2) > The API for pixlr defaults to using a get, so at least we don't have the "pixlr > must host the plug-in to post" issue. > > If we can set an Orion "site" to be world readable, then getting the image into > the editor is not an issue. Yes, pixlr could read the image directly from the Orion file server. For example: http://pixlr.com/editor/?image=http://orionhub.org/file/k/bundles/org.eclipse.orion.client.core/web/images/orion.png Saving the editor is a problem though. (In reply to comment #3) > Yes, pixlr could read the image directly from the Orion file server. For > example: > > http://pixlr.com/editor/?image=http://orionhub.org/file/k/bundles/org.eclipse.orion.client.core/web/images/orion.png orionhub is world readable, but is orion.eclipse.org? Wouldn't we need some kind of "make my site world readable" option in order to work directly from there? > Saving the editor is a problem though. Don't we just need to be willing to have some weird get-based API for importing a file? using your orionhub example, something like.... http://orionhub.org/import/file/k/bundles/org.eclipse.orion.client.core/web/images/orion.png?image=http://somepixlrurl I'm working on this as way of pushing on bug 372914 and details in bug 349531. So far I'm able to embed pixlr as an iframe into an Orion page. I've got it hooked up to an open with command so that this pixlr page opens on any image. That part is working. You get the breadcrumb, related pages, etc. so that you can edit the image and still be linked to other parts of Orion. (I'll attach a snapshot). Since the page is working from within Orion, I should be able to save. I'm just trying to work out the most general way to get this working so that it's not hardcoded to the pixlr case. I think we can implement a save command that accepts a URL and saves the contents of a GET on that URL back to the file system. Then we would set up pixlr to use our URL. We could use the command/slideout functionality to perform the save. I imagine the slideout might say: Save contents: [some pixlr URL] to: [the orion workspace path] This would be prefilled in, and the user could even fill in a different workspace path on the second parameter in order to achieve "save as" Created attachment 212112 [details]
screenshot so far....
(In reply to comment #6) > screenshot so far.... Sweet! (In reply to comment #6) > Created attachment 212112 [details] > screenshot so far.... Ken and I were talking about comparing images in 0.5. Bug 368984. Susan, is it possible make it a component so that it can be embedded to any DIV, similar to how textview works? I am not sure how to diff two images yet but the bottom line is to render two read-only images in the side by side compare widget. (In reply to comment #8) > (In reply to comment #6) > > Created attachment 212112 [details] > > screenshot so far.... > > Ken and I were talking about comparing images in 0.5. Bug 368984. > Susan, is it possible make it a component so that it can be embedded to any > DIV, similar to how textview works? > I am not sure how to diff two images yet but the bottom line is to render two > read-only images in the side by side compare widget. This bug is about integrating an online image editor into Orion. We aren't trying to show any comparisons here, just invoke another site to do the editing. the plot thickens with respect to "save." I figured out how to get all the communication going between the hosting page and the iframe so that we know where the content has been stored by the iframe. So we've jumped over the "user must download and reupload" hoop but the problem is that we can't do an xhrGet on a URL from another domain. I opened bug 373443 for this. In my opinion, solving that bug would open up a bunch of scenarios that were previously blocked on the "you must save, download, upload, import" workflow. Such as initialzr, css generation, sprite generation, etc. etc. I've released the support for bug 372914 (orion.page.content extension) and a first cut at a pixlr plugin at http://sfmccourt.github.com/plugins/pixlr/pixlrPlugin.html For the plugin to work you have to be running the code in HEAD It doesn't save yet, so one could argue it's pretty useless. On the other hand, it's already illuminating some issues (see blocking bugs) and is helping us prove that an integrator could try to tie together Orion and some pre-existing web app API. When you try to save, you'll get a page telling you where the file was saved. This is basically proving that the communication is in place for the plugin to tell the web app how to tell orion where the data is. The save challenges will be discussed in bug 373443. (In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #6) > > > Created attachment 212112 [details] > > > screenshot so far.... > > > > Ken and I were talking about comparing images in 0.5. Bug 368984. > > Susan, is it possible make it a component so that it can be embedded to any > > DIV, similar to how textview works? > > I am not sure how to diff two images yet but the bottom line is to render two > > read-only images in the side by side compare widget. > > This bug is about integrating an online image editor into Orion. We aren't > trying to show any comparisons here, just invoke another site to do the > editing. Ok, we will just "paste" the 2 versions of the images into the left and right DIVs. To edit the left side, we will just invoke the site. hmmm...tried it in the build. The plugin is working on FF and IE9, but not on Chrome. On Chrome the editor is launched but fails to read the file. I saw this kind of thing happening yesterday when there were some encoding/decoding issues, it could be something like that... (In reply to comment #13) > hmmm...tried it in the build. The plugin is working on FF and IE9, but not on > Chrome. On Chrome the editor is launched but fails to read the file. I saw > this kind of thing happening yesterday when there were some encoding/decoding > issues, it could be something like that... the problem is stale plugin data on chrome. I tried localStorage.clear() and even delete/reload the plugin...hmmm.... We now have an initial implementation. The workflow is not ideal, but the basics are there. You can use "open with" to open pixlr or pixlr express. You can edit the file. Closing it empties the content area on the page but keeps you there. Saving it invokes a save hook that allows you to optionally look at the data and then decide if you want to save to Orion. At that point you can choose to either stay in the editor or go back to the navigator. The workflow is pretty laborious if your intention is to save many times while still editing...you'll have to click twice each time, to confirm the save to Orion and then to go back to editing. But we can open new bugs on improving the workflow. |