Skip to content

Avoid spacing for icon-only smart paste buttons - #1761

Merged
hakenr merged 2 commits into
havit:mainfrom
snowyukitty:fix/smart-paste-icon-spacing
Aug 31, 2026
Merged

hakenr merged 2 commits into
havit:mainfrom
snowyukitty:fix/smart-paste-icon-spacing

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Fixes #1682

Summary

  • base smart-paste spacing on caller-provided child content, not the installed wrapper
  • apply the same rule to Start and End icon placement
  • add bUnit coverage for icon-only, text, child-content, and repeated renders

Validation

  • Bootstrap test project build for net10.0 (0 warnings, 0 errors under WSL)
  • Bootstrap test assembly: 468 passed, 0 failed, 0 skipped
  • full Havit.Blazor.slnx build (0 warnings, 0 errors under WSL)
  • native Windows strict build (0 errors; 14 subst-path duplicate-import warnings)
  • git diff --check

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes #1682 by preventing non-breaking-space separators on icon-only smart paste buttons.

Changes:

  • Uses caller-provided child content when deciding whether to render spacing.
  • Covers start/end icon placement, text, child content, and repeated renders.
  • References the Smart component project from Bootstrap tests.

Reviewed changes

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

File Description
Havit.Blazor.Components.Web.Bootstrap.Smart/HxSmartPasteButton.cs Corrects spacer conditions.
Havit.Blazor.Components.Web.Bootstrap.Tests/Buttons/HxSmartPasteButtonTests.cs Adds regression coverage.
Havit.Blazor.Components.Web.Bootstrap.Tests/Havit.Blazor.Components.Web.Bootstrap.Tests.csproj Adds the Smart project reference.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hakenr hakenr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Extract the tests to a separate new test-project for Havit.Blazor.Components.Web.Bootstrap.Smart package.

…Web.Bootstrap.Smart.Tests project

Co-Authored-By: Claude Fable 5 <[email protected]>
@hakenr

hakenr commented Aug 31, 2026

Copy link
Copy Markdown
Member

@snowyukitty Many thanx for your contribution! 🩷

@hakenr
hakenr merged commit cb24f0e into havit:main Aug 31, 2026
1 check 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.

HxSmartPasteButton: ChildContent null check is always true — nbsp spacer rendered even for icon-only buttons

3 participants