96 lines
4.0 KiB
Markdown
96 lines
4.0 KiB
Markdown
---
|
|
phase: 14-user-directory-view
|
|
plan: 02
|
|
subsystem: ui
|
|
tags: [wpf, xaml, datagrid, radio-button, data-trigger, directory-browse]
|
|
|
|
requires:
|
|
- phase: 14-user-directory-view/01
|
|
provides: "Code-behind handler DirectoryDataGrid_MouseDoubleClick and localization keys"
|
|
- phase: 13-user-directory-data
|
|
provides: "ViewModel properties: IsBrowseMode, DirectoryUsersView, LoadDirectoryCommand, etc."
|
|
provides:
|
|
- "Complete directory browse UI in UserAccessAuditView with mode toggle, DataGrid, and loading UX"
|
|
- "Mode switching between search and browse panels"
|
|
- "Guest user highlighting in directory DataGrid"
|
|
affects: [user-directory-view]
|
|
|
|
tech-stack:
|
|
added: []
|
|
patterns: ["DataTrigger inverse visibility for mode-conditional panels", "Shared SelectedUsers section visible across modes"]
|
|
|
|
key-files:
|
|
created: []
|
|
modified: ["SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml"]
|
|
|
|
key-decisions:
|
|
- "Used DataTrigger inverse visibility for search panel instead of ConverterParameter=Inverse (more reliable in WPF)"
|
|
- "Used plain English DataGrid column headers instead of localized bindings (DataGridTextColumn.Header binding is unreliable)"
|
|
- "GroupBox.Header uses nested TextBlock for localized binding compatibility with GroupBox.Style"
|
|
|
|
patterns-established:
|
|
- "DataTrigger inverse visibility: Style with default Visible, DataTrigger sets Collapsed on true"
|
|
- "Mode-conditional panels: search/browse GroupBoxes with opposite visibility triggers"
|
|
|
|
requirements-completed: [UDIR-05, UDIR-01]
|
|
|
|
duration: 2min
|
|
completed: 2026-04-09
|
|
---
|
|
|
|
# Phase 14 Plan 02: Directory Browse UI Summary
|
|
|
|
**Full directory browse mode UI with mode toggle RadioButtons, 5-column DataGrid, loading status, guest highlighting, and shared SelectedUsers section**
|
|
|
|
## Performance
|
|
|
|
- **Duration:** 2 min
|
|
- **Started:** 2026-04-09T07:28:21Z
|
|
- **Completed:** 2026-04-09T07:30:10Z
|
|
- **Tasks:** 1
|
|
- **Files modified:** 1
|
|
|
|
## Accomplishments
|
|
- Mode toggle (Search/Browse Directory) RadioButtons at top of left panel with InverseBoolConverter binding
|
|
- Search panel collapses when IsBrowseMode=true via DataTrigger approach; Browse panel shows via BoolToVisibilityConverter
|
|
- Directory panel with Load/Cancel buttons, IncludeGuests checkbox, filter TextBox, status/count display
|
|
- DataGrid with 5 columns (Name, Email, Department, Job Title, Type) bound to DirectoryUsersView
|
|
- Guest users highlighted in orange (#F39C12) with SemiBold font weight via DataTrigger on UserType
|
|
- SelectedUsers ItemsControl extracted from search GroupBox to shared section visible in both modes
|
|
- Scan Options and Run/Export buttons remain always visible in both modes
|
|
|
|
## Task Commits
|
|
|
|
Each task was committed atomically:
|
|
|
|
1. **Task 1: Restructure left panel with mode toggle and conditional panels** - `1a1e83c` (feat)
|
|
|
|
## Files Created/Modified
|
|
- `SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml` - Added mode toggle, browse panel with DataGrid, extracted SelectedUsers to shared section
|
|
|
|
## Decisions Made
|
|
- Used DataTrigger inverse visibility for search panel (Visible by default, Collapsed when IsBrowseMode=True) instead of ConverterParameter=Inverse -- more reliable across WPF versions
|
|
- Used plain English strings for DataGrid column headers ("Name", "Email", "Department", "Job Title", "Type") instead of localized bindings -- DataGridTextColumn.Header does not reliably support binding in standard WPF
|
|
- Moved GroupBox.Header to nested TextBlock element for search panel to avoid conflict between inline Header binding and GroupBox.Style on the same element
|
|
|
|
## Deviations from Plan
|
|
|
|
None - plan executed exactly as written.
|
|
|
|
## Issues Encountered
|
|
None.
|
|
|
|
## User Setup Required
|
|
None - no external service configuration required.
|
|
|
|
## Next Phase Readiness
|
|
- Phase 14 is now complete (both plans executed)
|
|
- All directory browse UI elements are wired to ViewModel properties from Phase 13
|
|
- Manual testing recommended to verify visual layout, mode switching, DataGrid scrolling, and double-click selection
|
|
|
|
---
|
|
*Phase: 14-user-directory-view*
|
|
*Completed: 2026-04-09*
|
|
|
|
## Self-Check: PASSED
|