design-angular-kit
design-angular-kit copied to clipboard
feat(divider): create standalone ItDividerComponent
Summary
Closes #606
Extracts the divider logic from ItDropdownItemComponent into a dedicated standalone component ItDividerComponent, making it reusable across any list or dropdown context.
Changes
New component: ItDividerComponent
- Dual selector:
<it-divider>(custom element) andli[itDivider](attribute on native<li>) - Smart host detection: auto-wraps content in
<li>only when the host element is not already a<li>, avoiding invalid nested<li>elements - Renders
<span class="divider">\</span>— fully compatible with Bootstrap Italia's existing CSS - Standalone component with
OnPushchange detection
Integration
- Exported via
public_api.tsfor direct imports - Added to
ItDropdownModulefor seamless use alongside dropdown items
Usage examples
<ul>
<li itDropdownItem>Item 1</li>
<it-divider></it-divider>
<li itDropdownItem>Item 2</li>
</ul>
<ul>
<li itDropdownItem>Item 1</li>
<li itDivider></li>
<li itDropdownItem>Item 2</li>
</ul>
Testing
- 11 new unit tests covering:
- Custom element selector rendering and
<li>wrapping - Attribute selector rendering (no nested
<li>) - Standalone usage outside list context
- Multiple dividers in a single list (mixed selectors)
- Custom element selector rendering and
- 120/120 tests passing (109 baseline + 11 new)
- 0 lint errors, 8 pre-existing warnings
- Double gate passed (two consecutive clean runs)
⚠️ This reopens #639 which was accidentally closed due to fork deletion.
@giulio-leone is attempting to deploy a commit to the dip-trasformazione-digitale Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| design-angular-kit | Preview | Mar 27, 2026 3:50pm |