Draft
Conversation
Co-authored-by: robinmanuelthiel <5874465+robinmanuelthiel@users.noreply.github.com>
Co-authored-by: robinmanuelthiel <5874465+robinmanuelthiel@users.noreply.github.com>
Co-authored-by: robinmanuelthiel <5874465+robinmanuelthiel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Make all prices pink
Add pink prices toggle feature to WebApp
Oct 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a toggle switch in the WebApp header that allows users to make all prices pink throughout the application. When enabled, prices on all pages instantly turn pink; when disabled, they return to their original color.
Implementation
The feature uses a minimal, CSS-based approach with reactive state management:
Architecture
PinkPricesStateservice (scoped to user session) that manages the toggle state and fires events when changedHeaderBar.razorwith two-way binding to the stateMainLayout.razorsubscribes to state changes and applies a conditional CSS class to the page wrapperapp.csstargets all elements with thepriceclass when pink mode is activeFlow
Code Example
State Service:
CSS Rule:
Changes Made
PinkPricesState.cs- State management serviceExtensions.cs- Registered service in DI containerHeaderBar.razor- Added toggle checkboxHeaderBar.razor.css- Styled the toggleMainLayout.razor- Added reactive wrapper with conditional CSS classCartPage.razor- Addedpriceclass to totalsOrders.razor- Addedpriceclass to order totalsapp.css- Added pink prices CSS ruleTotal: 8 files, ~85 lines of code
Affected Pages
All price displays across the application:
Benefits
priceclass naming throughoutTesting
dotnet run --project src/eShop.AppHost/eShop.AppHost.csprojBuild status: ✅ Compiles successfully with 0 warnings, 0 errors
Fixes #[issue-number]
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.