Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kelly Copley
    @copleykj
    I don't see any changes to the repo, just forked.. That's fine, I can work on this one if you wish, just figured if you had changes I'd add to them.
    Ritchie Ng
    @ritchieng
    I’ve a private repo actually, I’m not sure which repo you’re comfortable with. Do you want me to send you an invite for my bitbucket repo?
    Kelly Copley
    @copleykj
    Doesn't matter to me, whatever you are comfortable with.. I can make some changes to the github repo and you can copy the changes from there if you'd like
    Ritchie Ng
    @ritchieng
    Ok! That would be spectacular.
    Thanks, really appreciate it.
    Scott Weaver
    @unmonk
    Howdy
    Kelly Copley
    @copleykj
    Hi!
    Kelly Copley
    @copleykj
    @ritchieng I've pushed out some changes to my fork of wework to give you an example to get started from. You'll need to add some comments and to a profile and publish the comments from the server.. Comments can be added through the console to test it using Router.current().data().addComment("test")
    I'll be pretty much indisposed for the next 14-16 hours so I'll answer any further questions when I return
    Kaiyes Ansary
    @kaiyes
    how come gitter is more active than the slack channel ..now I gotta come here more often !
    Kelly Copley
    @copleykj
    Unfortunately gitter is more accessible than slack
    Kaiyes Ansary
    @kaiyes
    well that just means I gotta keep this tab open :smile:
    Ritchie Ng
    @ritchieng
    @copleykj Thanks! Let me look through it. :D
    Ritchie Ng
    @ritchieng
    @copleykj Facing this error:
    Error: Could not make model commentable. 
    Please make sure you passed in a model and type [makeCommentableFailed]
    Profile = new Mongo.Collection("experts"); 
    Profiles = Profile.collection;
    CommentableModel.makeCommentable(Profile, "profile”);
    I tried changing “profile” to “experts” but it did not work either.
    Ritchie Ng
    @ritchieng
    @copleykj Solved it. Was a minor syntax error I made.
    Ritchie Ng
    @ritchieng

    @copleykj Currently I can add comments in profile.js:

    Template.profile.events({
            'submit form': function (event) {
            event.preventDefault();
            var reviewName = $('[name=profileName]').val();
            var review = Meteor.experts.findOne();
            review.addComment(reviewName)
        }
    });

    profile.html:

    Add Review:
    <input type="text" placeholder="type review here" name=“profileName"
     </form>

    But I’m unable to show the results as you have shown in profile.html:
    `{{#each comments}}{{user.username}}: {{body}} {{/each}}

    Kelly Copley
    @copleykj
    Have you published the comments to the client?
    Ritchie Ng
    @ritchieng

    /server/publications.js

    Meteor.publish('reviews', function() {
        var comments = Meteor.experts.findOne();
        return comments.user().username + ": " + comments.body;
    });

    /client/subscriptions.js
    Meteor.subscribe("reviews”);

    Having errors, trying to fix.

    Kelly Copley
    @copleykj
    I'm mobile for the next 10 hours so I can't help with code, but publish requires a cursor or array of cursors. What you need to do is subscribe from the route handler and pass the _id of the profile then use the that to get an instance of profile return the result of a call to its comments method
    As a convenience BaseModel provides a create empty method to avoid the db call to get an instance of profile. return Profile.createEmpty(_id).comments() should do it
    Kelly Copley
    @copleykj
    Meteor.publish('reviews', function(profileId) {
        return Profile.createEmpty(profileId).comments();
    });
    Then on the client you can subscribe from the subscriptions option of the route controller
    subscriptions:  function() {
        return Meteor.subscribe("views", this.params._id);
    }
    Ritchie Ng
    @ritchieng
    Yes it’s working! However, it doesn’t display the user’s profile. Is it due to the createEmpty rather than using an existing profileId?
    Kelly Copley
    @copleykj
    Ok, I've updated my fork of wework so that it now publishes the comments with the profile and then displays them properly on the profile page. It turns out that the app already uses reywood:publish-composite which provides an instance of profile to it's child find methods which has the comments method, so you can just add a find to the children and then return profile.comments(). Have a look at the recent changes to see what I did. Hopefully this brings you to a workable understanding of this subset of packages.
    Ritchie Ng
    @ritchieng
    @copleykj Thank you. You’re really helpful :D
    Kelly Copley
    @copleykj
    Thanks, glad you're getting it to work :)
    RamyElkest
    @RamyElkest
    btw @copleykj it would probably be nice to add a license to the projects. Unless i missed it. ;)
    Ritchie Ng
    @ritchieng

    @copleykj any idea how do we delete comments?

    I’m only able to access comments/like counts in yogiben admin. And also through the methods. But can’t seem to access the comments collection.

    RamyElkest
    @RamyElkest
    the collection is accessable through Meteor.comments
    usually commentInstance.remove() should do (but i don't know the inners of your app ;) )
    Ritchie Ng
    @ritchieng
    Thanks @RamyElkest
    RamyElkest
    @RamyElkest
    hey guys do you have any thoughts whether its better to publish with relations all the likes/comments for all likeable/commentable at route level, or if subscribing to each likes/comments separately in each likeable/commentable template
    Kelly Copley
    @copleykj
    My personal recommendation is, for comments, publish a subset of them with their relations (maybe 3) at first. Then subscribe to more through user action like clicking more comments or navigating to a route for that particular top level record, so if it was a post it would not be a lost of posts but a page dedicated to that post with its comments and it's like information.
    For likes I would publish only the record for the current user if it exists so you can show that they liked that specific thing
    RamyElkest
    @RamyElkest
    yeah we're on the same page then
    RamyElkest
    @RamyElkest
    im struggling with blaze re-rerendering :worried:
    I have a template say posts (subscribes to post only and passes this to each comments template) and a nested template comments (subscribes to the post's comments).
    When I create a new comment / like, the the nested template renders twice, first pass (comments.insert(comment)) it works as expected but then re-renders (i guess because we do posts.likeCount++, so parent template re-renders the child) however for some reason the nested template has no context in the second run, and none of the comments in displayed :(
    i might set up a reproduction in a bit
    Ibrahim Zahoor
    @ibrahimzahoor
    hey anyone online for help related to User Presence
    Kelly Copley
    @copleykj
    Hey, I'm here for a few minutes.
    Kelly Copley
    @copleykj
    @ibrahimzahoor Hey, are you still having issues with the user-presence package?
    Praney Behl
    @praneybehl
    Hey @copleykj, thanks for pointing me to the chat room
    I’m trying to recreate https://github.com/eprochasson/socialite , was just wonding if and how can the socialize package may help in it. Bassically, I want to build a social network and socialize packages do seem like a lot of work done already. But coming from Meteor Models are not commonly used so looking at the docs I couldn’t connect the dots. It might sound silly and I apollogies if I do. A little help would be really appreciated. Thanks
    Wu Tang Billingsley
    @genejr
    hi all, where's the best place to get some quick mup help?
    Jan Dvorak
    @StorytellerCZ
    @genejr Opening an issue on the specific component, pinging @copleykj :D or getting into the Socialize slack channel.
    Kelly Copley
    @copleykj
    I haven't used mup in awhile actually.
    Ewan Richardson
    @paradoxewan
    Hi there
    Kelly Copley
    @copleykj
    Hey, sorry about that @paradoxewan. I never got a notification for your message.