-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Multiple UI components currently use console.log(), console.debug(), and alert() for user notifications and debugging. This creates inconsistent UX and noisy console output.
Current State
Found 40+ instances across the codebase:
console.log()in various components (line-history, projects, classroom, etc.)alert()calls in roles-handler, projects, legacy-annotator, etc.
Proposed Solution
-
Route user-facing messages through the existing toast/alert dispatcher system:
- Use
eventDispatcher.dispatch('tpen-toast', { status, message })for notifications - Use
eventDispatcher.dispatch('tpen-alert', { message, buttonText })for confirmations
- Use
-
For debug logging, consider:
- Remove debug logs entirely from production code
- Use a debug flag/wrapper that respects environment (dev vs prod)
- Leverage browser dev tools instead of inline logs
Files Affected
manage/projectsHighlight.jscomponents/roles-handler/index.jscomponents/projects/project-list-write.jscomponents/line-history/index.jscomponents/legacy-annotator/plain.jscomponents/annotorious-annotator/plain.jscomponents/classroom/(multiple files)api/Project.js
Benefits
- Consistent user experience
- Cleaner console output in production
- Better error tracking and user feedback
- Easier to test notification flows
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request