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

Consider adding an additional example collection to demonstrate relationships #43

Closed
cleverbeagle opened this issue Sep 6, 2017 · 11 comments
Assignees
Labels
Milestone

Comments

@cleverbeagle
Copy link
Owner

No description provided.

@cleverbeagle cleverbeagle self-assigned this Sep 6, 2017
@jesperordrup
Copy link

Great idea :=)

@cleverbeagle
Copy link
Owner Author

@pilarArr ☝️ guy who suggested this. May be good to chat back and forth to get a clear idea on how to implement this.

@jesperordrup
Copy link

The usecase could be adding Comments to Documents. That would be something anyone should be able to relate to.

When viewing a document a signed in user can add a comment. The comment is added to the Comments Collection.
A comment contains a documentId, message, userId and a timestamp.
Viewing the document also renders out the list of comments. Each comment also shows the users name and links to profile.

Considerations
It could be kicked of with some thoughts about the following:

  • Optimizing for reading or writing.
  • Performance
  • Limitations
  • Pointers to other approaches

@cleverbeagle
Copy link
Owner Author

Really like how this sounds. We could spiff up the UI around it quite a bit, too.

@pilarArr
Copy link
Contributor

Sorry for being late to the thread!
I don't know much about optimising or performance, but the only limitations that come to my mind right now would be:

  • should the comment need approval? or do we take the we are all consenting adults premise?
  • How many comments do we load at the same time? Do we page them or load a scrolling list?

@jesperordrup
Copy link

To keep it simple and focust on handling a relationship I would suggest to

  • Leave out approval, just post
  • Only logged in users can comment
  • Load all

@pilarArr
Copy link
Contributor

@jesperordrup I'll work on a first approach with this, I'll keep you posted. 😄
@cleverbeagle I'm not sure about this, but can users see the documents of another user with the link?
And about the design for the component, did you have something in mind?

@cleverbeagle
Copy link
Owner Author

@pilarArr not at the moment. Documents are only visible to the user marked as the owner field. This may require us to add some sort of shared field to the Documents collection where we store userId's that are allowed to see docs. A little more work but would be neat to have an example of as the technique applies to a lot of use cases.

Re: design, I can come up with something. How do you do with CSS if I give you a mock up?

@pilarArr
Copy link
Contributor

I can give it a try, I can do basic CSS, things like layouts, spacing, colors and the like. Maybe transitions or animations are a bit out of my reach.

@cleverbeagle
Copy link
Owner Author

Okay. I've made a note to sketch something out next week, I'll follow up :)

@cleverbeagle
Copy link
Owner Author

@pilarArr a design concept for this. Keeping it simple here. No nested replies or anything, just an ascending list of comments followed by an input for submitting a comment.

Think this is doable?

pup-comments-design

May tweak the colors before we ship it, but this should get us started.

@cleverbeagle cleverbeagle added this to the 2.0.0 milestone Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants