Code Monkey home page Code Monkey logo

Comments (11)

jesperordrup avatar jesperordrup commented on May 18, 2024 2

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

from pup.

cleverbeagle avatar cleverbeagle commented on May 18, 2024 1

@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.

from pup.

jesperordrup avatar jesperordrup commented on May 18, 2024

Great idea :=)

from pup.

cleverbeagle avatar cleverbeagle commented on May 18, 2024

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

from pup.

cleverbeagle avatar cleverbeagle commented on May 18, 2024

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

from pup.

pilarArr avatar pilarArr commented on May 18, 2024

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?

from pup.

jesperordrup avatar jesperordrup commented on May 18, 2024

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

from pup.

pilarArr avatar pilarArr commented on May 18, 2024

@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?

from pup.

cleverbeagle avatar cleverbeagle commented on May 18, 2024

@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?

from pup.

pilarArr avatar pilarArr commented on May 18, 2024

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.

from pup.

cleverbeagle avatar cleverbeagle commented on May 18, 2024

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

from pup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.