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

[WIP] Remove comments app #3802

Merged
merged 5 commits into from Apr 27, 2018

Conversation

Projects
None yet
6 participants
@stsewd
Member

stsewd commented Mar 14, 2018

PR on top of #3618 (#3618 (comment))

Closes #2879

shreyateeza and others added some commits Feb 15, 2018

Remove comments app
readthedocs.comments.models.ModerationActionManager is unimplemented. This is a cleanup issue.

Closes #2879
@@ -136,6 +136,7 @@ class Project(models.Model):
'DirectoryHTMLBuilder">More info</a>.'))
# Project features
# TODO: remove this?
allow_comments = models.BooleanField(_('Allow Comments'), default=False)
comment_moderation = models.BooleanField(

This comment has been minimized.

@stsewd

stsewd Mar 14, 2018

Member

Are this fields part of the comment app?

allow_comments and comment_moderation.

I'm going to see if the tests explode if I remove those lines.

This comment has been minimized.

@humitos

humitos Mar 14, 2018

Member

Probably should be removed also. Can you grep the code by allow_comments and comment_moderation to see where it's used?

This comment has been minimized.

@stsewd

stsewd Mar 14, 2018

Member

Relevant files

Here is used to choose the sphinx builder

if self.project.allow_comments:
self.sphinx_builder = 'readthedocs-comments'

No relevant files

Just to show on the dj admin

list_display = ('name', 'slug', 'repo', 'repo_type', 'allow_comments', 'featured', 'theme')
list_filter = ('repo_type', 'allow_comments', 'featured', 'privacy_level',

Test

Here is just a comment

# Extra
# 'allow_comments',
# 'comment_moderation',

On a template to link to the comments section

{% if project.allow_comments %}
<li class="{% block project-comments-active %}{% endblock %}"><a href="{% url "projects_comments" project.slug %}">{% trans "Comments" %}</a></li>
{% endif %}


For the comment_moderation there is a template that is very related to the comment model. I think that should be removed without problem, but now I'm curious about the sphinx builder.

This comment has been minimized.

@stsewd

stsewd Mar 15, 2018

Member

I remove stuff related to comment_moderation, and I see that is very related to allow_comments, but I'm have doubts about this

if self.project.allow_comments:
self.sphinx_builder = 'readthedocs-comments'

This comment has been minimized.

@humitos

humitos Mar 15, 2018

Member

I think we can safely remove that readthedocs-comments builder and all the -comments builders.

This comment has been minimized.

@ericholscher

ericholscher Mar 26, 2018

Member

Yep, it can all be removed.

@stsewd

This comment has been minimized.

Member

stsewd commented Mar 15, 2018

@humitos I delete the db fields and everything looks good, should I add those migrations here or wait to #3608?

@humitos

This comment has been minimized.

Member

humitos commented Mar 15, 2018

@humitos I delete the db fields and everything looks good, should I add those migrations here or wait to #3608?

I'd say to add them so it's ready to merge. Then we can squash the migration when needed.

@stsewd

This comment has been minimized.

Member

stsewd commented Mar 15, 2018

Also we want to remove the comments builder from https://github.com/rtfd/readthedocs-sphinx-ext (I'm not familiar with that repo)

@agjohnson agjohnson added this to the Cleanup milestone Mar 15, 2018

@humitos

This comment has been minimized.

Member

humitos commented Mar 23, 2018

Also we want to remove the comments builder from rtfd/readthedocs-sphinx-ext (I'm not familiar with that repo)

I suppose that you can remove the whole comments folder, https://github.com/rtfd/readthedocs-sphinx-ext/tree/master/readthedocs_ext/comments

@humitos humitos referenced this pull request Mar 23, 2018

Closed

Remove comments app #3618

@ericholscher

This comment has been minimized.

Member

ericholscher commented Mar 26, 2018

screenshot 2018-03-26 10 22 32

❤️
@ericholscher

This comment has been minimized.

Member

ericholscher commented Mar 26, 2018

I suppose that you can remove the whole comments folder, https://github.com/rtfd/readthedocs-sphinx-ext/tree/master/readthedocs_ext/comments

Yea, I have an initial PR doing this that could be improved (rtfd/readthedocs-sphinx-ext#31)

@humitos

This comment has been minimized.

Member

humitos commented Apr 4, 2018

@stsewd would you like to finish Eric's PR in the other repo so we can go forward whith this one also?

@stsewd stsewd referenced this pull request Apr 5, 2018

Merged

Remove comments builder #38

1 of 3 tasks complete
@humitos

This comment has been minimized.

Member

humitos commented Apr 17, 2018

@stsewd would you like to finish Eric's PR in the other repo so we can go forward whith this one also?

Blocked by: rtfd/readthedocs-sphinx-ext#38

@ericholscher ericholscher merged commit 637f37d into rtfd:master Apr 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ericholscher

This comment has been minimized.

Member

ericholscher commented Apr 27, 2018

Merging this, and we can figure out if it has further issues during dev today before deploying it.

@ericholscher

This comment has been minimized.

Member

ericholscher commented Apr 27, 2018

🙏 @stsewd

@stsewd stsewd deleted the stsewd:issue2879 branch Apr 30, 2018

@stsewd

This comment has been minimized.

Member

stsewd commented Apr 30, 2018

The only thing missing here are the migrations, I think I can add them to #3608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment