diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 3f60b46..e5f1347 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -36,7 +36,7 @@ 2. Selecting sites in the toolbar causes all feature tabs to default to those sites when an operation is run 3. A user can override the global selection on any individual tab without clearing the global state 4. The global site selection persists across tab switches within the same session -**Plans:** 2/5 plans executed +**Plans:** 3/5 plans executed Plans: - [ ] 06-01-PLAN.md — GlobalSitesChangedMessage + FeatureViewModelBase extension - [ ] 06-02-PLAN.md — MainWindowViewModel global selection state + command @@ -86,7 +86,7 @@ Plans: | 3. Storage and File Operations | v1.0 | 8/8 | Complete | 2026-04-02 | | 4. Bulk Operations and Provisioning | v1.0 | 10/10 | Complete | 2026-04-03 | | 5. Distribution and Hardening | v1.0 | 3/3 | Complete | 2026-04-03 | -| 6. Global Site Selection | 2/5 | In Progress| | - | +| 6. Global Site Selection | 3/5 | In Progress| | - | | 7. User Access Audit | v1.1 | 0/? | Not started | - | | 8. Simplified Permissions | v1.1 | 0/? | Not started | - | | 9. Storage Visualization | v1.1 | 0/? | Not started | - | diff --git a/.planning/STATE.md b/.planning/STATE.md index 21680cc..9b0193d 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -3,14 +3,14 @@ gsd_state_version: 1.0 milestone: v1.0 milestone_name: milestone status: completed -stopped_at: Completed 06-01-PLAN.md — GlobalSitesChangedMessage and FeatureViewModelBase extension done -last_updated: "2026-04-07T08:04:57.041Z" +stopped_at: Completed 06-03-PLAN.md — toolbar Select Sites button, localization keys, and dialog factory wiring done +last_updated: "2026-04-07T08:08:43.719Z" last_activity: 2026-04-07 — Roadmap created (Phases 6-9), 10/10 requirements mapped progress: total_phases: 4 completed_phases: 0 total_plans: 5 - completed_plans: 2 + completed_plans: 3 --- # Project State @@ -44,6 +44,7 @@ Phase 6 [ ] → Phase 7 [ ] → Phase 8 [ ] → Phase 9 [ ] | Tests | 134 pass / 22 skip | — | | Phase 06-global-site-selection P02 | 8 | 1 tasks | 1 files | | Phase 06-global-site-selection P01 | 2 | 2 tasks | 3 files | +| Phase 06-global-site-selection P03 | 2 | 3 tasks | 5 files | ## Accumulated Context @@ -59,6 +60,8 @@ Decisions are logged in PROJECT.md Key Decisions table. - [Phase 06-02]: MainWindowViewModel uses Func? factory for SitePickerDialog and broadcasts GlobalSitesChangedMessage via WeakReferenceMessenger on collection change - [Phase 06-01]: GlobalSitesChangedMessage uses IReadOnlyList (snapshot, not ObservableCollection) so receivers cannot mutate sender state - [Phase 06-01]: FeatureViewModelBase.OnGlobalSitesReceived (private) updates GlobalSites then calls OnGlobalSitesChanged (protected virtual) — separates storage from derived class hooks +- [Phase 06-03]: Added using SharepointToolbox.Core.Models to MainWindow.xaml.cs for TenantProfile in SitePickerDialog factory lambda +- [Phase 06-03]: toolbar.selectSites.tooltipDisabled added to resources but not wired in XAML — WPF Button disabled tooltip requires style trigger (deferred) ### Pending Todos @@ -70,6 +73,6 @@ None. ## Session Continuity -Last session: 2026-04-07T08:04:57.038Z -Stopped at: Completed 06-01-PLAN.md — GlobalSitesChangedMessage and FeatureViewModelBase extension done +Last session: 2026-04-07T08:08:43.717Z +Stopped at: Completed 06-03-PLAN.md — toolbar Select Sites button, localization keys, and dialog factory wiring done Resume file: None diff --git a/.planning/phases/06-global-site-selection/06-03-SUMMARY.md b/.planning/phases/06-global-site-selection/06-03-SUMMARY.md new file mode 100644 index 0000000..110fc2a --- /dev/null +++ b/.planning/phases/06-global-site-selection/06-03-SUMMARY.md @@ -0,0 +1,117 @@ +--- +phase: 06-global-site-selection +plan: 03 +subsystem: ui +tags: [wpf, xaml, toolbar, localization, mvvm, site-picker] + +# Dependency graph +requires: + - phase: 06-global-site-selection/06-02 + provides: OpenGlobalSitePickerCommand, GlobalSitesSelectedLabel, OpenGlobalSitePickerDialog factory property + - phase: 06-global-site-selection/06-01 + provides: SitePickerDialog (dialog already registered in DI) +provides: + - Toolbar button "Select Sites" bound to OpenGlobalSitePickerCommand + - Toolbar TextBlock bound to GlobalSitesSelectedLabel for live site count + - SitePickerDialog factory wired in MainWindow.xaml.cs + - 5 EN localization keys for toolbar.selectSites and toolbar.globalSites + - 5 FR localization keys matching EN keys + - GlobalSitesSelectedLabel fully localized via TranslationSource +affects: + - 06-04 (no XAML impact; GlobalSitesChangedMessage broadcast already live from 06-02) + +# Tech tracking +tech-stack: + added: [] + patterns: + - "TranslationSource.Instance[key] for code-behind label formatting (same as PermissionsViewModel)" + - "Func DI factory resolved in MainWindow.xaml.cs code-behind" + - "XAML binding Path=[toolbar.selectSites] for localized button content and tooltip" + +key-files: + created: [] + modified: + - SharepointToolbox/Localization/Strings.resx + - SharepointToolbox/Localization/Strings.fr.resx + - SharepointToolbox/ViewModels/MainWindowViewModel.cs + - SharepointToolbox/MainWindow.xaml + - SharepointToolbox/MainWindow.xaml.cs + +key-decisions: + - "Added using SharepointToolbox.Core.Models to MainWindow.xaml.cs for TenantProfile — required by SitePickerDialog factory lambda" + - "TextBlock foreground set to Gray to visually distinguish label from action buttons" + - "Disabled tooltip (toolbar.selectSites.tooltipDisabled) added to resources for future use; not wired in XAML because WPF Button does not show ToolTip when IsEnabled=false without a style trigger" + +patterns-established: + - "Global site picker factory pattern in MainWindow.xaml.cs mirrors PermissionsView factory" + +requirements-completed: + - SITE-01 + +# Metrics +duration: 2min +completed: 2026-04-07 +--- + +# Phase 06 Plan 03: Toolbar UI, Localization, and Dialog Factory Wiring Summary + +**Select Sites button and count label added to MainWindow toolbar; 5 EN + 5 FR localization keys added; GlobalSitesSelectedLabel localized via TranslationSource; SitePickerDialog factory wired in MainWindow code-behind** + +## Performance + +- **Duration:** ~2 min +- **Started:** 2026-04-07T08:06:13Z +- **Completed:** 2026-04-07T08:07:51Z +- **Tasks:** 3 +- **Files modified:** 5 + +## Accomplishments + +- Added 5 EN and 5 FR localization keys for the global site picker toolbar controls — button label, tooltip, disabled tooltip, count format, and empty state +- Updated `GlobalSitesSelectedLabel` in `MainWindowViewModel` from hardcoded English strings to `TranslationSource.Instance` lookups — label now switches language with the app +- Added ``, `