Skip to content

Add package listing report feature #1062

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

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

Add package listing report feature #1062

wants to merge 23 commits into from

Conversation

x753
Copy link
Contributor

@x753 x753 commented Sep 16, 2024

This PR adds the PackageReport model, as well as an API for sending reports for specific listings and a button / react component to use said API.

This is heavily based on this branch: https://github.com/thunderstore-io/Thunderstore/tree/report-feature

firefox_PafGD8xsH4.mp4

@x753 x753 requested a review from MythicManiac January 3, 2025 18:34
x753 added 3 commits January 22, 2025 09:50
Add ts_reports app
Add PackageReport model
Add PackageReport admin
Create an API for reporting PackageListings (creating a PackageReport)
Adds a report button to the package details page
Adds the react / tsx necessary to make it work
Modifies APIError to take an extractedMessage
Renames BaseApiError to BaseValidationError
Adds the "required" optional property to FormSelectFieldProps
x753 added 2 commits January 26, 2025 20:57
Add tests for the Package Listing Report API and serializer
Create a Cyberstorm Package Listing Report API for future use.
Add tests for Cyberstorm listing report API
Refactor report_button_props into a separate function because get_context_data was becoming too large
x753 added 2 commits February 11, 2025 09:40
Remove Cyberstorm PackageReport API, to be later implemented after package
listing action views have been implemented or otherwise necessary.
Update PackageReport request serializer to use PrimaryKeyRelatedField instead
of ModelChoiceField to handle errors better
x753 added 2 commits March 4, 2025 15:34
Add ts_reports app
Add PackageReport model
Add PackageReport admin
Create an API for reporting PackageListings (creating a PackageReport)
Adds a report button to the package details page
Adds the react / tsx necessary to make it work
Modifies APIError to take an extractedMessage
Renames BaseApiError to BaseValidationError
Adds the "required" optional property to FormSelectFieldProps
x753 added 8 commits March 4, 2025 15:36
Add tests for the Package Listing Report API and serializer
Create a Cyberstorm Package Listing Report API for future use.

# Conflicts:
#	django/thunderstore/api/cyberstorm/views/__init__.py
Add tests for Cyberstorm listing report API
Refactor report_button_props into a separate function because get_context_data was becoming too large
Remove Cyberstorm PackageReport API, to be later implemented after package
listing action views have been implemented or otherwise necessary.
Update PackageReport request serializer to use PrimaryKeyRelatedField instead
of ModelChoiceField to handle errors better
Remove leftover reference to Cyberstorm ReportListingAPIView
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.

3 participants