Fix figlet color parameter.#51
Merged
LittleLittleCloud merged 5 commits intoRazorConsole:mainfrom Oct 23, 2025
Merged
Conversation
| @code { | ||
| private string justifyAttribute => Justify.ToString(); | ||
| private string colorAttribute => Color.ToString(); | ||
| private string JustifyAttribute => Justify.ToString(); |
Member
There was a problem hiding this comment.
Could you use small first letter for field name
Member
Author
There was a problem hiding this comment.
IDE was arguing so I did like that, but ok.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the missing Color parameter in the Figlet component by implementing color support throughout the component stack and adding gallery examples to demonstrate the functionality.
Key Changes:
- Implemented Color parameter in the Figlet.razor component with proper style attribute handling
- Added color parsing logic in FigletElementTranslator to translate the style attribute to FigletText.Color
- Created FigletGallery component with examples demonstrating default color, custom color (Aqua), and text justification
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/RazorConsole.Core/Components/Figlet.razor | Added Color parameter and style attribute generation, fixed naming conventions for private members |
| src/RazorConsole.Core/Vdom/Translators/FigletElementTranslator.cs | Added style attribute parsing and color extraction to apply to FigletText |
| src/RazorConsole.Gallery/Components/FigletGallery.razor | New gallery component demonstrating Figlet usage with different colors and justification |
| src/RazorConsole.Gallery/Components/App.razor | Registered new Figlet gallery in the navigation menu |
src/RazorConsole.Core/Vdom/Translators/FigletElementTranslator.cs
Outdated
Show resolved
Hide resolved
Corrected spelling of 'styleAttribution' to 'styleAttribute' and 'justifyAttribution' to 'justifyAttribute' for consistency with standard naming conventions. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Skoreyko Misha <150385054+TeseySTD@users.noreply.github.com>
Set lowercase letters for field names Signed-off-by: Skoreyko Misha <150385054+TeseySTD@users.noreply.github.com>
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.
I found that figlet component doesn't have the Color parameter.
In this pull request, I implemented it and add gallery examples.