export function betaFeedbackSurvey(form: FormTs) {
// Beta Feature Feedback - Comprehensive beta testing feedback form
// Demonstrates: Pages (multi-page), StarRating, MatrixQuestion, ThumbRating, RadioButton, SuggestionChips
// ============================================
// MULTI-PAGE WIZARD
// ============================================
const pages = form.addPages('betaPages', { heightMode: 'current-page' });
// ============================================
// PAGE 1: Feature Overview & First Impressions
// ============================================
const page1 = pages.addPage('overview');
page1.addRow(row => {
row.addTextPanel('header', {
label: 'Beta Feature Feedback',
computedValue: () => 'Help us improve this feature before launch. Your feedback shapes the final product.',
customStyles: {
background: 'linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%)',
color: 'white',
padding: '24px',
borderRadius: '12px',
textAlign: 'center'
}
});
});
const overviewSection = page1.addSubform('overviewSection', {
title: 'Feature Overview'
});
overviewSection.addRow(row => {
row.addDropdown('featureName', {
label: 'Which beta feature are you reviewing?',
options: [
{ id: 'dashboard-v2', name: 'New Dashboard (v2)' },
{ id: 'ai-suggestions', name: 'AI-Powered Suggestions' },
{ id: 'collaboration', name: 'Real-time Collaboration' },
{ id: 'export-wizard', name: 'Export Wizard' },
{ id: 'mobile-app', name: 'Mobile App Beta' },
{ id: 'other', name: 'Other Feature' }
],
placeholder: 'Select feature...',
isRequired: true
}, '1fr');
row.addDropdown('usageDuration', {
label: 'How long have you been using it?',
options: [
{ id: 'first-use', name: 'This is my first time' },
{ id: 'few-days', name: 'A few days' },
{ id: 'one-week', name: 'About a week' },
{ id: 'two-weeks', name: '2+ weeks' },
{ id: 'month', name: 'A month or more' }
],
placeholder: 'Select duration...',
isRequired: true
}, '1fr');
});
// Custom feature name if "Other"
overviewSection.addRow(row => {
row.addTextbox('otherFeature', {
label: 'Feature name',
placeholder: 'Enter the feature name...',
isRequired: true,
isVisible: () => overviewSection.dropdown('featureName')?.value() === 'other'
});
});
overviewSection.addSpacer();
const impressionSection = page1.addSubform('impressionSection', {
title: 'First Impressions'
});
impressionSection.addRow(row => {
row.addEmojiRating('firstImpression', {
label: 'What was your first impression of this feature?',
preset: 'satisfaction',
size: 'lg',
showLabels: true,
alignment: 'center'
});
});
impressionSection.addRow(row => {
row.addThumbRating('meetsExpectations', {
label: 'Does this feature meet your expectations?',
showLabels: true,
upLabel: 'Yes, meets or exceeds',
downLabel: 'Falls short',
size: 'lg',
alignment: 'center'
});
});
// Page 1 navigation
page1.addSpacer();
page1.addRow(row => {
row.addButton('nextToPage2', {
label: 'Continue to Usability →',
onClick: () => pages.goToPage('usability')
});
});
// ============================================
// PAGE 2: Usability & Experience
// ============================================
const page2 = pages.addPage('usability');
page2.addRow(row => {
row.addTextPanel('page2Header', {
label: 'Usability Assessment',
computedValue: () => 'Rate your experience using this feature.',
customStyles: {
backgroundColor: '#f3e8ff',
color: '#6b21a8',
padding: '16px',
borderRadius: '8px',
textAlign: 'center'
}
});
});
const usabilitySection = page2.addSubform('usabilitySection', {
title: 'Ease of Use'
});
usabilitySection.addRow(row => {
row.addMatrixQuestion('usabilityMatrix', {
label: 'Rate the following aspects:',
rows: [
{ id: 'intuitive', label: 'Intuitive to use', isRequired: true },
{ id: 'learn', label: 'Easy to learn', isRequired: true },
{ id: 'fast', label: 'Fast and responsive', isRequired: true },
{ id: 'design', label: 'Visual design', isRequired: false },
{ id: 'help', label: 'Help/documentation', isRequired: false }
],
columns: [
{ id: 'poor', label: 'Poor' },
{ id: 'fair', label: 'Fair' },
{ id: 'good', label: 'Good' },
{ id: 'great', label: 'Great' }
],
striped: true,
fullWidth: true
});
});
usabilitySection.addSpacer();
usabilitySection.addRow(row => {
row.addRatingScale('overallUsability', {
label: 'Overall, how easy is this feature to use?',
preset: 'ces',
lowLabel: 'Very difficult',
highLabel: 'Very easy',
alignment: 'center'
});
});
// Page 2 navigation
page2.addSpacer();
page2.addRow(row => {
row.addButton('backToPage1', {
label: '← Back',
onClick: () => pages.goToPage('overview')
}, '1fr');
row.addButton('nextToPage3', {
label: 'Continue to Issues →',
onClick: () => pages.goToPage('issues')
}, '1fr');
});
// ============================================
// PAGE 3: Bugs & Issues
// ============================================
const page3 = pages.addPage('issues');
page3.addRow(row => {
row.addTextPanel('page3Header', {
label: 'Issues & Bugs',
computedValue: () => 'Help us identify and fix problems.',
customStyles: {
backgroundColor: '#fef3c7',
color: '#92400e',
padding: '16px',
borderRadius: '8px',
textAlign: 'center'
}
});
});
const issuesSection = page3.addSubform('issuesSection', {
title: 'Bug Report'
});
issuesSection.addRow(row => {
row.addThumbRating('encounteredBugs', {
label: 'Did you encounter any bugs or issues?',
showLabels: true,
upLabel: 'Yes, I found issues',
downLabel: 'No issues found',
size: 'lg',
alignment: 'center'
});
});
// Conditional bug details
const bugDetailsSection = page3.addSubform('bugDetailsSection', {
title: 'Bug Details',
isVisible: () => issuesSection.thumbRating('encounteredBugs')?.value() === 'up'
});
bugDetailsSection.addRow(row => {
row.addRadioButton('bugSeverity', {
label: 'How severe was the most significant issue?',
options: [
{ id: 'critical', name: 'Critical - Feature unusable / data loss' },
{ id: 'major', name: 'Major - Significant functionality broken' },
{ id: 'minor', name: 'Minor - Inconvenient but workable' },
{ id: 'cosmetic', name: 'Cosmetic - Visual issues only' }
],
orientation: 'vertical',
isRequired: true
});
});
bugDetailsSection.addRow(row => {
row.addCheckboxList('bugTypes', {
label: 'What types of issues did you experience?',
options: [
{ id: 'crash', name: 'Crashes or freezes' },
{ id: 'error', name: 'Error messages' },
{ id: 'slow', name: 'Slow performance' },
{ id: 'data', name: 'Data not saving correctly' },
{ id: 'ui', name: 'UI/display problems' },
{ id: 'navigation', name: 'Navigation issues' },
{ id: 'integration', name: 'Integration problems' },
{ id: 'other', name: 'Other issues' }
],
orientation: 'vertical'
});
});
bugDetailsSection.addSpacer();
bugDetailsSection.addRow(row => {
row.addTextarea('bugDescription', {
label: 'Describe the issue(s) you encountered',
placeholder: 'What happened? Steps to reproduce? What did you expect?',
rows: 4,
autoExpand: true,
isRequired: true
});
});
// Stability rating
const stabilitySection = page3.addSubform('stabilitySection', {
title: 'Stability Assessment'
});
stabilitySection.addRow(row => {
row.addStarRating('stabilityRating', {
label: 'How stable is this feature?',
maxStars: 5,
size: 'lg',
alignment: 'center'
});
});
// Page 3 navigation
page3.addSpacer();
page3.addRow(row => {
row.addButton('backToPage2', {
label: '← Back',
onClick: () => pages.goToPage('usability')
}, '1fr');
row.addButton('nextToPage4', {
label: 'Continue to Suggestions →',
onClick: () => pages.goToPage('suggestions')
}, '1fr');
});
// ============================================
// PAGE 4: Suggestions & Final Thoughts
// ============================================
const page4 = pages.addPage('suggestions');
page4.addRow(row => {
row.addTextPanel('page4Header', {
label: 'Suggestions & Final Thoughts',
computedValue: () => 'Share your ideas for improvement.',
customStyles: {
backgroundColor: '#d1fae5',
color: '#065f46',
padding: '16px',
borderRadius: '8px',
textAlign: 'center'
}
});
});
const suggestionsSection = page4.addSubform('suggestionsSection', {
title: 'Feature Improvements'
});
suggestionsSection.addRow(row => {
row.addSuggestionChips('improvementAreas', {
label: 'What areas need the most improvement?',
suggestions: [
{ id: 'speed', name: 'Performance/Speed' },
{ id: 'ui', name: 'User Interface' },
{ id: 'features', name: 'More Features' },
{ id: 'simpler', name: 'Simplify It' },
{ id: 'docs', name: 'Documentation' },
{ id: 'integration', name: 'Integrations' }
],
max: 3,
alignment: 'left'
});
});
suggestionsSection.addSpacer();
suggestionsSection.addRow(row => {
row.addTextarea('improvementIdeas', {
label: 'What specific improvements would you suggest?',
placeholder: 'Share your ideas for making this feature better...',
rows: 3,
autoExpand: true
});
});
suggestionsSection.addRow(row => {
row.addTextarea('missingFeatures', {
label: 'What features are missing that you expected?',
placeholder: 'What did you expect to find that wasn\'t there?',
rows: 2,
autoExpand: true
});
});
// Launch readiness
const readinessSection = page4.addSubform('readinessSection', {
title: 'Launch Readiness'
});
readinessSection.addRow(row => {
row.addRadioButton('launchReady', {
label: 'Is this feature ready for general availability?',
options: [
{ id: 'yes', name: 'Yes, ready to launch' },
{ id: 'almost', name: 'Almost, minor fixes needed' },
{ id: 'no-major', name: 'No, needs significant work' },
{ id: 'no-redesign', name: 'No, needs fundamental redesign' }
],
orientation: 'vertical'
});
});
readinessSection.addRow(row => {
row.addTextarea('launchBlockers', {
label: 'What must be fixed before launch?',
placeholder: 'List the critical issues that would block release...',
rows: 2,
isVisible: () => {
const ready = readinessSection.radioButton('launchReady')?.value();
return ready === 'no-major' || ready === 'no-redesign';
}
});
});
// Final recommendation
const finalSection = page4.addSubform('finalSection', {
title: 'Final Recommendation'
});
finalSection.addRow(row => {
row.addRatingScale('recommendFeature', {
label: 'How likely are you to recommend this feature to others?',
preset: 'nps',
showCategoryLabel: true,
showSegmentColors: true,
alignment: 'center'
});
});
finalSection.addSpacer();
finalSection.addRow(row => {
row.addTextarea('finalComments', {
label: 'Any final comments for the product team?',
placeholder: 'Thank you for being a beta tester! Share any last thoughts...',
rows: 2,
autoExpand: true
});
});
// Summary
const summarySection = page4.addSubform('summarySection', {
title: 'Feedback Summary',
isVisible: () => {
const impression = page1.field('overviewSection')?.value();
const usability = page2.field('usabilitySection')?.value();
return impression !== undefined || usability !== undefined;
}
});
summarySection.addRow(row => {
row.addTextPanel('summary', {
computedValue: () => {
const feature = overviewSection.dropdown('featureName')?.value() || 'Feature';
const impression = impressionSection.emojiRating('firstImpression')?.value();
const meetsExpect = impressionSection.thumbRating('meetsExpectations')?.value();
const usability = usabilitySection.ratingScale('overallUsability')?.value() ?? 0;
const hasBugs = issuesSection.thumbRating('encounteredBugs')?.value();
const stability = stabilitySection.starRating('stabilityRating')?.value() ?? 0;
const launchReady = readinessSection.radioButton('launchReady')?.value();
const nps = finalSection.ratingScale('recommendFeature')?.value() ?? 0;
const impressionLabels: Record<string, string> = {
'very-bad': 'Very Negative', 'bad': 'Negative', 'neutral': 'Neutral',
'good': 'Positive', 'excellent': 'Very Positive'
};
const readinessLabels: Record<string, string> = {
'yes': 'Ready', 'almost': 'Almost Ready',
'no-major': 'Needs Work', 'no-redesign': 'Needs Redesign'
};
let summary = `Beta Feedback: ${feature}\n`;
summary += '═'.repeat(30) + '\n\n';
summary += `First Impression: ${impressionLabels[impression || ''] || 'Not rated'}\n`;
summary += `Meets Expectations: ${meetsExpect === 'up' ? 'Yes' : meetsExpect === 'down' ? 'No' : 'Not answered'}\n`;
summary += `Usability (1-7): ${usability > 0 ? usability : 'Not rated'}\n`;
summary += `Stability: ${stability > 0 ? '★'.repeat(stability) + '☆'.repeat(5 - stability) : 'Not rated'}\n`;
summary += `Bugs Found: ${hasBugs === 'up' ? 'Yes' : 'No'}\n`;
summary += `Launch Ready: ${readinessLabels[launchReady || ''] || 'Not answered'}\n`;
summary += `NPS Score: ${nps > 0 ? nps : 'Not rated'}\n`;
return summary;
},
customStyles: {
backgroundColor: '#f3e8ff',
padding: '16px',
borderRadius: '8px',
whiteSpace: 'pre-wrap',
fontFamily: 'monospace',
fontSize: '13px',
borderLeft: '4px solid #8b5cf6'
}
});
});
// Page 4 navigation
page4.addSpacer();
page4.addRow(row => {
row.addButton('backToPage3', {
label: '← Back to Issues',
onClick: () => pages.goToPage('issues')
});
});
// ============================================
// FORM CONFIGURATION
// ============================================
form.configureSubmitButton({
label: 'Submit Beta Feedback',
isVisible: () => pages.currentPageIndex() === 3
});
form.configureCompletionScreen({
type: 'text',
title: 'Thank you, Beta Tester!',
message: 'Your feedback is invaluable in shaping this feature before launch. The product team will review your input and may follow up with additional questions. Watch for updates in your beta tester portal!'
});
}