Skip to content

Add missing new Icon parameter to BitPersona (#12230)#12231

Merged
msynk merged 2 commits into
bitfoundation:developfrom
msynk:12230-blazorui-persona-missing-new-icon
Mar 30, 2026
Merged

Add missing new Icon parameter to BitPersona (#12230)#12231
msynk merged 2 commits into
bitfoundation:developfrom
msynk:12230-blazorui-persona-missing-new-icon

Conversation

@msynk
Copy link
Copy Markdown
Member

@msynk msynk commented Mar 30, 2026

closes #12230

Summary by CodeRabbit

Release Notes

  • New Features
    • Users can now customize the icon displayed for unknown persona coins in the BitPersona component. Two configuration options allow specification via icon metadata or icon name, with icon metadata taking precedence when both are provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c65fddc5-fef6-4a41-996a-d07cd5b7d295

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The BitPersona component now supports configurable icons for unknown personas. New parameters UnknownIcon (BitIconInfo) and UnknownIconName (string) replace hardcoded "Help" icon rendering, allowing dynamic icon selection. The component and demo implementations include corresponding parameter definitions.

Changes

Cohort / File(s) Summary
Component Implementation
src/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor, src/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor.cs
Added UnknownIcon (BitIconInfo?) and UnknownIconName (string?) parameters; updated razor markup to compute icon CSS classes dynamically from the icon info instead of hardcoded "bit-icon bit-icon--Help" classes.
Demo Implementation
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Persona/BitPersonaDemo.razor.cs
Added demo parameter definitions for UnknownIcon and UnknownIconName with default values to showcase the new configurable icon functionality.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 The unknown persona now wears a new face,
No more bound to Help—it sets its own pace!
With UnknownIcon dancing through parameters so free,
Every mystery finds its own identity! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and specifically describes the main change: adding the missing Icon parameter (UnknownIcon) to BitPersona component.
Linked Issues check ✅ Passed The PR fully implements the requirement from issue #12230 by adding UnknownIcon parameter to BitPersona with proper fallback support via UnknownIconName.
Out of Scope Changes check ✅ Passed All changes directly relate to adding the UnknownIcon parameter to BitPersona as specified in issue #12230; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
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

Adds support for customizing the “unknown persona” coin icon in BitPersona, aligning it with other Bit.BlazorUI components that support BitIconInfo-based icon overrides.

Changes:

  • Added UnknownIcon (BitIconInfo?) and UnknownIconName (string?) parameters to BitPersona (with UnknownIcon taking precedence).
  • Updated BitPersona rendering to resolve unknown icon CSS classes via BitIconInfo.From(...).
  • Updated the demo parameter metadata to include the new parameters.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor.cs Introduces the new public parameters for configuring the unknown persona icon.
src/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor Uses BitIconInfo.From to render unknown icon classes instead of a hard-coded Help icon.
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Persona/BitPersonaDemo.razor.cs Documents the new parameters in the demo component parameter list.

Copy link
Copy Markdown
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@msynk msynk merged commit f975321 into bitfoundation:develop Mar 30, 2026
7 checks passed
@msynk msynk deleted the 12230-blazorui-persona-missing-new-icon branch March 30, 2026 06:31
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.

Missing new Icon implementation from the BitPersona component

2 participants