docs(06-03): complete toolbar UI, localization, and dialog factory wiring plan
- SUMMARY.md created for plan 06-03 - STATE.md updated: progress 60%, decisions logged, session recorded - ROADMAP.md updated: phase 6 now 3/5 summaries (In Progress)
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
2. Selecting sites in the toolbar causes all feature tabs to default to those sites when an operation is run
|
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
|
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
|
4. The global site selection persists across tab switches within the same session
|
||||||
**Plans:** 2/5 plans executed
|
**Plans:** 3/5 plans executed
|
||||||
Plans:
|
Plans:
|
||||||
- [ ] 06-01-PLAN.md — GlobalSitesChangedMessage + FeatureViewModelBase extension
|
- [ ] 06-01-PLAN.md — GlobalSitesChangedMessage + FeatureViewModelBase extension
|
||||||
- [ ] 06-02-PLAN.md — MainWindowViewModel global selection state + command
|
- [ ] 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 |
|
| 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 |
|
| 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 |
|
| 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 | - |
|
| 7. User Access Audit | v1.1 | 0/? | Not started | - |
|
||||||
| 8. Simplified Permissions | v1.1 | 0/? | Not started | - |
|
| 8. Simplified Permissions | v1.1 | 0/? | Not started | - |
|
||||||
| 9. Storage Visualization | v1.1 | 0/? | Not started | - |
|
| 9. Storage Visualization | v1.1 | 0/? | Not started | - |
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
|||||||
milestone: v1.0
|
milestone: v1.0
|
||||||
milestone_name: milestone
|
milestone_name: milestone
|
||||||
status: completed
|
status: completed
|
||||||
stopped_at: Completed 06-01-PLAN.md — GlobalSitesChangedMessage and FeatureViewModelBase extension done
|
stopped_at: Completed 06-03-PLAN.md — toolbar Select Sites button, localization keys, and dialog factory wiring done
|
||||||
last_updated: "2026-04-07T08:04:57.041Z"
|
last_updated: "2026-04-07T08:08:43.719Z"
|
||||||
last_activity: 2026-04-07 — Roadmap created (Phases 6-9), 10/10 requirements mapped
|
last_activity: 2026-04-07 — Roadmap created (Phases 6-9), 10/10 requirements mapped
|
||||||
progress:
|
progress:
|
||||||
total_phases: 4
|
total_phases: 4
|
||||||
completed_phases: 0
|
completed_phases: 0
|
||||||
total_plans: 5
|
total_plans: 5
|
||||||
completed_plans: 2
|
completed_plans: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
# Project State
|
# Project State
|
||||||
@@ -44,6 +44,7 @@ Phase 6 [ ] → Phase 7 [ ] → Phase 8 [ ] → Phase 9 [ ]
|
|||||||
| Tests | 134 pass / 22 skip | — |
|
| Tests | 134 pass / 22 skip | — |
|
||||||
| Phase 06-global-site-selection P02 | 8 | 1 tasks | 1 files |
|
| 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 P01 | 2 | 2 tasks | 3 files |
|
||||||
|
| Phase 06-global-site-selection P03 | 2 | 3 tasks | 5 files |
|
||||||
|
|
||||||
## Accumulated Context
|
## Accumulated Context
|
||||||
|
|
||||||
@@ -59,6 +60,8 @@ Decisions are logged in PROJECT.md Key Decisions table.
|
|||||||
- [Phase 06-02]: MainWindowViewModel uses Func<Window>? factory for SitePickerDialog and broadcasts GlobalSitesChangedMessage via WeakReferenceMessenger on collection change
|
- [Phase 06-02]: MainWindowViewModel uses Func<Window>? factory for SitePickerDialog and broadcasts GlobalSitesChangedMessage via WeakReferenceMessenger on collection change
|
||||||
- [Phase 06-01]: GlobalSitesChangedMessage uses IReadOnlyList<SiteInfo> (snapshot, not ObservableCollection) so receivers cannot mutate sender state
|
- [Phase 06-01]: GlobalSitesChangedMessage uses IReadOnlyList<SiteInfo> (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-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
|
### Pending Todos
|
||||||
|
|
||||||
@@ -70,6 +73,6 @@ None.
|
|||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-04-07T08:04:57.038Z
|
Last session: 2026-04-07T08:08:43.717Z
|
||||||
Stopped at: Completed 06-01-PLAN.md — GlobalSitesChangedMessage and FeatureViewModelBase extension done
|
Stopped at: Completed 06-03-PLAN.md — toolbar Select Sites button, localization keys, and dialog factory wiring done
|
||||||
Resume file: None
|
Resume file: None
|
||||||
|
|||||||
117
.planning/phases/06-global-site-selection/06-03-SUMMARY.md
Normal file
117
.planning/phases/06-global-site-selection/06-03-SUMMARY.md
Normal file
@@ -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<TenantProfile, SitePickerDialog> 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 `<Separator />`, `<Button>` (bound to `OpenGlobalSitePickerCommand`), and `<TextBlock>` (bound to `GlobalSitesSelectedLabel`) to the ToolBar in `MainWindow.xaml`
|
||||||
|
- Wired `viewModel.OpenGlobalSitePickerDialog` factory in `MainWindow.xaml.cs` — clicking "Select Sites" now opens `SitePickerDialog` via DI, identical to the `PermissionsView` pattern
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
Each task was committed atomically:
|
||||||
|
|
||||||
|
1. **Task 1: Add EN/FR localization keys** - `185642f` (feat)
|
||||||
|
2. **Task 2: Localize GlobalSitesSelectedLabel** - `467a940` (feat)
|
||||||
|
3. **Task 3: Toolbar controls + dialog factory wiring** - `45eb531` (feat)
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
|
||||||
|
- `SharepointToolbox/Localization/Strings.resx` - Added 5 toolbar.selectSites / toolbar.globalSites keys (EN)
|
||||||
|
- `SharepointToolbox/Localization/Strings.fr.resx` - Added 5 matching FR translations
|
||||||
|
- `SharepointToolbox/ViewModels/MainWindowViewModel.cs` - GlobalSitesSelectedLabel now uses TranslationSource.Instance
|
||||||
|
- `SharepointToolbox/MainWindow.xaml` - Added Separator + Select Sites Button + count TextBlock to ToolBar
|
||||||
|
- `SharepointToolbox/MainWindow.xaml.cs` - Added OpenGlobalSitePickerDialog factory wiring + using SharepointToolbox.Core.Models
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
|
||||||
|
- Added `using SharepointToolbox.Core.Models` to `MainWindow.xaml.cs` to satisfy `TenantProfile` reference in the factory lambda. This is appropriate — code-behind already imports View and ViewModel namespaces.
|
||||||
|
- `toolbar.selectSites.tooltipDisabled` key added to both resource files for completeness, but not wired in XAML. WPF `Button` does not render `ToolTip` when `IsEnabled=false` without a `Style` trigger; adding that trigger was deferred as it was explicitly called out as optional in the plan.
|
||||||
|
- `TextBlock` foreground set to `Gray` to provide visual separation from active toolbar buttons.
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
None - plan executed exactly as written.
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
|
||||||
|
None. Build succeeded with 0 errors after each task. Two pre-existing warnings (`_hasLocalSiteOverride` field never assigned in `PermissionsViewModel` and `DuplicatesViewModel`) are out of scope for this plan.
|
||||||
|
|
||||||
|
## User Setup Required
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
|
||||||
|
- Toolbar is fully wired: button opens dialog, label updates live, both localized
|
||||||
|
- `OpenGlobalSitePickerDialog` factory is live — clicking "Select Sites" while connected to a tenant will open `SitePickerDialog` and populate `GlobalSelectedSites`
|
||||||
|
- `WeakReferenceMessenger` broadcasts `GlobalSitesChangedMessage` on every site collection change (from 06-02) — all tab VMs registered in 06-04 will receive updates automatically
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 06-global-site-selection*
|
||||||
|
*Completed: 2026-04-07*
|
||||||
Reference in New Issue
Block a user