Comments

Overview

The Comments page is a comprehensive feedback management system allowing users to submit bug reports, feature requests, and general feedback with threaded conversations and admin responses.

Core Features

Feedback Categories

Submission Types:

  • General Feedback

  • Feature Request

  • Bug Report

  • Page Issue

  • UI/UX Suggestion

  • Performance Issue

  • Support Request

  • Other

Page Location Options (Optional):

  • Home Dashboard

  • Duels

  • Leagues

  • Leaderboards

  • Player Profile

  • Session History

  • Notifications

  • Settings

  • Login/Register

  • Fundraisers

  • Friends

  • AI Coach

  • Desktop App

  • Other

Feature Area Options (Optional):

  • Navigation

  • Session Recording

  • Scoring System

  • Invite System

  • Leaderboard Filtering

  • Notifications

  • Authentication

  • Payment Processing

  • Real-time Updates

  • Mobile Responsiveness

  • Data Synchronization

  • User Profile

  • Social Features

  • Competition Management

  • Other

Thread Management

Thread List View:

  • Filter by status:

    • All Conversations

    • Open

    • In Progress

    • Resolved

    • Closed

  • Threaded conversation cards showing:

    • Subject line

    • Status badge

    • Category badge

    • Page location (if specified)

    • Feature area (if specified)

    • Message count

    • Last reply timestamp

  • Click to open detailed view

Thread Detail View:

  • Full conversation history

  • Message author identification

  • Admin vs User message distinction

  • Message timestamps

  • Edit indicators

  • Thread metadata display

  • Status indicators

  • Back to list navigation

Message System

User Messages:

  • Text-based messaging

  • Real-time submission

  • Timestamp tracking

  • Edit tracking

Admin Responses:

  • Clearly distinguished from user messages

  • "Proof of Putt Team" identifier

  • Inline conversation replies

  • Resolution notes

Reply Interface:

  • Textarea for message composition

  • Send button

  • Disabled when thread is closed

  • Character limit support

  • Submit on Enter support

Thread Status Workflow

Status Progression:

  1. Open: New feedback submitted

  2. In Progress: Team reviewing or working on issue

  3. Resolved: Issue fixed or request completed

  4. Closed: Conversation ended

Status-Based UI:

  • Color-coded status badges

  • Closed thread indicators

  • Reply form disabled for closed threads

  • Resolution notes display

New Feedback Submission

Form Fields:

  • Subject (Required): Brief description

  • Category (Required): Dropdown selection

  • Page/Area (Optional): Where issue occurred

  • Feature/Function (Optional): Specific feature affected

  • Your Feedback (Required): Detailed description (6 rows)

Submission Flow:

  1. Fill out form

  2. Click "Submit Feedback"

  3. Form cleared on success

  4. Return to thread list

  5. New thread appears in list

Form Toggles:

  • "New Comment Thread" button shows form

  • "Hide Form" button collapses form

  • Form state persists during navigation

Key Insights

API Integration

  • apiGetFeedbackThreads(status): Fetch filtered thread list

  • apiGetFeedbackThread(threadId): Fetch single thread with messages

  • apiCreateFeedbackThread(data): Submit new feedback

  • apiAddFeedbackMessage(threadId, message): Reply to thread

Data Structures

Thread Object:

Message Object:

State Management

  • threads: Array of feedback threads

  • selectedThread: Currently viewed thread with messages

  • showNewThreadForm: Form visibility toggle

  • filterStatus: Active filter selection

  • newThread: Form state for submission

  • newMessage: Reply composition state

  • isSubmitting: Async operation state

User Experience

  • Real-time form validation

  • Loading states for async operations

  • Success/error notifications

  • Automatic list refresh after actions

  • Disabled UI during submission

  • Clear status communication

  • Breadcrumb navigation

Empty States

  • "No feedback threads yet"

  • Call-to-action messaging

  • Guidance for first submission

Administrative Features

  • Admin message distinction

  • Resolution notes section

  • Status management

  • Thread closure capability

  • Bulk filtering

Privacy & Security

  • User authentication required

  • Thread ownership validation

  • Admin-only capabilities separated

  • Secure message submission

Date Formatting

Welcome Message

  • "Welcome to Proof of Putt! We recently launched..."

  • Sets tone for feedback importance

  • Encourages participation

  • Emphasizes value of user input


Common Patterns Across All Pages

Authentication & Context

  • All pages use useAuth() for player data

  • useNotification() for user feedback

  • Protected route wrapping

  • Automatic redirect for unauthenticated users

Responsive Design

  • Mobile-first approach

  • Breakpoints for tablet and desktop

  • Touch-friendly interfaces

  • Optimized for various screen sizes

Loading States

  • Skeleton screens

  • Loading spinners

  • Progressive loading

  • Optimistic UI updates

Error Handling

  • User-friendly error messages

  • Graceful degradation

  • Retry mechanisms

  • Defensive programming

API Patterns

  • Consistent error handling

  • Promise.allSettled for parallel requests

  • Loading and error states

  • Toast notifications for feedback

  • React Router integration

  • Breadcrumb trails

  • Back navigation

  • Deep linking support

Performance

  • Lazy loading

  • Memoization

  • Pagination

  • Efficient re-renders


Technical Stack

Frontend

  • React: UI library

  • React Router: Navigation

  • Context API: State management

  • Hooks: Modern React patterns

Styling

  • CSS Modules: Component-scoped styles

  • Responsive Grid: Layout system

  • Flexbox: Component alignment

  • CSS Variables: Theming

API Communication

  • Fetch API: HTTP requests

  • Bearer Tokens: Authentication

  • REST endpoints: Backend integration

  • SSE: Real-time notifications

Third-Party Integration

  • Zaprite: Payment processing

  • Open Timestamps: Certificate verification

  • Social platforms: Profile linking


Last updated