Skip to content

Commit cbe0285

Browse files
authored
Create Confuguration Wizard (#2851)
having a goo at creating a [configuration wizard](https://blue-river-093197403-2851.westeurope.5.azurestaticapps.net/docs/config-wizard/) that folks can use to build basic configs: https://blue-river-093197403-2851.westeurope.5.azurestaticapps.net/docs/config-wizard/ Not sure how I am going to keep it in sync.
2 parents c5a70b3 + 59ad7fd commit cbe0285

File tree

19 files changed

+2332
-94
lines changed

19 files changed

+2332
-94
lines changed

.prettierrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"plugins": ["prettier-plugin-go-template"],
3+
"overrides": [
4+
{
5+
"files": ["*.html"],
6+
"options": {
7+
"parser": "go-template"
8+
}
9+
}
10+
],
11+
"goTemplateBracketSpacing": true,
12+
"bracketSameLine": true,
13+
"printWidth": 455,
14+
"formatOnSave": true
15+
}

.vscode/copilot-instructions.md

Whitespace-only changes.
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
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.

docs/content/docs/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ discussionId: 2832
1010

1111
---
1212

13+
14+

docs/content/docs/config-wizard.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Interactive Configuration Wizard
3+
description: Build your Azure DevOps Migration Tools configuration with our interactive step-by-step wizard supporting three migration type architectures
4+
weight: 50
5+
date: 2025-06-26T12:00:00Z
6+
discussionId:
7+
aliases:
8+
- /config-wizard/
9+
- /wizard/
10+
- /configure/
11+
layout: config-wizard
12+
---
13+
14+
Use this interactive wizard to build your Azure DevOps Migration Tools configuration. The wizard supports three primary migration types:
15+
16+
- **Work Items**: Standard work item migration with pre-configured TfsWorkItemEndpoint and TfsWorkItemMigrationProcessor
17+
- **Pipelines**: Pipeline migration with pre-configured AzureDevOpsEndpoint and AzureDevOpsPipelineProcessor
18+
- **Custom**: Advanced scenarios with complete flexibility to configure multiple endpoints and processors
19+
20+
The wizard will guide you through each step and generate a complete configuration file based on your selections and the migration type constraints.

docs/content/docs/get-started/getting-started/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Watch the [Video Overview](https://youtu.be/RCJsST0xBCE) to get started in 30 mi
2323

2424
This is going to be a crash course and I really recommend watching [What can go wrong and what can go right with a migration via Azure DevOps](https://youtu.be/3jYFD-6_kZk?si=xxvBoljBWjGAOVuv) and then [Basic Work Item Migration with the Azure DevOps Migration Tools](https://youtu.be/Qt1Ywu_KLrc?si=uEXjLS2pwe244ugV) before you get started! This will prep you for the journey ahead.
2525

26+
> **New to migration tools?** Try our [Interactive Configuration Wizard]({{< ref "docs/config-wizard" >}}) to build your configuration step-by-step with guided explanations!
27+
2628
### 1. Create a default configuration file
2729

2830
1. Open your [Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/) in your chosen working folder

0 commit comments

Comments
 (0)