@@ -139,6 +139,7 @@ const mapAnswerSourceToWizard = (answer: DataAnswerSource): WizardAnswer => {
139139 isDefault : answer . isDefault ,
140140 disabled : answer . disabled ,
141141 disabledLabel : answer . disabledLabel ,
142+ skippable : answer . skippable ,
142143 }
143144}
144145
@@ -154,6 +155,7 @@ const buildStepFromQuestionSet = (
154155 question : question . question ,
155156 allowMultiple : question . allowMultiple ,
156157 answers : question . answers . map ( mapAnswerSourceToWizard ) ,
158+ skippable : question . skippable ,
157159 } ) ) ,
158160} )
159161
@@ -165,6 +167,7 @@ const idesStep: WizardStep = {
165167 id : "preferredIdes" ,
166168 question : "Which IDEs should we prepare instructions for?" ,
167169 allowMultiple : true ,
170+ skippable : false ,
168171 answers : ( rawIdes as IdeConfig [ ] ) . map ( ( ide ) => ( {
169172 value : ide . id ,
170173 label : ide . label ,
@@ -179,6 +182,7 @@ const idesStep: WizardStep = {
179182 disabled : ide . enabled === false ,
180183 disabledLabel : ide . enabled === false ? "Soon" : undefined ,
181184 docs : ide . docs ,
185+ skippable : ide . skippable ,
182186 } ) ) ,
183187 } ,
184188 ] ,
@@ -191,13 +195,15 @@ const frameworksStep: WizardStep = {
191195 {
192196 id : FRAMEWORK_QUESTION_ID ,
193197 question : "Which framework are you working with?" ,
198+ skippable : false ,
194199 answers : ( rawFrameworks as FrameworkConfig [ ] ) . map ( ( framework ) => ( {
195200 value : framework . id ,
196201 label : framework . label ,
197202 icon : framework . icon ,
198203 disabled : framework . enabled === false ,
199204 disabledLabel : framework . enabled === false ? "Soon" : undefined ,
200205 docs : framework . docs ,
206+ skippable : framework . skippable ,
201207 } ) ) ,
202208 } ,
203209 ] ,
@@ -241,6 +247,7 @@ const filesStep: WizardStep = {
241247 id : "outputFiles" ,
242248 question : "Which instruction files should we generate?" ,
243249 allowMultiple : true ,
250+ skippable : false ,
244251 answers : ( filesData as FileOutputConfig [ ] ) . map ( ( file ) => {
245252 const infoLines : string [ ] = [ ]
246253 if ( file . filename ) {
@@ -259,6 +266,7 @@ const filesStep: WizardStep = {
259266 tags : file . format ? [ file . format ] : undefined ,
260267 disabled : file . enabled === false ,
261268 disabledLabel : file . enabled === false ? "Soon" : undefined ,
269+ skippable : file . skippable ,
262270 }
263271 } ) ,
264272 } ,
@@ -374,6 +382,7 @@ export function InstructionsWizard({ onClose }: InstructionsWizardProps) {
374382 id : question . id ,
375383 question : question . question ,
376384 allowMultiple : question . allowMultiple ,
385+ skippable : question . skippable ,
377386 answers : question . answers . map ( ( answer ) => {
378387 const infoLines : string [ ] = [ ]
379388 if ( answer . pros && answer . pros . length > 0 ) {
@@ -390,6 +399,7 @@ export function InstructionsWizard({ onClose }: InstructionsWizardProps) {
390399 example : answer . example ,
391400 infoLines : infoLines . length > 0 ? infoLines : undefined ,
392401 docs : answer . docs ,
402+ skippable : answer . skippable ,
393403 }
394404 } ) ,
395405 } ) )
@@ -473,6 +483,10 @@ export function InstructionsWizard({ onClose }: InstructionsWizardProps) {
473483 }
474484
475485 const skipQuestion = ( ) => {
486+ if ( currentQuestion . skippable === false ) {
487+ return
488+ }
489+
476490 setResponses ( ( prev ) => ( {
477491 ...prev ,
478492 [ currentQuestion . id ] : null ,
@@ -722,9 +736,11 @@ export function InstructionsWizard({ onClose }: InstructionsWizardProps) {
722736 < h1 className = "text-3xl font-semibold text-foreground" >
723737 { currentQuestion . question }
724738 </ h1 >
725- < Button variant = "ghost" onClick = { skipQuestion } className = "shrink-0" >
726- Skip
727- </ Button >
739+ { currentQuestion . skippable !== false ? (
740+ < Button variant = "ghost" onClick = { skipQuestion } className = "shrink-0" >
741+ Skip
742+ </ Button >
743+ ) : null }
728744 </ header >
729745
730746 < section className = "rounded-3xl border border-border/80 bg-card/95 p-6 shadow-md" >
0 commit comments