Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page that accumulates a bunch of things made with the tutorial #64

Open
shiffman opened this issue Dec 8, 2013 · 15 comments
Open

page that accumulates a bunch of things made with the tutorial #64

shiffman opened this issue Dec 8, 2013 · 15 comments
Assignees
Milestone

Comments

@shiffman
Copy link
Member

shiffman commented Dec 8, 2013

This is an enhancement to think about for the future. I'm really enjoying finding all the shared pages (e.g. http://hello.processing.org/display/#7858783) and it might be nice to accumulate them somewhere (10 most recent things made with hello processing?)

@scottgarner scottgarner modified the milestone: 2014 Revision Nov 20, 2014
@scottgarner
Copy link
Collaborator

So I've been playing with options for this and I managed to recreate something like the current setup using Parse in the place of anonymous gists and it works pretty well.

Parse is designed for just this kind of scenario where you have an app that needs a backend component, but don't require anything super specialized. Right now, I think the two best options would be something based on Parse or something based on Wordpress.

Parse is amazingly simple to get going, but would require more work to create administration features. The free tier is pretty limited, but I can't imagine we'd go beyond it. My only complaint is that it seems to be noticeably slower than GitHub was.

Wordpress would make administration super easy, but automating the addition of new posts would be a little annoying (there is a REST API on the way, but it isn't in the current release and would still require some weird workarounds for auth). We'd also end up with a weird divide between the main Jekyll-driven site on GitHub and the Wordpress site hosted elsewhere.

I think that Wordpress as an application backend is interesting, but at the moment I'm leaning toward Parse. I think I could get a very basic gallery going within a couple of hours.

@scottgarner
Copy link
Collaborator

@shiffman, if you make an account at Parse I should be able to invite you as a collaborator. I think most of the foundations are in place, so it should just be a matter now of nailing down the interface.

@shiffman
Copy link
Member Author

Great, I have an account under daniel at shiffman dot net.

@shiffman
Copy link
Member Author

Picking up this discussion here I agree it would be good to (a) alert users that there work will be included in a gallery and (b) add an option to "opt-out"? Given there is no personal information I think that we can have the default be including in the gallery.

@scottgarner
Copy link
Collaborator

@REAS, sorry if it wasn't clear, but all of the content in the gallery right now is just very quick tests from me. There's no way to access the anonymous gists from last year, so I just made filler content to begin laying out the gallery.

All of those should be deleted before launch, but I do think it might be a good idea for us to pre-populate the gallery a little, maybe by hitting up the ITP mailing lists for quick contributions.

As far as floating interesting content to the top, I think we have three options:

  • Some kind of score or "featured" flag that admins can enable on the backend
  • Keeping track of the view count for each sketch and featuring those with the most views
  • Implementing a "like" system that could also help determine popularity

CodePen.io uses a combination of these and lets visitors sort by "Picks", Popular and Recent.

A featured flag and view count are both relatively simple to implement. I'm not sure "likes" would work very well for us since everything is anonymous.

@REAS
Copy link
Member

REAS commented Nov 25, 2014

All great. The "sort by" featured and most viewed seem like good goals.

@scottgarner
Copy link
Collaborator

I took a stab at this, though it could use some more styling.

I implemented "featured as a score instead of as a boolean. I thought this might give some more flexibility for curating the page, but it could also just be set as 1 or 0 if that proves easiest.

@shiffman
Copy link
Member Author

shiffman commented Dec 4, 2014

I took at look at the current state and I think this is a terrific start. I think we'll probably have comments and ideas, but these will likely come into play once it starts populating. Would it make sense to try to get a class or group to use the tutorial in the next few days to seed some content and test bugs?

@scottgarner what's the process for administration? Should I login into Parse and play around there or I think you perhaps mentioned you were thinking about building a simple admin panel?

@REAS if you want to take a peek at http://hello.processing.org/gallery/ I'd love to hear if you have any more thoughts design-wise. @lmccart you might be interested in taking a peek at this too as this is a direction that would make a lot of sense for p5 someday.

@scottgarner
Copy link
Collaborator

You're definitely able to jump in on Parse and make changes, but the process is a little tedious because you're matching object id strings. I added some light admin features to the site, but they require a separate login (which is easy to create on Parse, but the process is a little goofy).

I'll email you login details so you can take a look. Basically it just adds an admin button to every gallery page, which triggers an overlay to change settings. Currently, you can set a "featured score" to change the sketch's placement in the gallery, hide/unhide the sketch and delete it entirely.

@shiffman
Copy link
Member Author

shiffman commented Dec 4, 2014

Fantastic, thanks for the info! Just out of curiosity how are you generated the thumbnail images?

@scottgarner
Copy link
Collaborator

It actually turned out to be pretty simple. You can get base64-encoded jpeg data directly from a canvas element and Parse has support for a file datatype that takes base64-encoded data.

var processingCanvas = document.getElementById("editorCanvas"),
    uri = processingCanvas.toDataURL('image/jpeg'),
    base64 = uri.slice(uri.indexOf(',') + 1),
    processingImage = new Parse.File("sketch.jpg", { base64: base64 }); 

You can use a similar approach to save screenshots of a running sketch, but saving files directly from javascript is still a little wonky in some browsers. Filesaver.js makes it more reliable.

@lmccart
Copy link
Member

lmccart commented Dec 4, 2014

@scottgarner super cool! gives me lots of ideas..

@scottgarner
Copy link
Collaborator

@shiffman, Thoughts on the best way to link to this? The header seems like the right place, but things get really tight. I wonder if we could do something different with the Hour of Code link?

@shiffman
Copy link
Member Author

shiffman commented Dec 8, 2014

Hmmmm, tough one. Yeah, I think it's got to be in the header I can't think of anywhere else. Let's try adding it to the About / Guide / Help / etc? We can also add something to the about page. And yes, we might be able to shorten or move the Hour of Code link if we need to.

scottgarner added a commit that referenced this issue Dec 8, 2014
@scottgarner
Copy link
Collaborator

I got everything to fit reasonably well. I was thinking about putting icons next to the page links (About, Guide, etc.) but there's very little room left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants