Radi85 / Comment

Django comment app. It can be associated with any given model.
https://rmustafa.pythonanywhere.com/
MIT License
97 stars 42 forks source link

Make reactions optional. #148

Open Radi85 opened 3 years ago

Radi85 commented 3 years ago

Proposed Functionality

The reactions functionality (Buttons in the UI and endpoints) can be disabled.

Use Case

This is needed when commenting by anonymous is enabled and there is no authentication system for external users.

Database Changes

No.

Proposed Changes

Add settings property COMMENT_REACTIONS_ALLOWED (boolean) and do proper checks for the views and templates.

abhiabhi94 commented 3 years ago

I think this can be used even without enabling anonymous. Developers may choose to use normal commenting without reactions.

Although, I think we can maybe wait to implement this feature if people demand. This change should ideally be dealt also at the database level.

Of the top of my head as of now, I can recall some following points(in addition to views and templates):

Radi85 commented 3 years ago

I think this can be used even without enabling anonymous. Developers may choose to use normal commenting without reactions.

Right. However the ideal use case as mentioned above.

Although, I think we can maybe wait to implement this feature if people demand. This change should ideally be dealt also at the database level.

I'm currently working on a project and need this feature.

Why would there be a database change? I don't see any reason for that.

Of the top of my head as of now, I can recall some following points(in addition to views and templates):

  • There's no need for reaction table.
  • Signals related to reactions no longer need to be executed.

I don't want to go this route. The migration must NOT be changed due to disabling this feature. This what we have done with flagging and subscription systems.

Since we are in MVC/MVT architecture, it would be enough mentioning the changes on these 3 layers only.