Skip to content

WIP: feat(toaster): add toaster component#6816

Open
lexasq wants to merge 19 commits into
developmentfrom
add-toaster-component
Open

WIP: feat(toaster): add toaster component#6816
lexasq wants to merge 19 commits into
developmentfrom
add-toaster-component

Conversation

@lexasq

@lexasq lexasq commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Work in progress: Adding toaster component to ngx-bootstrap.

DerekLiang and others added 18 commits November 1, 2024 23:59
* 20.0.2

* Upgrade angular 21 (#6788)

* chore: upgrade package

* chore(ngx-bootstrap-docs): updates Angular to v21

* refactor: migrate common-docs HTML templates to Angular control flow

* chore: update common-docs TypeScript configuration

* fix: add type guard for event target in ExamplesComponent

* chore(tsconfig): update compiler options for new build setup

* refactor(accordion): migrate HTML templates to new control flow syntax

* refactor(alerts): migrate HTML templates to new control flow syntax

* refactor(buttons): migrate HTML templates to new control flow syntax

* refactor(carousel): migrate HTML templates to new control flow syntax

* refactor(datepicker): migrate HTML templates to new control flow syntax

* refactor: update Angular template control flow syntax to `@for` and `@if`

* chore(tsconfig): update TypeScript configuration for modern Angular

* build: update root tsconfig for doc pages to support new module resolution

* build: standardize and update tsconfig.lib.json for doc pages libraries

* build: standardize and update tsconfig.spec.json for doc pages tests

* refactor: migrate doc page templates to Angular control flow syntax

* refactor(build): update TypeScript and Jest configurations

* refactor(buttons): widen HostListener event types to generic Event

* chore: migrate templates to  built-in control flow

* refactor: remove redundant @angular/common imports

* chore: migrate component templates to new Angular control flow syntax

* chore: modernize TypeScript and Jest configurations across libraries

* test: update jest-preset-angular serializer paths

* test: standardize Jest Zone.js test environment setup

* refactor(jest): update configuration for Nx and jest-preset-angular

* test(typeahead): update Jest 'toThrowError' to 'toThrow' matcher

* fix(typeahead): correct test file formatting and syntax

* chore: update package-lock.json dependencies and properties

* refactor: standardize TypeScript and Jest configurations across libraries

* refactor: improve event handling type safety and robustness

* chore: migrate Angular templates to new control flow syntax

* test(carousel): add CommonModule to carousel test component

* chore: bump version to 21.0.0

* chore(release): bump project version to 21.0.0

* fix(typeahead): prevents potential null reference

* fix(dependencies): fixed package.lock

* fix(dependencies): fixed app.component

* Update package.json

* Update package-lock.json

---------

Co-authored-by: Amine CHERGUI <chergui.amine@gmail.com>
…ropdown and collapse components

- Removed Angular animation imports and definitions from collapse and dropdown components.
- Implemented CSS transitions for collapse and dropdown animations using `requestAnimationFrame` and `setTimeout` for fallback handling.
- Updated tests to remove dependencies on `BrowserAnimationsModule`.
- Refactored datepicker and typeahead components to use similar CSS transition logic.
- Improved performance and reduced complexity by eliminating the need for Angular's animation builder.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds animateExpand and onTransitionFinished to ngx-bootstrap/utils:
a single implementation of the expand-from-zero CSS transition pattern
(pin at 0, forced reflow, transition to scrollHeight) with guarded
transitionend handling, a duration-derived fallback timeout, and a
cancel function for ngOnDestroy cleanup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ants

Each package now exports *_ANIMATION_DURATION_MS with the CSS timing
string built from it, so fallback timeouts can be computed instead of
hardcoded (270ms/450ms) and cannot drift if a duration changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces five copy-pasted expand-animation implementations with the
shared helper. Side fixes that come with the consolidation:
- dropdown container: fallback timer is now cancelled on destroy
- typeahead container: transitionend listener is now removed on
  destroy, and the constructor no longer sets an empty id attribute
  (the directive assigns the real popupId later)
- all sites now ignore transitionend events bubbled from child
  elements or fired for unrelated properties

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… tests

The bidirectional expand/collapse and mid-flight reversal logic is kept
exactly as-is; only the transitionend listener + fallback timeout
lifecycle moves to the shared primitive. The hand-parsed 400ms constant
is replaced by COLLAPSE_ANIMATION_DURATION_MS.

Adds the previously TODO-ed animated-path specs: expand/collapse event
emission, fallback timeout, reversal via input flip and via the public
API mid-transition, and listener/timer cleanup on destroy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the migration: the published package no longer declares
@angular/animations as a peer dependency, and ng add no longer injects
BrowserAnimationsModule into the consumer root module. Removing a peer
dependency is backward compatible for existing consumers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lexasq lexasq added the WIP label Jun 12, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying ngx-bootstrap with  Cloudflare Pages  Cloudflare Pages

Latest commit: 291a8b1
Status: ✅  Deploy successful!
Preview URL: https://0a4be7e1.ngx-bootstrap-avf.pages.dev
Branch Preview URL: https://add-toaster-component.ngx-bootstrap-avf.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants