Conversation
✅ Deploy Preview for ngx-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| this._validate(); | ||
| this.dispatchEvent(new FocusEvent('blur', { bubbles: true, composed: true })); | ||
| } |
There was a problem hiding this comment.
Floating label doesn't update on focus and blur
High Severity
The _handleFocus and _handleBlur methods don't call _updateActiveState(). The _updateActiveState method is responsible for setting the active attribute based on this._focused || hasValue, which the CSS uses to float the label. Since these handlers only update _focused but don't trigger _updateActiveState(), focusing an empty input (without a placeholder) won't float the label, and blurring won't properly reset the label position. This breaks the core floating label UX pattern.
Additional Locations (1)
| if (this._spinnerInterval !== undefined) { | ||
| clearInterval(this._spinnerInterval); | ||
| this._spinnerInterval = undefined; | ||
| } |
There was a problem hiding this comment.
Number input spinner intervals not cleaned up on disconnect
Medium Severity
The input component creates _spinnerTimeout and _spinnerInterval timers for number input increment/decrement buttons, but lacks a disconnectedCallback to clean them up. The button component properly implements disconnectedCallback to clear its timers, but the input component does not. If the component is removed from the DOM while a user is holding a spinner button, the interval continues running indefinitely, causing a resource leak.
| } | ||
|
|
||
| this._validate(); | ||
| } |
There was a problem hiding this comment.
Select floating label doesn't update on focus/blur
Low Severity
The select component's _handleFocus and _handleBlur methods don't call _updateActiveState(), following the same pattern as the input component bug. The _updateActiveState method sets the active attribute based on this._focused || hasValue || this._open, but this calculation is never triggered on focus/blur. The impact is mitigated by the default placeholder = 'Select...' which causes has-placeholder to be set, but if placeholder="" is explicitly set, the label won't float on focus.
Additional Locations (1)
| this._value = Array.isArray(val) ? val : (val ? [val] : []); | ||
| } else { | ||
| this._value = val ? [val] : []; | ||
| } |
There was a problem hiding this comment.
Select cannot store options with falsy values
High Severity
The value setter uses a truthy check (val ?) to determine whether to store the value. This means options with legitimate falsy values like 0, '', or false cannot be selected. When a user clicks an option with value: 0, the setter evaluates 0 ? [0] : [] which results in an empty array, discarding the selection. The check should use val != null instead of val to only exclude null/undefined while allowing other falsy values.


Summary
Replace me with a description of changes. Include screenshots where appropriate.
Checklist
/projects/swimlane/ngx-ui/CHANGELOG.mdunder HEAD (Unreleased)*required
Note
Medium Risk
Mostly additive, but introduces a new packaged component library (build config, exports, and demo) plus complex form-associated custom elements and async state handling that could impact consumers if APIs/styling or packaging details are off.
Overview
Adds a new
projects/swimlane/lit-uipackage providing Lit-based web components intended to match@swimlane/ngx-ui, includingswim-button,swim-input, andswim-selectwith shared design tokens/base styles and coercion utilities.Includes a Vite-powered demo app showcasing component variants/interactions (promise-driven button states, input validation/spinners/password toggle, select filtering/multi-select) and publishes the library via
package.jsonexports for per-component imports.Adds extensive project documentation/implementation notes (
README.md,plan.md,*_IMPLEMENTATION.md) plus package metadata and lockfile for dependency management.Written by Cursor Bugbot for commit 40ce52f. This will update automatically on new commits. Configure here.