|
| 1 | +# Interactive Configuration Tool Implementation |
| 2 | + |
| 3 | +## Design Constraints |
| 4 | + |
| 5 | +### 🎯 **Migration Type Architecture** |
| 6 | + |
| 7 | +The wizard is built around three primary migration types with specific endpoint and processor constraints: |
| 8 | + |
| 9 | +#### **1. WorkItems Migration** |
| 10 | + |
| 11 | +- **Required Endpoint**: `TfsWorkItemEndpoint` |
| 12 | +- **Required Processor**: `TfsWorkItemMigrationProcessor` |
| 13 | +- **Behavior**: Endpoint and processor are locked/pre-selected. Only processor options are configurable. |
| 14 | +- **Use Case**: Standard work item migration between Azure DevOps organizations or TFS instances. |
| 15 | + |
| 16 | +#### **2. Pipelines Migration** |
| 17 | + |
| 18 | +- **Required Endpoint**: `AzureDevOpsEndpoint` |
| 19 | +- **Required Processor**: `AzureDevOpsPipelineProcessor` |
| 20 | +- **Behavior**: Endpoint and processor are locked/pre-selected. Only processor options are configurable. |
| 21 | +- **Use Case**: Migration of build and release pipelines between Azure DevOps organizations. |
| 22 | + |
| 23 | +#### **3. Custom Migration** |
| 24 | + |
| 25 | +- **Endpoints**: User can add multiple named endpoints of any valid type |
| 26 | +- **Processors**: User can select any number of processors with full configuration flexibility |
| 27 | +- **Behavior**: Complete freedom to configure complex migration scenarios |
| 28 | +- **Constraints**: Type validation ensures only compatible named endpoints are available for each processor type |
| 29 | +- **Use Case**: Advanced scenarios requiring multiple processors, custom field mapping, or specialized migration patterns. |
| 30 | + |
| 31 | +### 🔧 **Processor Configuration Behavior** |
| 32 | + |
| 33 | +#### **Constrained Modes (WorkItems & Pipelines)** |
| 34 | + |
| 35 | +- Processor selection is **locked** based on migration type |
| 36 | +- Only processor-specific **options** are editable (e.g., WIQL queries, field mappings, performance settings) |
| 37 | +- Simplified UI focuses on configuration rather than selection |
| 38 | + |
| 39 | +#### **Custom Mode** |
| 40 | + |
| 41 | +- **Full processor selection**: Choose from all available processors |
| 42 | +- **Multiple processor support**: Add/remove processors as needed |
| 43 | +- **Named endpoint association**: Each processor can reference named endpoints by name |
| 44 | +- **Type validation**: Only compatible endpoints appear in dropdown for each processor |
| 45 | + |
| 46 | +## Overview |
| 47 | + |
| 48 | +This implementation provides a **comprehensive interactive configuration wizard** for the Azure DevOps Migration Tools. The wizard guides users through a step-by-step process to build their migration configuration without requiring deep knowledge of the underlying JSON structure. |
| 49 | + |
| 50 | +## Architecture & Features |
| 51 | + |
| 52 | +### 🎯 **Core Design Principles** |
| 53 | + |
| 54 | +1. **Progressive Disclosure**: Information is revealed step-by-step to avoid overwhelming users |
| 55 | +2. **Smart Defaults**: Pre-configured sensible defaults based on migration type |
| 56 | +3. **Real-time Validation**: Immediate feedback on configuration choices |
| 57 | +4. **Data-Driven**: Leverages existing YAML configuration data from the documentation system |
| 58 | +5. **Responsive Design**: Works seamlessly on desktop, tablet, and mobile devices |
| 59 | + |
| 60 | +### 🚀 **Key Features Implemented** |
| 61 | + |
| 62 | +#### **Multi-Step Wizard Flow** |
| 63 | + |
| 64 | +```text |
| 65 | +Step 1: Migration Type Selection |
| 66 | +├── WorkItems (TfsWorkItemEndpoint + TfsWorkItemMigrationProcessor) |
| 67 | +├── Pipelines (AzureDevOpsEndpoint + AzureDevOpsPipelineProcessor) |
| 68 | +└── Custom (User-defined endpoints and processors) |
| 69 | +
|
| 70 | +Step 2: Endpoint Configuration |
| 71 | +├── Pre-configured endpoints (WorkItems/Pipelines modes) |
| 72 | +├── Named endpoint creation (Custom mode) |
| 73 | +├── Authentication (PAT tokens) |
| 74 | +└── Connection validation |
| 75 | +
|
| 76 | +Step 3: Processor Configuration |
| 77 | +├── Locked processor options (WorkItems/Pipelines modes) |
| 78 | +├── Processor selection and addition (Custom mode) |
| 79 | +├── Processor-specific configuration |
| 80 | +└── Named endpoint assignment per processor |
| 81 | +
|
| 82 | +Step 4: Field Mapping Strategy |
| 83 | +├── Automatic mapping |
| 84 | +├── Manual mapping options |
| 85 | +└── Custom field transformations |
| 86 | +
|
| 87 | +Step 5: Advanced Options |
| 88 | +├── Performance tuning |
| 89 | +├── Error handling |
| 90 | +└── Logging configuration |
| 91 | +
|
| 92 | +Step 6: Review & Export |
| 93 | +├── Generated configuration preview |
| 94 | +├── Validation warnings |
| 95 | +└── Download/copy functionality |
| 96 | +``` |
| 97 | + |
| 98 | +#### **User Experience Features** |
| 99 | + |
| 100 | +- **Visual Progress Indicator**: Shows completion percentage and current step |
| 101 | +- **Step Navigation**: Previous/Next buttons with validation |
| 102 | +- **Smart Selections**: Migration type determines available processors |
| 103 | +- **Real-time Preview**: Live configuration generation |
| 104 | +- **Copy/Download Options**: Easy export of generated configuration |
| 105 | +- **Responsive Design**: Mobile-friendly interface |
| 106 | +- **Dark/Light Theme Support**: Integrates with existing theme system |
| 107 | + |
| 108 | +#### **Technical Features** |
| 109 | + |
| 110 | +- **Hugo Integration**: Leverages existing YAML data files |
| 111 | +- **Client-side Processing**: No server-side dependencies |
| 112 | +- **Security Conscious**: Credentials only used for config generation |
| 113 | +- **Validation System**: Input validation and error handling |
| 114 | +- **Bootstrap 5**: Consistent with existing documentation styling |
| 115 | + |
| 116 | +## Implementation Details |
| 117 | + |
| 118 | +### **File Structure** |
| 119 | + |
| 120 | +``` |
| 121 | +docs/ |
| 122 | +├── content/docs/config-wizard.md # Wizard page content |
| 123 | +├── layouts/config-wizard.html # Custom Hugo layout |
| 124 | +├── static/css/config-wizard.css # Wizard-specific styles |
| 125 | +└── static/js/config-wizard.js # Main application logic |
| 126 | +``` |
| 127 | + |
| 128 | +### **Data Integration** |
| 129 | + |
| 130 | +The wizard dynamically loads configuration data from the existing YAML files: |
| 131 | + |
| 132 | +- `reference.processors.*.yaml` - Processor configurations |
| 133 | +- `reference.endpoints.*.yaml` - Endpoint options |
| 134 | +- `reference.fieldmaps.*.yaml` - Field mapping options |
| 135 | +- `reference.tools.*.yaml` - Tool configurations |
| 136 | + |
| 137 | +### **Technology Stack** |
| 138 | + |
| 139 | +- **Frontend**: Vanilla JavaScript (ES6+), HTML5, CSS3 |
| 140 | +- **Styling**: Bootstrap 5.3.6, Custom CSS with CSS Variables |
| 141 | +- **Icons**: Font Awesome 6 |
| 142 | +- **Build System**: Hugo static site generator |
| 143 | +- **Data Format**: YAML → JSON conversion |
| 144 | + |
| 145 | +## Usage Examples |
| 146 | + |
| 147 | +### **For Beginners** |
| 148 | + |
| 149 | +1. Visit `/docs/config-wizard/` |
| 150 | +2. Select "WorkItems" migration type |
| 151 | +3. Configure TfsWorkItemEndpoint with source and target organization URLs |
| 152 | +4. Accept default TfsWorkItemMigrationProcessor settings |
| 153 | +5. Choose "Automatic Mapping" for field mapping |
| 154 | +6. Use default advanced settings |
| 155 | +7. Download generated `configuration.json` |
| 156 | + |
| 157 | +### **For Advanced Users** |
| 158 | + |
| 159 | +1. Select "Custom" migration type for comprehensive setup |
| 160 | +2. Add multiple named endpoints (TfsWorkItemEndpoint, AzureDevOpsEndpoint, etc.) |
| 161 | +3. Configure multiple processors with custom settings |
| 162 | +4. Define manual field mapping strategies |
| 163 | +5. Tune performance and error handling parameters |
| 164 | +6. Generate complex configurations with custom WIQL queries and processor combinations |
| 165 | + |
| 166 | +## Benefits |
| 167 | + |
| 168 | +### **User Benefits** |
| 169 | + |
| 170 | +- **Reduced Learning Curve**: No need to understand complex JSON structure |
| 171 | +- **Faster Setup**: 5-10 minutes vs hours of manual configuration |
| 172 | +- **Error Prevention**: Validation prevents common configuration mistakes |
| 173 | +- **Educational**: Learn about available options through guided explanations |
| 174 | +- **Confidence Building**: Visual progress and validation provide reassurance |
| 175 | + |
| 176 | +### **Project Benefits** |
| 177 | + |
| 178 | +- **Lower Support Burden**: Fewer configuration-related support requests |
| 179 | +- **Better Adoption**: Easier onboarding leads to higher tool adoption |
| 180 | +- **Documentation Synergy**: Leverages existing documentation infrastructure |
| 181 | +- **Maintainability**: Auto-updates as processors/options change |
| 182 | + |
| 183 | +## Future Enhancements |
| 184 | + |
| 185 | +### **Phase 2 Features** |
| 186 | + |
| 187 | +- **Configuration Templates**: Save and reuse common configurations |
| 188 | +- **Validation Engine**: Real-time connection testing |
| 189 | +- **WIQL Query Builder**: Visual query construction interface |
| 190 | +- **Batch Operations**: Configure multiple migration jobs |
| 191 | +- **Import/Export**: Load existing configurations for modification |
| 192 | + |
| 193 | +### **Advanced Features** |
| 194 | + |
| 195 | +- **Migration Scenarios**: Pre-built configurations for common patterns |
| 196 | +- **Performance Estimator**: Predict migration time based on data size |
| 197 | +- **Dependency Checker**: Validate prerequisites and permissions |
| 198 | +- **Progress Tracking**: Real-time migration monitoring integration |
| 199 | + |
| 200 | +## Implementation Strategy |
| 201 | + |
| 202 | +### **How to Build an Interactive Configuration Tool** |
| 203 | + |
| 204 | +Based on this implementation, here's the recommended approach for similar tools: |
| 205 | + |
| 206 | +#### **1. Data Architecture** |
| 207 | + |
| 208 | +```javascript |
| 209 | +// Leverage existing structured data |
| 210 | +const configData = { |
| 211 | + processors: loadFromYAML(), |
| 212 | + endpoints: loadFromYAML(), |
| 213 | + fieldMaps: loadFromYAML(), |
| 214 | + templates: loadFromYAML(), |
| 215 | +}; |
| 216 | +``` |
| 217 | + |
| 218 | +#### **2. Progressive UI Design** |
| 219 | + |
| 220 | +```javascript |
| 221 | +class ConfigWizard { |
| 222 | + constructor() { |
| 223 | + this.steps = [ |
| 224 | + { id: "type", title: "Choose Type", validator: this.validateType }, |
| 225 | + { id: "endpoints", title: "Configure Endpoints", validator: this.validateEndpoints }, |
| 226 | + // ... more steps |
| 227 | + ]; |
| 228 | + } |
| 229 | +} |
| 230 | +``` |
| 231 | + |
| 232 | +#### **3. Smart Defaults System** |
| 233 | + |
| 234 | +```javascript |
| 235 | +getProcessorsForType(migrationType) { |
| 236 | + const mapping = { |
| 237 | + 'workitems': { |
| 238 | + processors: ['TfsWorkItemMigrationProcessor'], |
| 239 | + endpoints: ['TfsWorkItemEndpoint'], |
| 240 | + locked: true |
| 241 | + }, |
| 242 | + 'pipelines': { |
| 243 | + processors: ['AzureDevOpsPipelineProcessor'], |
| 244 | + endpoints: ['AzureDevOpsEndpoint'], |
| 245 | + locked: true |
| 246 | + }, |
| 247 | + 'custom': { |
| 248 | + processors: [], // User selectable |
| 249 | + endpoints: [], // User configurable |
| 250 | + locked: false |
| 251 | + } |
| 252 | + }; |
| 253 | + return mapping[migrationType] || { processors: [], endpoints: [], locked: false }; |
| 254 | +} |
| 255 | +``` |
| 256 | + |
| 257 | +#### **4. Real-time Validation** |
| 258 | + |
| 259 | +```javascript |
| 260 | +validateStep(stepData) { |
| 261 | + const validators = { |
| 262 | + endpoints: this.validateEndpoints, |
| 263 | + processors: this.validateProcessors |
| 264 | + }; |
| 265 | + return validators[this.currentStep](stepData); |
| 266 | +} |
| 267 | +``` |
| 268 | + |
| 269 | +#### **5. Configuration Generation** |
| 270 | + |
| 271 | +```javascript |
| 272 | +generateConfig() { |
| 273 | + return { |
| 274 | + MigrationTools: { |
| 275 | + Version: "16.0", |
| 276 | + Endpoints: this.buildEndpoints(), |
| 277 | + Processors: this.buildProcessors(), |
| 278 | + // ... other sections |
| 279 | + } |
| 280 | + }; |
| 281 | +} |
| 282 | +``` |
| 283 | + |
| 284 | +## Integration Points |
| 285 | + |
| 286 | +The wizard integrates seamlessly with the existing documentation: |
| 287 | + |
| 288 | +- **Navigation**: Linked from main docs page and getting started guide |
| 289 | +- **Styling**: Uses existing Bootstrap theme and color schemes |
| 290 | +- **Data**: Leverages auto-generated YAML configuration data |
| 291 | +- **Comments**: Supports Giscus comments for user feedback |
| 292 | +- **Editing**: "Edit this page" links to GitHub for improvements |
| 293 | + |
| 294 | +This implementation demonstrates how to build a sophisticated, user-friendly configuration tool that significantly improves the user experience while leveraging existing documentation infrastructure. |
0 commit comments