Skip to content

Comments

Add named favorites with custom names, tags, and filtering#11

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-10
Draft

Add named favorites with custom names, tags, and filtering#11
Copilot wants to merge 3 commits intomainfrom
copilot/fix-10

Conversation

Copy link

Copilot AI commented Sep 2, 2025

This PR implements the "Add named favorites" feature that allows users to save query favorites with custom names and tags, and provides filtering capabilities in the favorites panel.

Changes Made

Enhanced Save Favorite Flow

When users click the "Favorite" button, instead of immediately saving with the query text as the name, a dialog now appears allowing users to:

  • Enter a custom name for the favorite (pre-populated with a truncated version of the query)
  • Add comma-separated tags for categorization (e.g., "reporting, analytics, users")
  • Cancel or save the favorite with the custom metadata

Improved Favorites Panel

The favorites panel now includes:

  • A filter textbox at the top with search icon for real-time filtering
  • Enhanced display showing both custom names and tags for each favorite
  • Case-insensitive search that matches both names and tags as users type

Data Model Extensions

  • Added Tags property to the HistoryItem model with default empty string
  • Extended IQueryService interface with overloaded SaveQuery method accepting custom name and tags
  • Updated both InMemoryQueryService and AzureTableQueryService implementations
  • Maintained full backward compatibility with existing favorites

Technical Implementation

The implementation follows minimal-change principles:

  • New SaveFavoriteDialog.razor component handles the custom naming UI
  • Original SaveQuery methods delegate to new overloaded versions with default values
  • Filtering uses efficient LINQ queries with real-time updates
  • Proper null handling and type safety throughout

User Experience

Users can now organize their favorites more effectively:

  1. Save queries with meaningful names instead of raw SQL text
  2. Tag favorites for categorization (e.g., "monthly reports", "user analytics")
  3. Quickly find specific favorites using the search functionality
  4. Existing favorites continue to work without any migration needed

Named Favorites Feature

The mockup above shows the new dialog for saving favorites and the enhanced favorites panel with filtering capabilities.

Fixes #10.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 2, 2025 19:33
Co-authored-by: alex-wolf-ps <33110774+alex-wolf-ps@users.noreply.github.com>
Co-authored-by: alex-wolf-ps <33110774+alex-wolf-ps@users.noreply.github.com>
Copilot AI changed the title [WIP] Add named favorites Add named favorites with custom names, tags, and filtering Sep 2, 2025
Copilot AI requested a review from alex-wolf-ps September 2, 2025 19:37
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.

Add named favorites

2 participants