Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

When users select the sob emoji (😭) for their mood, display a random encouraging message via snackbar.

Changes

  • MotivationalQuotes.cs: Static utility with 30 motivational quotes and random selection
  • DataPointView.razor: Inject ISnackbar, add OnMoodSelected() handler that triggers snackbar for sob emoji
  • DataPointViewTests.razor: Test coverage verifying snackbar appears

Implementation

void OnMoodSelected(string mood)
{
    Point.Mood = mood;
    
    if (mood == DataPoint.Moods[^1])  // Sob emoji is last in list
    {
        var quote = MotivationalQuotes.GetRandomQuote();
        Snackbar.Add(quote, Severity.Info, c => c.Icon = Icons.Material.Rounded.FavoriteBorder);
    }
}

Uses DataPoint.Moods[^1] reference instead of hardcoded emoji string for maintainability.

The quote collection includes 30 diverse, encouraging messages covering themes of resilience, self-compassion, healing, and taking things one step at a time.

Original prompt

Show a random motivational quote in a snackbar when the user picks the sob emoji


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits October 30, 2025 06:37
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
…lues

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add random motivational quote snackbar for sob emoji Show motivational quote when sob emoji selected Oct 30, 2025
Copilot AI requested a review from danielchalmers October 30, 2025 06:45
@danielchalmers
Copy link
Owner

@copilot add more quotes

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

Copilot AI commented Oct 30, 2025

@copilot add more quotes

Added 20 more motivational quotes, bringing the total from 10 to 30 encouraging messages. The new quotes include themes of resilience, self-compassion, healing, and taking things one step at a time. (408a94e)

@danielchalmers danielchalmers marked this pull request as ready for review October 30, 2025 07:10
@danielchalmers danielchalmers merged commit e532d09 into main Oct 30, 2025
2 checks passed
@danielchalmers danielchalmers deleted the copilot/add-sob-emoji-quote-snackbar branch October 30, 2025 07:10
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.

2 participants