Skip to content

Widget component library#1178

Open
marjan-georgiev wants to merge 3 commits intomasterfrom
widget-component-library
Open

Widget component library#1178
marjan-georgiev wants to merge 3 commits intomasterfrom
widget-component-library

Conversation

@marjan-georgiev
Copy link
Member

@marjan-georgiev marjan-georgiev commented Feb 3, 2026

Summary

Replace me with a description of changes. Include screenshots where appropriate.

Checklist

  • *Added unit tests
  • *Added a code reviewer
  • Added changes to /projects/swimlane/ngx-ui/CHANGELOG.md under HEAD (Unreleased)
  • Updated the demo page
  • Included screenshots of visual changes

*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-ui package providing Lit-based web components intended to match @swimlane/ngx-ui, including swim-button, swim-input, and swim-select with 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.json exports 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.

@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for ngx-ui ready!

Name Link
🔨 Latest commit 40ce52f
🔍 Latest deploy log https://app.netlify.com/projects/ngx-ui/deploys/6981c6b15d45790008bdd869
😎 Deploy Preview https://deploy-preview-1178--ngx-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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 }));
}
Copy link

Choose a reason for hiding this comment

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

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)

Fix in Cursor Fix in Web

if (this._spinnerInterval !== undefined) {
clearInterval(this._spinnerInterval);
this._spinnerInterval = undefined;
}
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

}

this._validate();
}
Copy link

Choose a reason for hiding this comment

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

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)

Fix in Cursor Fix in Web

this._value = Array.isArray(val) ? val : (val ? [val] : []);
} else {
this._value = val ? [val] : [];
}
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

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.

1 participant