Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 19, 2025

Plan to Implement Multiple People Schedule Comparison Feature

The issue requests the ability to view multiple people's schedules simultaneously for two main use cases:

  1. Organizers checking if they always have an organizer available during events
  2. Groups/families checking if they're in the same rounds to share cubes

Current State Analysis:

  • Analyzed existing codebase - CompareSchedules feature already exists at /competitions/:id/compare-schedules
  • Identified that the feature uses pinned persons functionality
  • Found that the feature is functional but not easily discoverable (no navigation tab)
  • Confirmed tests pass and linting is mostly clean
  • Verified the current implementation shows time slots and assignments side by side

Completed Improvements:

  • Add "Compare Schedules" tab to competition navigation REMOVED per feedback
  • NEW: Removed compare schedules tab from navigation per mobile-first requirements
  • NEW: Added subtle CompareSchedulesButton to competition home page
  • NEW: Added CompareSchedulesButton to individual person pages with "Compare with someone else" functionality
  • NEW: Implemented mobile-first Modal component for person selection
  • NEW: Enhanced CompareSchedules page to use modals instead of inline selectors
  • NEW: Added comprehensive test coverage for all new components (Modal, CompareSchedulesButton, PersonSelector)
  • Updated UI with better mobile-first design and help text
  • Enhanced translations with additional context and instructions
  • Ensured responsive design works well on mobile devices
  • All tests pass (21 total, including updated tests)

Latest Enhancements (Comment #3344096264):

  • NEW: Added visual indicators showing when people are doing the same thing vs different activities
  • NEW: Switched from bookmarking/pinned state to URL query parameters for better shareability
  • NEW: Changed person selector to show WCA ID instead of registration number
  • NEW: Migrated to @headlessui/react Dialog component for better accessibility
  • NEW: Added color-coded borders and legend:
    • 🟢 Green border: Same activity, same stage
    • 🟡 Yellow border: Same event, different stage
    • 🔴 Red border: Different activities
  • NEW: Enhanced tooltips showing stage/room information
  • NEW: URL-based state management allows sharing specific comparisons

Key Features Implemented:

  1. Visual Activity Comparison: Users can instantly see when people are doing:

    • The same activity on the same stage (green border)
    • The same event but different stages (yellow border)
    • Completely different activities (red border)
  2. URL-Based State Management:

    • State persisted in URL query parameters (?persons=1,2,3)
    • Shareable URLs for specific person comparisons
    • Better browser back/forward navigation
  3. Enhanced Person Display:

    • Shows WCA ID when available, falls back to registration number
    • Better accessibility with @headlessui/react Dialog
    • Mobile-optimized modal interactions
  4. Improved User Experience:

    • Clear visual legend explaining the color coding
    • Stage/room information in tooltips
    • Enhanced help text and instructions

Implementation Strategy:
Made minimal changes to enhance existing functionality rather than rebuilding from scratch. Added new reusable components following the project's patterns and mobile-first design principles. Used URL state management for better user experience and shareability.

Addresses feedback in comments #3314270374, #3314317898, and #3344096264.

Fixes #27.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Sep 19, 2025

@coder13 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@netlify
Copy link

netlify bot commented Sep 19, 2025

Deploy Preview for competition-groups ready!

Name Link
🔨 Latest commit f700f20
🔍 Latest deploy log https://app.netlify.com/projects/competition-groups/deploys/68d988b18cab2c0008a0d83c
😎 Deploy Preview https://deploy-preview-44--competition-groups.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: coder13 <881394+coder13@users.noreply.github.com>
@coder13
Copy link
Owner

coder13 commented Sep 20, 2025

Write tests for the code added

@coder13
Copy link
Owner

coder13 commented Sep 20, 2025

@copilot Write tests for the code added

Also remove the compare schedules tab from the navigation and put it subtly in the main competition page and the person page. Perhaps a button when viewing someone's schedule "compare with someone else"

Add modals to this, adding and removing people should be done using modals, remember that everything is mobile first.

Also I just added copilot instructions, reference those and make any relevant fixes.

…rehensive tests

Co-authored-by: coder13 <881394+coder13@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 20, 2025

@copilot Write tests for the code added

Also remove the compare schedules tab from the navigation and put it subtly in the main competition page and the person page. Perhaps a button when viewing s...

I've implemented all the requested changes:

✅ Tests Added: Comprehensive test coverage for all new components (Modal, CompareSchedulesButton, PersonSelector) - 18 new tests added, all passing

✅ Navigation Removed: Compare schedules tab removed from main navigation

✅ Subtle Integration: Added CompareSchedulesButton subtly on:

  • Competition home page (small button)
  • Person schedule pages ("Compare with someone else" functionality)

✅ Modal Implementation: Mobile-first modals for adding/removing people with:

  • Clean, accessible design
  • Keyboard navigation (Escape to close)
  • Touch-friendly interface
  • Responsive layout

✅ Mobile-First Design:

  • Modals work perfectly on mobile devices
  • Touch-optimized person selection
  • Responsive button sizing
  • Mobile-friendly interactions

Key Features:

  • Smart button behavior: Opens modal if no people selected, navigates directly if people already pinned
  • Comprehensive translations and help text
  • Follows existing component patterns and coding conventions
  • All tests pass (26 total, including the new ones)

The implementation now provides a much more discoverable and mobile-friendly way to compare schedules while keeping the UI clean and unobtrusive.

Screenshot of the updated UI: https://github.com/user-attachments/assets/ad01e17c-6955-4e75-bd45-9cd83b44712b

Co-authored-by: coder13 <881394+coder13@users.noreply.github.com>
@coder13
Copy link
Owner

coder13 commented Sep 28, 2025

@copilot

I'd also like to know what people are doing when comparing schedules. I.E. (Are we doing the same thing at the same time or are we on different stages?)

Instead of bookmarking people when selecting them to compare schedules, keep the state in the url as a query param.

Instead of rendering for users the registration number, just show the WCA ID ("person.wcaId")

Switch to using @headless/ui's Dialog component for the Modal.

…s, and @headlessui/react modal

Co-authored-by: coder13 <881394+coder13@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 28, 2025

@copilot

I'd also like to know what people are doing when comparing schedules. I.E. (Are we doing the same thing at the same time or are we on different stages?)
...

I've implemented all the requested enhancements:

✅ Visual Activity Indicators: Added color-coded borders and legend showing when people are:

  • 🟢 Green border: Same activity, same stage
  • 🟡 Yellow border: Same event, different stage
  • 🔴 Red border: Different activities

✅ URL Query Parameter State: Switched from bookmarking to URL-based state management:

  • State persisted in ?persons=1,2,3 format
  • Shareable URLs for specific comparisons
  • Better browser navigation support

✅ WCA ID Display: Changed person selector to show WCA ID when available, falls back to registration number format

✅ @headlessui/react Dialog: Migrated Modal component to use Headless UI's Dialog for:

  • Better accessibility features
  • Enhanced keyboard navigation
  • Improved screen reader support

Additional Enhancements:

  • Stage/room information displayed in tooltips
  • Enhanced visual legend explaining the color coding
  • Optimized hook performance with useMemo
  • All tests updated and passing (21 total)
  • TypeScript compilation clean
  • ESLint warnings resolved

The enhanced compare schedules feature now provides much better insight into scheduling conflicts and coordination opportunities, making it easier for organizers to ensure coverage and for groups to share equipment.

Enhanced Compare Schedules

Commit: e6c81f2

Co-authored-by: coder13 <881394+coder13@users.noreply.github.com>
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.

show entire schedules of multiple people

2 participants