Skip to content

Add search toggles #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add search toggles #137

wants to merge 2 commits into from

Conversation

marcodejongh
Copy link
Owner

No description provided.

Copy link

vercel bot commented Feb 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boardsesh ❌ Failed (Inspect) Feb 16, 2025 10:22pm

marcodejongh added a commit that referenced this pull request Aug 10, 2025
Updates the search form to use the improved UI pattern from PR #137:

- Changed form layout to horizontal with left-aligned labels (14/10 span)
- Replaced "Classics Only" dropdown with Switch component
- Added Typography.Title for "Personal Progress" section heading
- Updated Alert message for better clarity when not logged in
- Aligned all switches to the right with consistent styling
- Used valuePropName="checked" for proper Switch integration

The UI now matches the cleaner, more organized design pattern
established in the search toggles PR.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
marcodejongh added a commit that referenced this pull request Aug 10, 2025
* Add personal progress filters to climb search

Implements filtering by climbs already attempted or completed by the logged-in user.

## New Features
- Hide Attempted: Filter out climbs the user has attempted
- Hide Completed: Filter out climbs the user has completed
- Only Attempted: Show only climbs the user has attempted
- Only Completed: Show only climbs the user has completed

## Implementation Details
- Added new boolean properties to SearchRequest type
- Enhanced search form UI with toggle switches (only visible when logged in)
- Updated backend queries to join ascents/bids tables when filters are active
- Modified API route to handle user authentication headers
- Updated data fetching to include auth headers when available
- Added URL parameter persistence and analytics tracking
- Fixed test files to include new required properties

## Database Integration
- Uses EXISTS subqueries for optimal performance
- Supports both Kilter and Tension board types
- Only applies filters when user is authenticated

Addresses issue #110 - good first issue for filtering climbs by user progress.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Improve personal progress filters UI layout

Updates the search form to use the improved UI pattern from PR #137:

- Changed form layout to horizontal with left-aligned labels (14/10 span)
- Replaced "Classics Only" dropdown with Switch component
- Added Typography.Title for "Personal Progress" section heading
- Updated Alert message for better clarity when not logged in
- Aligned all switches to the right with consistent styling
- Used valuePropName="checked" for proper Switch integration

The UI now matches the cleaner, more organized design pattern
established in the search toggles PR.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
marcodejongh added a commit that referenced this pull request Aug 10, 2025
* Add personal progress filters to climb search

Implements filtering by climbs already attempted or completed by the logged-in user.

## New Features
- Hide Attempted: Filter out climbs the user has attempted
- Hide Completed: Filter out climbs the user has completed
- Only Attempted: Show only climbs the user has attempted
- Only Completed: Show only climbs the user has completed

## Implementation Details
- Added new boolean properties to SearchRequest type
- Enhanced search form UI with toggle switches (only visible when logged in)
- Updated backend queries to join ascents/bids tables when filters are active
- Modified API route to handle user authentication headers
- Updated data fetching to include auth headers when available
- Added URL parameter persistence and analytics tracking
- Fixed test files to include new required properties

## Database Integration
- Uses EXISTS subqueries for optimal performance
- Supports both Kilter and Tension board types
- Only applies filters when user is authenticated

Addresses issue #110 - good first issue for filtering climbs by user progress.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Improve personal progress filters UI layout

Updates the search form to use the improved UI pattern from PR #137:

- Changed form layout to horizontal with left-aligned labels (14/10 span)
- Replaced "Classics Only" dropdown with Switch component
- Added Typography.Title for "Personal Progress" section heading
- Updated Alert message for better clarity when not logged in
- Aligned all switches to the right with consistent styling
- Used valuePropName="checked" for proper Switch integration

The UI now matches the cleaner, more organized design pattern
established in the search toggles PR.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Fix heatmap personal progress filtering

Updates heatmap to properly respect personal progress filters by
adding header-based authentication support.

## Changes
- Updated heatmap API route to check for x-auth-token and x-user-id headers
- Added fallback to session-based auth for backward compatibility
- Modified use-heatmap.tsx hook to include auth headers when user is logged in
- Added token and user_id to useEffect dependencies for proper re-fetching

## Behavior
- When personal progress filters are active, heatmap API checks headers first
- Falls back to session auth if no headers provided
- Heatmap now properly filters holds based on user's climb history
- Maintains existing functionality for non-authenticated users

The heatmap will now correctly hide/show holds from climbs the user has
attempted or completed when using the personal progress filters.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
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.

1 participant