Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Voting / favouriting / recording # of downloads / installs #24

Closed
jhoxray opened this Issue · 12 comments

4 participants

@jhoxray
Collaborator

Are there any plans to add voting / favoriting for packages and possibly tracking number of downloads? It should be pretty easy to add and provides nice angle to browsing the collection now that it's grown beyond 100...

@tmeasday
Owner

Yes! There are definitely plans to do this. I know it's a priority for the core team when they fold atmosphere or something like it into Meteor.

In the meantime I'd love to see it implemented, but I don't really have the time to look at it myself. I'd be happy to assist if someone wanted to make the attempt.

@jhoxray
Collaborator

Ok, so from some reading the code of meteorite and atmosphere I'd propose something like:

  • add "votes" and "downloads" fields to Package collection in the Atmosphere
  • Voting functionality is trivial - just add a button and an event handler to increment
  • tracking downloads is trickier as requires fiddling with meteorite; from what I could grasp, the best is probably to change Project.installPackage function - get a handle to Package collection from Atmosphere._packages and update a package we are installing with the downloads increment

Am I completely off or does it sound about right? The problem is proper change will require pull requests to 2 of your projects and I'm not sure how best to tackle it. Probably starting with voting by just changing the Atmosphere before trying to have a go at DDP stuff in meteorite...

@tmeasday
Owner

Sounds about right, although I'd maybe suggest making the change at Package.installInto. I suppose for a starting point, just checking how many times this has been called for a given atmosphere package will work, although I have a feeling it might be more complex than that to track things "properly".

I'll just go ahead and give you commit access to the two projects if that makes things easier for you. We can use this bug to communicate about your changes if you like, and you can push up a branch.

But yes, starting by implementing the voting in atmosphere would make sense.

@jhoxray
Collaborator

Thanks Tom, I'll get to it over the weekend and we'll see if anything good comes out :)

@dandv
Owner

The jquery-rateit package should come in handy. It would be great if Atmosphere gets ratings and comments ASAP, because the npm registry doesn't have this, which makes the whole thing a mess. Here's how the excellent and venerable CPAN does it:

metacpan ratings

@Tarang
Collaborator

@tmeasday in the new version of meteorite do you think its a good idea to track the number of downloads on atmosphere?
At the moment the entire package list is downloaded by atmosphere so it would also need a .call or something in meteorite & on atmosphere we could track how many times a package has been downloaded

@tmeasday
Owner

@Tarangp I think it's a great idea. Obviously it'll be a little rough, but a lot better than nothing.

I was going to ask if you wanted to test out the development Meteorite for me anyway. The new version is more or less done I think.

You can use it by git checking-out it and then running npm link from inside the checked-out directory. Have a go at trying to get atmosphere running with it, and let me know.

@Tarang
Collaborator

@tmeasday I've had a look at put in oortcloud/meteorite@450a913 but i'm not sure ive put it in the right place because there's still a tick prior but I can't find where the tick is, probably unicode conversion with my search tool. This is just run if theres a custom version of a package occupying the name that would be used as a package (e.g a modified version of filters which is up to date with Meteor 0.6.x)

I know its a bit messy to put in a .call & i'm planning in to get the following metrics:

-Version of meteor being used with package
-Version of meteorite being used with package
-Version of the package being installed
-Whether its an update or a new installation
-Whether the installation was successful or not.

I'm also thinking to put these in at the end of the install process so its a little less rough. I.e there would be one big .call instead of one for each package.

Any thoughts, any more or less metrics?

On another note should we also log down the ip address of the user via the atmosphere's logs for any of the current events being logged down (publish packages list, publish package on the server)?

I've also added in a deletePackage method that should be able to run from meteorite too.

@tmeasday
Owner

Sounds like a plan. The only thing would be that it would be nice to be able to distinguish which packages were previously installed vs were being installed by this current add command.

Perhaps a second method call at the end of an add command indicating which atmos packages were added (rather than installed which is also interesting)?

@Tarang
Collaborator

#44

@Tarang
Collaborator

The download count is now displayed

@Tarang Tarang closed this
@tmeasday
Owner

Nice work @Tarangp !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.