Skip to content

Add new Icon parameters to BitTextField (#12094)#12095

Merged
msynk merged 1 commit intobitfoundation:developfrom
msynk:12094-blazorui-textfield-new-icons
Feb 16, 2026
Merged

Add new Icon parameters to BitTextField (#12094)#12095
msynk merged 1 commit intobitfoundation:developfrom
msynk:12094-blazorui-textfield-new-icons

Conversation

@msynk
Copy link
Member

@msynk msynk commented Feb 15, 2026

closes #12094

Summary by CodeRabbit

  • New Features
    • TextField now supports custom icons from external libraries (FontAwesome, Bootstrap Icons) via the Icon parameter
    • Added customizable password reveal and hide icons with separate configuration options
    • Enhanced icon rendering with flexible sizing constraints

@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

The PR enhances the BitTextField component with external icon library support. New parameters enable custom icons and password reveal/hide icon customization, with built-in Fluent UI alternatives retained. Component logic, styling, and demo content are updated to showcase FontAwesome and Bootstrap Icons integration.

Changes

Cohort / File(s) Summary
Core Component Implementation
src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor, BitTextField.razor.cs
Added five new public parameters (Icon, IconName, RevealPasswordIcon, RevealPasswordIconName, HidePasswordIcon, HidePasswordIconName) to support external icon libraries with precedence rules. Updated template logic to compute icon variables and apply CSS classes conditionally based on BitInputType for password reveal/hide states.
Component Styling
src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.scss
Changed icon sizing constraint from fixed width to flexible minimum width, allowing content to expand beyond previous bounds while maintaining minimum dimensions.
Demo and Documentation
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor, BitTextFieldDemo.razor.cs
Replaced "Style & Class" demo section with new "External Icons" showcase featuring FontAwesome and Bootstrap Icons. Added documentation entries for new icon parameters and BitIconInfo metadata. Renumbered example code blocks to accommodate new external icons example.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Icons now dance in vibrant array,
External and built-in have their say,
FontAwesome, Bootstrap, Fluent delight,
Password reveals or hides from sight,
TextFields bloom with customization bright!

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding new Icon parameters to BitTextField, which is the primary objective of this PR.
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #12094 by introducing new Icon parameters and properties to enable external icon usage in BitTextField.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the Icon parameter feature for BitTextField, including component updates, documentation, styling adjustments, and demo enhancements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
23.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@msynk msynk merged commit be5db15 into bitfoundation:develop Feb 16, 2026
3 of 4 checks passed
@msynk msynk deleted the 12094-blazorui-textfield-new-icons branch February 16, 2026 09:06
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.

The new Icon implementation for the BitTextField component

2 participants