Skip to content

Conversation

@C4ptainCrunch
Copy link
Contributor

@C4ptainCrunch C4ptainCrunch commented Dec 25, 2025

Fixes #279

C4ptainCrunch and others added 6 commits December 25, 2025 00:24
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 <[email protected]>
- 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 <[email protected]>
- 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 <[email protected]>
- 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 <[email protected]>
C4ptainCrunch and others added 5 commits December 25, 2025 20:46
- 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 <[email protected]>
- 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 <[email protected]>
- 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 <[email protected]>
@C4ptainCrunch C4ptainCrunch merged commit 8c3c1c4 into main Dec 25, 2025
2 checks passed
@C4ptainCrunch C4ptainCrunch deleted the feature/document-report branch December 25, 2025 20:03
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.

Feature: report a document

2 participants