Is there a plugin for comment feature


where can i find a “comment” feature plugin that is build with angular, something similar to Facebook comment, where users will be able to comment on uploaded posts


I think it’s just all about CSS and Layouts.


I’ve written code for comments before; it was surprisingly easy. You’ll find, I think, that you’ll prefer having control over the layout as opposed to having a plugin for it. I might recommend using Firebase to store the actual comments–there’s a good nativescript-firebase plugin, and Firebase is free until you’re storing a ton of data. You could use the realtime database feature of the plugin and use its addChildEventListener() method to listen for live changes to the data. For the comments themselves, I’d probably use a ListView with a StackLayout for each comment and nested layouts within that StackLayout. You basically just have to stick text in the right spots. Maybe just give a border to every StackLayout in the ListView. You could use a TextView for the typing so that it can expand vertically (unlike a TextField) as the user types.
Replies may be tricky–I never dealt with those, but maybe start out with a single, chronological comment chain and build up from there!
I think there’s not a plugin because the way comments are displayed, with sorting and reply chains and so on, requires a lot of decisions about how and where data will be stored and structured. There’s not really a one-size-fits-all approach for it. If you’re using TypeScript, I would definitely make a class for comments to keep you organized.


thanks @aop4 for your time writing some inside details about the it


and when you said a ton of data,does it mean it wont be free after having around 1000 users?


@olau here are the pricing plans:
It depends. Thinking about the 1 GB storage limit for the realtime database with the free plan, you might want to limit the length of a comment to something like 1000 characters. Assuming one byte per character, that’s about 1 KB to store a comment, since any other data in the objects would probably be relatively small. You could then store about a million (1 GB / 1 KB) comments, or 1000 comments for each user. That seems like a lot more than the average user would post.
With that simplified model, you might be able to have 10,000 users without much of an issue (each user could post 100 comments on average). It depends how engaged they are.
It would also be a good idea to think about the 10 GB limit on downloads, since those could happen a lot more frequently than uploads. It could save money to not load comments until the user presses a “See Comments” button or to load only, say, 10 comments at a time.


thanks so much man,you saved me much time,was still gonna search about that but you just answer all my questions