Add type definition for calendar settings array #113

Merged
admin-backup merged 2 commits from copilot/sub-pr-30 into refacto-cal-settings 2025-11-04 00:50:33 +01:00
admin-backup commented 2025-11-04 00:44:55 +01:00 (Migrated from 172.24.0.1:8928)

Addresses feedback on #30 to improve type safety of the settings array in CalendarSettingsService.

Changes

  • Added CalendarSetting interface defining the structure of settings objects
  • Applied explicit type annotation readonly CalendarSetting[] to the settings array
  • Imported WritableSignal from @angular/core
interface CalendarSetting {
	signal: WritableSignal<boolean>;
	id: string;
	description: string;
}

readonly settings: readonly CalendarSetting[] = [
	{
		signal: this.showWeekNumbers,
		id: 'showWeekNumbers',
		description: 'Afficher les numéros de semaine',
	},
	// ...
];

This provides compile-time type checking for all settings array operations and makes the expected structure explicit.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Addresses feedback on #30 to improve type safety of the `settings` array in `CalendarSettingsService`. ## Changes - Added `CalendarSetting` interface defining the structure of settings objects - Applied explicit type annotation `readonly CalendarSetting[]` to the settings array - Imported `WritableSignal` from `@angular/core` ```typescript interface CalendarSetting { signal: WritableSignal<boolean>; id: string; description: string; } readonly settings: readonly CalendarSetting[] = [ { signal: this.showWeekNumbers, id: 'showWeekNumbers', description: 'Afficher les numéros de semaine', }, // ... ]; ``` This provides compile-time type checking for all settings array operations and makes the expected structure explicit. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
admin-backup commented 2025-11-04 00:44:55 +01:00 (Migrated from 172.24.0.1:8928)

assigned to @Copilot

assigned to `@Copilot`
admin-backup commented 2025-11-04 00:44:55 +01:00 (Migrated from 172.24.0.1:8928)

assigned to @THoguet

assigned to `@THoguet`
admin-backup commented 2025-11-04 00:44:57 +01:00 (Migrated from 172.24.0.1:8928)

mentioned in merge request !30

mentioned in merge request [!30](https://gitea.nessar.fr/nessar/vac-optimizer/pulls/108)
admin-backup commented 2025-11-04 00:49:01 +01:00 (Migrated from 172.24.0.1:8928)

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: ng build (vac-optimizer) (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `fonts.googleapis.com` > - Triggering command: `ng build (vac-optimizer)` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/THoguet/vac-optimizer/settings/copilot/coding_agent) (admins only) > > </details>
admin-backup commented 2025-11-04 00:49:01 +01:00 (Migrated from 172.24.0.1:8928)

changed title from {-[WIP] Fix dynamic settings in-} calendar settings {-dialog-} to {+Add type definition for+} calendar settings {+array+}

changed title from **{-[WIP] Fix dynamic settings in-} calendar settings {-dialog-}** to **{+Add type definition for+} calendar settings {+array+}**
admin-backup commented 2025-11-04 00:49:07 +01:00 (Migrated from 172.24.0.1:8928)

requested review from @THoguet

requested review from `@THoguet`
admin-backup commented 2025-11-04 00:50:24 +01:00 (Migrated from 172.24.0.1:8928)

approved this merge request

approved this merge request
admin-backup (Migrated from 172.24.0.1:8928) approved these changes 2025-11-04 00:50:24 +01:00
admin-backup commented 2025-11-04 00:50:33 +01:00 (Migrated from 172.24.0.1:8928)

Merged by: THoguet at 2025-11-03 23:50:33 UTC

*Merged by: THoguet at 2025-11-03 23:50:33 UTC*
admin-backup (Migrated from 172.24.0.1:8928) closed this pull request 2025-11-04 00:50:33 +01:00
admin-backup (Migrated from 172.24.0.1:8928) merged commit into refacto-cal-settings 2025-11-04 00:50:33 +01:00

Preserved source assignment/reviewer metadata. Historical accounts stay inactive.

Source requested reviewers: admin-backup (GitLab user 3).

The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.

<!-- gitlab-to-gitea-assignment:35:MergeRequest:35 --> Preserved source assignment/reviewer metadata. Historical accounts stay inactive. Source requested reviewers: admin-backup (GitLab user 3). The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.

Preserved GitLab !35 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 8.

gitlab-35-mergerequest-35.md (SHA-256 19af7b043acbd20742f1ed83b2a284593f6b5a99544e6bbe9f7d433b8f745ff4)

gitlab-35-mergerequest-35.json (SHA-256 00e1cd95caee947170b5b2ffafb3c2a54bbdedbe7e906c72efb326bc9f61cf57)

Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.

<!-- gitlab-to-gitea-history:35:MergeRequest:35 --> Preserved GitLab !35 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 8. [gitlab-35-mergerequest-35.md](https://gitea.nessar.fr/attachments/8039d2c5-7b7e-4770-975a-da6ad9304d9d) (SHA-256 `19af7b043acbd20742f1ed83b2a284593f6b5a99544e6bbe9f7d433b8f745ff4`) [gitlab-35-mergerequest-35.json](https://gitea.nessar.fr/attachments/0e30d8b9-190f-4d40-b13f-5fadad987526) (SHA-256 `00e1cd95caee947170b5b2ffafb3c2a54bbdedbe7e906c72efb326bc9f61cf57`) Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/vac-optimizer#113