Add document reporting feature with modal UI#356
Merged
C4ptainCrunch merged 11 commits intomainfrom Dec 25, 2025
Merged
Conversation
Implemented a user-friendly document reporting system allowing users to flag problematic documents with categorized reasons and optional descriptions. - Add DocumentReport model with 5 problem types (wrong module, wrong title, low quality, readability issue, other) - Create modal-based UI with radio buttons and inline descriptions - Add admin interface with report count annotation on documents - Include comprehensive test coverage (9 tests) - Add custom template tag for problem type descriptions Reports are viewable only in admin with ability to sort documents by report count. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create template partials for modal and page contexts - Add full page view with proper styling when accessing via GET - Use partialdef for report_modal and report_form_modal - Separate form implementations for modal vs page display - Modal now properly embedded in viewer, full page serves standalone 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use native <dialog> element instead of Bootstrap modal - Add vanilla JavaScript to handle dialog open/close - Support backdrop click to close - Remove dependency on Bootstrap modal JavaScript - Cleaner, more semantic HTML with native browser support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove inline JavaScript from template - Add Modal controller for dialog open/close/backdrop behavior - Add ModalTrigger controller for external buttons to open dialogs - Use data-controller and data-action attributes - Cleaner separation of concerns following Stimulus patterns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
C4ptainCrunch
commented
Dec 25, 2025
- Remove fieldsets from DocumentReportAdmin (use Django defaults) - Remove has_description method and display from admin - Change textarea rows from 4 to 2 for more compact form - Add OUTDATED option to ProblemType choices - Remove custom database indexes (use Django defaults) - Move inline CSS for dialog sizing to base.html style section - Move dialog backdrop styling to base.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove custom database indexes - Add OUTDATED option to ProblemType choices 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use .value for enum members in get_description dict keys - Add type ignore comment for dynamically annotated report_count 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #279