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

Please add comments section #315

Open
sriramkumarm1 opened this issue Apr 22, 2022 · 9 comments
Open

Please add comments section #315

sriramkumarm1 opened this issue Apr 22, 2022 · 9 comments

Comments

@sriramkumarm1
Copy link

Have been using Blogifier for quite a long time for my Blog in production. It has all the features needed, except for comment section.

It'd be very great if we could have individual post comments implemented on the lines of WordPress. Please think about it and try adding it in a future release.

Thanks in advance!

@LinQiaoPorco
Copy link

Hi,
I tried to add the comment function myself.

  • People and post comment and edit after posting:

image

  • The comments have a simple tree structure to collect the sub-comments which responds another comment. User can choose to fold or unfold it:

image

  • Comment needs user to login to post comment or thumb-up/revoke thumb-up. Post author had a 'Author' tab in pill shape:
    image

I haven't raise the PR yet, because I haven't communicated with the repo owner about the solution, yet.

@LinQiaoPorco
Copy link

LinQiaoPorco commented May 30, 2022

Solution:

  • New table 'Comments' to store comments and user id who posted them, foreign key to 'Posts' table;
  • New table 'CommentsLikes' to store thumb-ups and user id, foreign key to 'Comments' table;
  • Embed a Blazor Server to 'Blogifier' project, hosting and embeding 'Comments.razor' into each post.cshtml;
  • 'CommentCard.razor' show the contents, and 'CommentEditor.razor' show the easyMDE editor to edit or post new comment, are also embeded into 'Comments.razor';

Flaws:

  • Blazor Server embeded into existing MVC can not share httpcontext, so the Login function may need changes to avoid user login again for comment;
  • As for myself, I changed the Auth funciton to SSO using IdentityServer4, so I haven't study how the original Blogifier project should handle it.

Full size screenshot:
localhost_5002_posts_draft-post

@dorthl
Copy link
Collaborator

dorthl commented Jun 8, 2023

@LinQiaoPorco
hello
Whether you submit your implemented comment feature to a pr
I'm looking forward to implementing comments
This project is being upgraded, please push it to the dev branch if possible

@LinQiaoPorco
Copy link

LinQiaoPorco commented Jun 8, 2023

Hi, I haven't looked into the project for quite a long time. I will try to PR from latest branch to see if it works.
My previous repo was revised to use OpenID connect, so it is not proper to PR the original one.

I found that dev branch is in .NET 7 already, while I did not plan to hasve .NET 7 SDK. Can I just pr to main branch?

@dorthl
Copy link
Collaborator

dorthl commented Jun 8, 2023

It can be in the mian-bak branch, the mian branch was wrongly submitted by me and I am asking the warehouse manager to fix it, [mian-bak] is the original warehouse code
But the .net7 update in the dev branch will be updated to the mian branch soon. If you submit to the mian branch, the request will probably not be merged.

@dorthl
Copy link
Collaborator

dorthl commented Jun 8, 2023

You can try to push to the dev branch and we can solve the problem together

@LinQiaoPorco
Copy link

OK. That will be a messy though. BTW, did you read description on my solution? Would that be OK to progress?

@dorthl
Copy link
Collaborator

dorthl commented Jun 8, 2023

Yes, there may be a big difference in the login plan
My idea is to use the code that can be used as much as possible to realize the comment function, structure table, logic, etc... even css..

@LinQiaoPorco
Copy link

image

I remember that the changes target comments function added since this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants