Skip to content

Conversation

@leochiu-a
Copy link
Owner

@leochiu-a leochiu-a commented Oct 19, 2025

Summary

This PR enhances the Elden Ring GitHub extension by adding support for multiple celebration sound effects, giving users more customization options for their GitHub PR celebrations. Users can now choose between the classic "You Died" sound and the new "Lost Grace Discovered" sound effect.

Key Changes

  • Sound Type Selection: Added a new dropdown in the settings UI allowing users to choose between "You Died" and "Lost Grace Discovered" sound effects
  • New Audio Asset: Introduced lost-grace-discovered.mp3 as an alternative celebration sound
  • Asset Reorganization: Renamed elden_ring_sound.mp3 to you-die-sound.mp3 for clearer naming convention
  • Settings Type Enhancement: Extended EldenRingSettings interface to include soundType property
  • Dynamic Sound Loading: Updated sound playback logic to dynamically load the selected sound type across all celebration triggers
  • Version Bump: Updated extension version to v1.2.0
  • Documentation: Updated README with new sound type option and revised asset structure

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • ♻️ Refactoring (no functional changes)
  • 🎨 Style/formatting changes
  • 🧪 Test improvements
  • 🔧 Configuration changes

Test Plan

Manual Testing

  • Install the extension with the updated changes
  • Open the extension popup on any GitHub page
  • Verify the new "Sound Type" dropdown appears in settings with two options: "You Died" and "Lost Grace Discovered"
  • Select "You Died" and trigger a test banner - verify the classic sound plays
  • Select "Lost Grace Discovered" and trigger a test banner - verify the new grace discovery sound plays
  • Verify sound selection persists after closing and reopening the popup
  • Test all three celebration triggers (PR merge, PR create, PR approve) to ensure the selected sound plays correctly for each
  • Verify that toggling "Play sound effect" off/on still works correctly with both sound types

Automated Testing

  • Added unit test for sound type selection logic (src/content/content.test.ts:166)
  • Existing audio playback test updated to use new sound type parameter (src/content/content.test.ts:156)
  • All tests pass with the new sound type functionality

Breaking Changes

None

Note: While elden_ring_sound.mp3 was renamed to you-die-sound.mp3, this is an internal asset change and does not affect users. The extension handles this transparently by defaulting to 'you-die-sound' for existing installations.

Checklist

  • 📝 Code follows the style guidelines
  • 👀 Self-review has been performed
  • 🧪 Tests have been added/updated
  • 📖 Documentation has been updated

@leochiu-a leochiu-a force-pushed the feat/add-lost-grace-discovered-support branch from 07f2a51 to e01d877 Compare October 19, 2025 01:35
@leochiu-a leochiu-a force-pushed the feat/add-lost-grace-discovered-support branch from 054f393 to fb7d078 Compare October 19, 2025 01:38
@leochiu-a leochiu-a closed this Oct 19, 2025
@leochiu-a leochiu-a reopened this Oct 19, 2025
@leochiu-a leochiu-a merged commit 8149dc2 into main Oct 19, 2025
4 checks passed
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