Added Up/Down Vote Feature and More

Posted 1 year ago by selliott
Edited 364 days ago
1

I've built in some more changes to BlazorForum and went ahead and implemented them on this support forum. If you want to see the code, it's available in on GitHub HERE. I want to build in the ability to turn this feature on/off in the admin settings before merging it with the master. 

  • I've added a new Up/Down Vote feature that will allow you to show when you've found a post helpful.
  • I added a count display to the Category page to display how many posts have been made to a topic.
  • I refactored the ForumTopic component a little to clean it up and make it easier to read (broke some of it down into sub-components).
  • I also changed some settings related to ApplicationDbContext in the Startup file. I've typically setup services in other ASP.NET Core applications as scoped services, and it worked fine, because the lifetime of the context ended after the request. While building in these changes, I realized this doesn't work well for Blazor applications, since with server-side Blazor, the scope is the lifetime of the connection. So, a request within a loop would attempt to use the context before the previous request had ended (resulting in a application crash). So, I switched things to setup the services as Transient and that fixed it. For more info about service lifetimes, check out this link (scroll down to the Service lifetimes section) https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-3.1
  • 0

    The adjustments to turn on/off this feature have been built and these changes are now committed to the master branch on the GitHub repository.

    Posted 364 days ago by selliott
  • 0

    Would be neat to be able to 'undo' an up or down click. 

    Posted 292 days ago by cory2
  • 0

    @selliot this forum is honestly perfect as is. Please list what i can do to contribute lemme begin ASAP. Ready to fire down!!!

    Posted 29 days ago by loladeking
  • 0

    If you'd like to contribute, please feel free to send pull requests to the development branch on GitHub. I'll try to review it as soon as I'm able to. I have a lot going on right now, so I may not be able to right away. So, please don't think I'm ignoring it if I can't get to it right away. Thanks for the interest in helping to improve BlazorForum!

    Posted 28 days ago by selliott
Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 0
An error has occurred. This application may no longer respond until reloaded. Reload 🗙