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

Community mod manager support field (TS-2279) #1086

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Roffenlund
Copy link
Contributor

  • Add a new boolean field to the Community model to indicate whether a community supports mod manager functionality.

  • Use this field to control the visibility of the "Install with Mod Manager" button on the Package Detail page.

  • Implement all necessary properties and tests to ensure proper functionality.

@Roffenlund Roffenlund self-assigned this Jan 15, 2025
Copy link
Member

@MythicManiac MythicManiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also add the new field as a list filter option on the django admin for communities

django/thunderstore/community/models/community.py Outdated Show resolved Hide resolved
@Roffenlund Roffenlund force-pushed the community-mod-manager-support-field branch from 31151bb to 0bc5a4b Compare January 16, 2025 09:07
@Roffenlund
Copy link
Contributor Author

Roffenlund commented Jan 16, 2025

@MythicManiac

Updated with the following changes:

  • Changed Community model field name from mod_manager_support -> has_mod_manager_support.
  • Removed old migration and generated new one.
  • Updated has_mod_manager_support property in PackageListing.
  • Add has_mod_manager_support to community admin filters and added the column to the table.
  • Updated tests where necessary.
  • Ran pre-commit command.

Add mod_manager_support boolean field to the Community model.
The intention with the field is to indicate whether a community
has mod manager support or not.

Add migration.

Refs. TS-2279
@Roffenlund Roffenlund force-pushed the community-mod-manager-support-field branch from fcf0f69 to 75c68ef Compare January 24, 2025 14:45
Add new property to the PackageListing model that checks
whether the related community has mod manager support or not.

Implement test.

Refs. TS-2279
Implement a check for whether the "Install with mod manager" button
should be visible or not, depending on whether the related commnunity
has mod manager support.

Implement test.

Refs. TS-2279
Add the has_mod_manager_support field to the community admin
list filters.

Refs. TS-2279
Refs. TS-2279
@Roffenlund Roffenlund force-pushed the community-mod-manager-support-field branch from 75c68ef to 442cf77 Compare January 28, 2025 07:42
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

Successfully merging this pull request may close these issues.

2 participants