Skip to content

Fix figlet color parameter.#51

Merged
LittleLittleCloud merged 5 commits intoRazorConsole:mainfrom
TeseySTD:main
Oct 23, 2025
Merged

Fix figlet color parameter.#51
LittleLittleCloud merged 5 commits intoRazorConsole:mainfrom
TeseySTD:main

Conversation

@TeseySTD
Copy link
Member

I found that figlet component doesn't have the Color parameter.
In this pull request, I implemented it and add gallery examples.

@code {
private string justifyAttribute => Justify.ToString();
private string colorAttribute => Color.ToString();
private string JustifyAttribute => Justify.ToString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use small first letter for field name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE was arguing so I did like that, but ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

TeseySTD and others added 2 commits October 23, 2025 16:57
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>
@LittleLittleCloud LittleLittleCloud merged commit 892bcfc into RazorConsole:main Oct 23, 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.

3 participants