Skip to content

refactor(phone-number): convert phoneNumber and selectedCountry to signals#2254

Merged
spliffone merged 1 commit into
mainfrom
refactor/phone-number-use-signals
Jul 1, 2026
Merged

refactor(phone-number): convert phoneNumber and selectedCountry to signals#2254
spliffone merged 1 commit into
mainfrom
refactor/phone-number-use-signals

Conversation

@spike-rabbit

@spike-rabbit spike-rabbit commented Jul 1, 2026

Copy link
Copy Markdown
Member

This is a preparation so we can convert other fields to computed later in a follow-up PR.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the SiPhoneNumberInputComponent to use Angular Signals for state management, converting selectedCountry and phoneNumber into signals and updating the template and component logic accordingly. The review feedback focuses on ensuring proper reactivity and safety when working with these signals. Specifically, it recommends configuring the phoneNumber signal with a custom equality check to handle in-place mutations of the mutable PhoneNumber class, extracting signals into local variables to avoid multiple reads and unsafe non-null assertions, and explicitly calling .set() after mutating the phone number object to trigger reactivity.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
@spike-rabbit spike-rabbit force-pushed the refactor/phone-number-use-signals branch from 14f4203 to da7b475 Compare July 1, 2026 08:50
@spike-rabbit spike-rabbit marked this pull request as ready for review July 1, 2026 08:53
@spike-rabbit spike-rabbit requested review from a team as code owners July 1, 2026 08:53
@spike-rabbit spike-rabbit force-pushed the refactor/phone-number-use-signals branch from da7b475 to f5436c6 Compare July 1, 2026 09:30
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
Comment thread projects/element-ng/phone-number/si-phone-number-input.component.ts Outdated
@spike-rabbit spike-rabbit force-pushed the refactor/phone-number-use-signals branch from f5436c6 to bd3f759 Compare July 1, 2026 10:57
…o signals

This is a preparation so we can convert other fields to computed later in a follow-up PR.
@spike-rabbit spike-rabbit force-pushed the refactor/phone-number-use-signals branch from bd3f759 to 13045c2 Compare July 1, 2026 11:22
@spliffone spliffone enabled auto-merge July 1, 2026 12:56
@spliffone spliffone dismissed chintankavathia’s stale review July 1, 2026 12:57

Already implemented

@spliffone spliffone added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit a4bdf73 Jul 1, 2026
16 checks passed
@spliffone spliffone deleted the refactor/phone-number-use-signals branch July 1, 2026 13:11
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.

3 participants