Commit Graph

27 Commits

Author SHA1 Message Date
Ashley Hunter d4da582d40 feat(repo)!: upgrade nx to 22 and angular to 21 (#1430)
* feat(repo)!: upgrade nx to 22 and angular to 21

Upgrade the workspace to Nx 22.7.5 and Angular 21.2.16, and widen the
published peer dependency ranges to support Angular 21 and 22 while
dropping Angular 20.

- nx and @nx/* to 22.7.5; @angular/* to 21.2.16 (framework) and 21.2.14
  (cli, build, devkit, cdk, ssr)
- brain, helm and trpc @angular/* peers to ">=21.0.0 <23.0.0"; the helm
  embla-carousel-angular peer uses the same range
- @spartan-ng/cli minimums raised to >=21 and @schematics/angular to
  21.2.14; the private tools lib aligned to nx 22 / angular 21
- analog 2.6.0, ng-packagr 21, angular-eslint 21, storybook 10, jest 30,
  @testing-library/angular 19 and related tooling
- replace the calendar select host-listener $event with a typed output
  subscription; constrain the ai-chat-link directive to anchors
- drive the menubar e2e arrow keys via native keydown and disable
  Chromium throttling; hold cypress at 14 (15 breaks realPress specs)

BREAKING CHANGE: Angular 20 is no longer supported. spartan/ui now
supports Angular 21 and 22.

* ci: lower unit test parallelism to fit the runner memory

The docs app's vitest + Analog suite peaks at a few GB; running it
alongside two other test projects under --parallel=3 exhausted the
GitHub runner memory and the worker was OOM-killed with no output.
Run at most two test projects concurrently.

* fix(trpc): drop invalid environment providers from the test env module

The Nx 22 migration wrapped provideZoneChangeDetection() in an @NgModule,
but EnvironmentProviders are not valid in @NgModule providers and Angular
21 throws NG0207 at runtime. Restore the plain initTestEnvironment setup
(matching the docs app); the explicit zone provider is unnecessary.

* ci: run the docs app test suite in isolation

Bundling the docs app's vitest + Analog suite into the parallel test run
made it fail in CI while it passes on its own, and the interleaved output
hid the cause. Run the other projects in parallel, then the docs app as a
separate step.

* fix(nx): point test cache inputs at the real jest preset file

The test targets' cache inputs referenced jest.preset.js, but the
workspace preset is jest.preset.cjs, so the input never matched and a
preset change would not invalidate the cache. Fix both the
@nx/vitest:test target (added by the Nx 22 migration) and the existing
@nx/jest:jest target.

* ci: log exit code and retry the docs app test suite once

The docs app's vitest + Analog suite intermittently crashes in CI right
after loading Angular's testing modules, with no error output. Log the
exit code to classify the crash (128+signal indicates a native crash)
and retry once so a flaky crash does not fail the run while the root
cause is investigated.

* ci: clarify docs app test retry after pinpointing the flaky crash

The crash is in app.spec.ts: booting the full app shell (Header/Footer
and their deep import graph) intermittently crashes the vitest worker
during the Analog transform in CI (exit 1, no output, not reproducible
locally). It happens before any test runs, so a vitest per-test retry
cannot help; re-running the suite once does.

* chore(repo): hold analog at 2.1.3 and drop unit-test ci workarounds

Analog 2.6.0 intermittently crashed the docs app's vitest worker in CI
(a flaky transform of the app shell), so keep analog at the nx-migration's
tested 2.1.3, revert the marked bumps that 2.6.0 required, and restore the
ai-chat-link directive selector. Also restore the original unit test ci
step, dropping the parallel, isolation and retry workarounds added while
chasing that crash.
2026-06-08 22:23:45 +02:00
moosme f42aa23865 Merge pull request #1367 from dongphuong0905/bugfix/calendar-range
fix(calendar): calendar range element style
2026-05-27 16:12:07 +02:00
dongphuong0905 ecf2af9775 fix(calendar): calendar range element style 2026-05-22 14:49:02 +07:00
Merlin 5d41ca5ed8 feat(calendar): remove console log 2026-05-20 11:05:22 +02:00
Merlin 67aa2e423d feat(calendar): add highlight days 2026-05-20 10:58:48 +02:00
Merlin 1f43c75931 feat(calendar): add data-slot for button 2026-05-20 09:51:20 +02:00
tomer953 f539b46454 fix(calendar): prevent month navigation overflow when day exceeds target month
BrnCalendarPreviousButton and BrnCalendarNextButton failed to navigate
months when the focused date's day didn't exist in the target month
(e.g., March 29 → February in a non-leap year).

The date adapter's subtract/add with { months: 1 } passes the current
day to JavaScript's Date constructor, which silently overflows invalid
days — new Date(2026, 1, 29) becomes March 1 instead of February 28,
causing the calendar to appear stuck on the same month.

Applied the same fix already used in BrnCalendarCellButton (keyboard
navigation): go to start of month first, then subtract/add 1 month,
and clamp the day to the last day of the target month.

Also renamed the incorrectly named focusPreviousMonth() method in
BrnCalendarNextButton to focusNextMonth().

Closes #1291
2026-03-29 17:22:27 +03:00
Marc Stammerjohann 60ee3dd816 feat(select): refactor template structure (#1277)
* feat(select): refactor select brain/helm

* refactor(select): comment out select

* feat(select): add more examples

* feat(select): add placeholder input to hlmSelectValue

* feat(select): add placeholder text for select value and custom placeholder

* feat(select): add select values

* feat(select): add select-value-template

* feat(select): handle scroll up/down elements

* feat(pagination): use hlm-select

* feat: update snapshot

* fix: lint

* fix(select): update hidden access

* feat(select): update on ai review

* feat(select): add migration and healthcheck

* feat(select): set active item on open, either first or the selected value

* for multiple the last value

* feat(select): make scroll up/down smoother and add showScroll to select content

* feat(calendar): change selectof for month/year select

* feat(select): remove unused importAlias from select migration

* feat(select): dogfeed migration

* fix(select): use placeholder from brn-select

* feat(select): improve keyboard navigations

* open on enter
* select active item on tab

* feat(select): more dogfeeding of the migration, fix placeholder replacement

* fix(select): healthcheck test, as BrnSelectImports is removed w/ brnSelect migration

* fix: lint

* feat(select): improve a11y and update tests

* feat(select): update snapshot

* fix(select): allow empty string to be resolved
2026-03-24 10:41:44 +01:00
notsufferbutbutter 33e0ca7f9d feat: add calendar block with demos (#1038)
* feat(calendar): add new calendar block

- Updated block registry and layout
- Added block preview pages for all calendar demos

* refactor(sidebar): adjust sidebar block layout spacing

* feat(repo): add image preview assets for calendar block demos

* fix(calendar): resolve lint errors in calendar block

* chore(repo): format files to satisfy nx format:check

* fix(calendar): address all requested PR changes

* refactor(calendar): move height css to calendar directly

* refactor(calendar): fix calendar component height

Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>

* fix(calendar): add tuple type for months

* refactor(calendar): change the name of item id

* refactor(calendar): move tuple type to calendar-18n.ts file

* refactor(calendar): resolve merge conflict

* refactor(calendar): resolve merge conflict

* fix(calendar): showing calendar demos normally, not with block preview (rendering in iframe)

* fix(calendar): fix missing gap between button and popover using sideOffset

* fix(calendar): apply background color to brn-calendar instead of hlm-calendar

* refactor(calendar): add placeholder text inside hlm-date-picker

* refactor(calendar): add background color to the calendar

* fix(calendar): fix overflow

* chore: nightly release 2025-11-26 ⚡

* fix: update star count rounding from up to down (#1042)

* feat: polish scroll-area

* fix: code review

* chore: nightly release 2025-11-27 ⚡

* feat: update home screen with examples (#1000)

* feat(repo): update example page

* feat(repo): update example

* feat: add dashboard and playground

* feat(repo): update style

* update home page

* update header

* feat(repo): update structure

* feat(repo): lint

* feat(repo): fix style

* feat(repo): update fallback image for example

* feat(repo): add param when press on examples tabs

* feat(repo): fix review comments

* feat(repo): resolve conflict

* feat(repo): fix new lint rule

* chore: improve seo and update repo links (#1045)

* chore: update seo urls

* chore: update repo link

* chore: update robots sitemap link

* chore: nightly release 2025-11-28 ⚡

* chore: nightly release 2025-11-29 ⚡

* fix(hover-card): focusmonitor stops monitoring on destroy (#1050)

* refactor(calendar): format code

* fix(calendar): correct appointment description text

Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>

* fix(calendar): correct appointment description text

Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>

---------

Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
Co-authored-by: Leonidas <leonidas@spartan.ng>
Co-authored-by: Ajit Panigrahi <ajitzero@gmail.com>
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
Co-authored-by: Merlin Moos <merlin.moos@hotmail.de>
Co-authored-by: Phuong Tran Dong <43351031+dongphuong0905@users.noreply.github.com>
Co-authored-by: Benjamin Heiss <114084395+elite-benni@users.noreply.github.com>
2025-12-17 18:13:51 +01:00
moosme fb9da29ead fix(calendar): selected day number on hover #1051 (#1076)
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-12-15 17:40:11 +01:00
Marc Stammerjohann 11d5b4390c chore: add types to inputs for the docs api (#1062) 2025-12-04 12:37:22 +01:00
Felix Hagemans 8fa0f13ec0 fix: export calendar config interface (#1040) 2025-11-25 19:40:39 +01:00
Marc Stammerjohann c00a34885d feat: calendar polising - use linkedSignal and use host for events (#950)
* feat(calendar): use linkedSignal for focusedDate, replace @HostListener with host

* feat(calendar): split exports into calendar, multi and range modes

* feat(calendar): use only one BrnCalendarImports
2025-10-22 09:48:49 +02:00
Merlin c6e6387739 refactor: align eslint rules 2025-09-29 15:59:20 +02:00
Merlin 9e34f79ded refactor: consistent type import 2025-09-29 14:42:31 +02:00
moosme adf55dbdd3 refactor: polish imports (#890)
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-09-27 17:52:14 -04:00
moosme 2090ea8305 feat: add caption layout to calendar and date picker (#861) 2025-09-23 09:01:26 +02:00
moosme 5def645d0c Id generation (#864)
* chore: nightly release 2025-08-24 ⚡

* chore: nightly release 2025-08-25 ⚡

* chore: nightly release 2025-08-26 ⚡

* chore: nightly release 2025-08-27 ⚡

* chore: nightly release 2025-08-28 ⚡

* feat: start component id by 1 #863

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-08-31 18:21:00 +02:00
moosme 52964e3ccb feat(calendar) Add week starts on (#859)
* chore: nightly release 2025-08-24 ⚡

* chore: nightly release 2025-08-25 ⚡

* chore: nightly release 2025-08-26 ⚡

* feat(calendar): add weekStartsOn input again #722

* feat(calendar): add partial to use method #722

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-08-31 18:14:55 +02:00
moosme 3e878f1baf feat(date-picker): add date range picker #606 (#823)
* feat(date-picker): add date range picker #606

* feat(date-picker): finalize date range picker #606

* feat(date-picker): add utc date adapter #606

* feat(date-picker): add health checks #606

* feat(date-picker): code suggestions #606

* feat(date-picker): restore selected month #606

---------

Co-authored-by: Merlin Moos <merlin.moos@oldendorff.com>
2025-08-24 22:29:00 +02:00
Ashley Hunter b1ed68e0d0 refactor: use the latest angular naming conventions (#766)
* refactor: use the latest angular naming conventions

* build: merge

* docs: fixing unexpected component rename

Co-authored-by: Ajit Panigrahi <ajitzero@gmail.com>

* build: fix generated code

* build: fixing build

* build: fix directive

* feat: adding helm migration

* build: health check detection improvements

* build: checking file type

* build: fix formatting

---------

Co-authored-by: Ajit Panigrahi <ajitzero@gmail.com>
2025-07-30 22:32:02 +02:00
MerlinMoos ced805c807 fix: make access modifier consistent #755 (#758)
* fix: make access modifier consistent #755

* fix: run format

* fix: resolve build issues

---------

Co-authored-by: Merlin Moos <merlin.moos@oldendorff.com>
2025-07-22 17:43:20 +02:00
Jeevan fb3d95a340 Remove standalone property (#701)
* feat: remove standalone property from various directives and components in the Helm UI library

* feat: enable strictStandalone option in Angular compiler settings
2025-06-10 22:00:48 +02:00
nam dohoang 5cb1eb9450 fix(calendar): rendering weekdays should follow changes of rendering days (#669)
* fix(calendar): rendering weekdays should follow changes of rendering days

* refactor(calendar): change viewRefs to mutable

* chore: fix formatting

---------

Co-authored-by: Ashley Hunter <ashley.hunter@hotmail.co.uk>
2025-05-20 16:33:11 +02:00
Marc Stammerjohann e003b7415f feat: calendar/date-picker multi selection (#653)
* feat(calendar): remove date selection on selected click

* feat(calendar): add brn-calendar-multi and hlm-calendar-multi for multi mode

* feat(calendar): add minSelection and maxSelection inputs

* limit deselect and reset selection when max is reached

* feat(date-picker): add hlm-date-picker-multi

* docs(calendar): cleanup multi examples
2025-04-08 09:01:05 +02:00
Benjamin Heiss cd119177b7 refactor: replace AllowSignalWrites with untracked (#607) 2025-02-20 18:27:59 +01:00
Ashley Hunter be4a87dc87 refactor: migrating remaining brain libraries to secondary entrypoints (#523)
* refactor: migrating remaining brain libraries to secondary entrypoints

* refactor: migrating remaining brain libraries to secondary entrypoints
2024-12-10 18:40:46 +01:00