ChromeDevTools / timeline-url

Chrome devtools extension to generate a URL for your timeline
https://chrome.google.com/webstore/detail/timeline-url-for-devtools/oclhnibplhejninpifaddfoodnmpcpok
Apache License 2.0
55 stars 10 forks source link

Make process easier by helping people uploading the timeline? #8

Open arthurvr opened 9 years ago

arthurvr commented 9 years ago

Right now it's still complex ya know.

Save timeline to machine -> upload on dropbox or whatever service -> try to get the raw url -> drop in extension -> get back URL you need. Requires too much effort IMHO.

Ideas on how to make things easier are def. welcome. Doesn't block publicizing at all but nice to have an issue to throw ideas in.

Garbee commented 9 years ago

Well, we need to not centralize hosting yet... People should get their services API key (or we can automate it with GDrive) and plug that in for hosting. But, getting it auto-uploaded is one huge step.

With Google Drive it needs to be shared publicly to anyone on the web (no problem.) Then you take the item ID and plug it in here:

https://e9e681cdfc83aceb7ee3d5297a19b999501cb520.googledrive.com/host/{ITEMID}

That gives you a link to one of the drive buckets. Not sure actually if it will always work or if it is just my item happens to be stored there. Doing no subdomain gives you one redirect which is to a bucket.

Ideally we could get an API added to DevTools (if not already existing) that allows you to tap the timeline for export so you can do what you want with the stream. Take the stream, push to user-selected provider, then use the services API to get the URL for the item and plug it in automatically to provide only the URL for showing off the timeline back.

arthurvr commented 9 years ago

Well, we need to not centralize hosting yet... People should get their services API key (or we can automate it with GDrive) and plug that in for hosting. But, getting it auto-uploaded is one huge step.

Yes, that's what I was thinking about. Hosting it would be out of scope and there are a bunch of services that exist already and can help us with this. Totally agree!

arthurvr commented 9 years ago

Ideally we could get an API added to DevTools (if not already existing) that allows you to tap the timeline for export so you can do what you want with the stream.

I don't think that this exists atm but would love to see it happen. Sounds like it's something other extensions would benefit from as well.

Garbee commented 9 years ago

Could we take advantage of the Google Drive Web Component perhaps? This could solve one case for uploading easily.

paulirish commented 9 years ago

okay!

  1. upload trace to drive
  2. permissions set to anyone on the internet can find and comment
  3. get ID
  4. plug ID into this magical URL
    • https://docs.google.com/uc?id=0B7K1Uipy0SbDdDQ2TE9PV2ZuYnM&export=download
  5. plus that into the full URL
    • chrome-devtools://devtools/bundled/devtools.html?remoteFrontendUrl=chrome-devtools://devtools/remote/serve_rev/@194187/inspector.html&loadTimelineFromURL=https://docs.google.com/uc?id=0B7K1Uipy0SbDdDQ2TE9PV2ZuYnM&export=download

That's the one.

Garbee commented 9 years ago

Step six: Order pizza

paulirish commented 9 years ago

as mentioned on IRC, ALL dropbox uploads can have CORS so they have the advantage mentioned here: https://github.com/arthurvr/timeline-url/issues/9#issuecomment-120666064

kdzwinel commented 9 years ago

To use Drive API user has to be logged in. How about using gists?

EDIT: I guess the only issue with gists is the maximum file size. It's not documented, so I asked them directly - waiting for response.

paulirish commented 9 years ago

@arthurvr do you wanna look into gists or dropbox?

arthurvr commented 9 years ago

do you wanna look into gists or dropbox?

Sure.

To use Drive API user has to be logged in. How about using gists?

Well, the user might not need to be logged in but there will need to be some auth at least. What percentage of the developers would have a GitHub account? I'm not really sure myself but I suspect there are people out there using devtools that don't have one. WDYT?

@kdzwinel Side: You don't (never) get a response from GitHub on Twitter :)

paulirish commented 9 years ago

well theres not gonna be a catchall solution for handling traces that everyone has an account for.

but i agree the gh, dbox, and gdrive are the three best candidates.

gh gists seems great, though i would only do it first if they do cors. (or if rawgit can proxy w cors)

kdzwinel commented 9 years ago

@arthurvr Not sure what do you mean by:

there will need to be some auth

we need no auth to create anonymous gists:

You can read public gists and create them for anonymous users without a token;


You don't (never) get a response from GitHub on Twitter :)

Yeah, it looks you are right ;) I've sent them an email.

kdzwinel commented 9 years ago

Got response from github:

1) does CORS?

Yes, it does. See https://developer.github.com/v3/#cross-origin-resource-sharing.

2) limits file size for anonymous gists (we need to support ~10MB JSON files)?

Yes it does. See https://developer.github.com/v3/gists/#truncation.

Gists are limited to 1MB, so we can't, unfortunately, use them :(

paulirish commented 9 years ago

ouch yeah.​ 1mb will not work for us. 5 would though. (we can do json.gz export and import)

dayum.

ghost commented 9 years ago

Okay, so I wanted to work on a PR for this. Or is somebody else working on this? I started off a little bit and some things I ran into:

arthurvr commented 9 years ago

Or is somebody else working on this?

I started working on this once but was never able to finish it yet. The work probably got useless anyways as Paul rewrote everything . Feel free to pick it up. If you run into anything hit us up on Freenode #chrome-devtools :)

paulirish commented 9 years ago

@twixie

I'd like to start with the Dropbox API first since the UX for sharing is better there (with CORS and linkable URLs).

There isn't an API to get the Timeline data out of Chrome, but I just spoke with the team and it's something we could introduce later, especially if we see this extension taking off. So let's proceed with the expectation that the user has to Right click and Save first. There is a Downloads API for extensions, so maybe we can use that to help?
If there's nothing there to help, then using an <input type=file> seems ok, yeah.