@@ -21,6 +21,7 @@ import { usePreference } from 'compass-preferences-model/provider';
2121import IndexFlowSection from './index-flow-section' ;
2222import QueryFlowSection from './query-flow-section' ;
2323import toNS from 'mongodb-ns' ;
24+ import CreateIndexOptionsAccordion from './create-index-options-accordion' ;
2425
2526const createIndexModalFieldsStyles = css ( {
2627 margin : `${ spacing [ 600 ] } px 0 ${ spacing [ 800 ] } px 0` ,
@@ -165,28 +166,52 @@ function CreateIndexForm({
165166 collectionName = { collectionName }
166167 />
167168 ) }
168-
169- { /* TODO in CLOUDP-314036: update the accordion design */ }
170- < Accordion data-testid = "create-index-modal-toggle-options" text = "Options" >
171- < div
172- data-testid = "create-index-modal-options"
173- className = { createIndexModalOptionStyles }
169+ { showIndexesGuidanceVariant ? (
170+ < CreateIndexOptionsAccordion >
171+ < div
172+ data-testid = "create-index-modal-options"
173+ className = { createIndexModalOptionStyles }
174+ >
175+ < CheckboxInput name = "unique" > </ CheckboxInput >
176+ < CollapsibleInput name = "name" > </ CollapsibleInput >
177+ < CollapsibleInput name = "expireAfterSeconds" > </ CollapsibleInput >
178+ < CollapsibleInput name = "partialFilterExpression" > </ CollapsibleInput >
179+ < CollapsibleInput name = "wildcardProjection" > </ CollapsibleInput >
180+ < CollapsibleInput name = "collation" > </ CollapsibleInput >
181+ { hasColumnstoreIndexesSupport ( serverVersion ) && (
182+ < CollapsibleInput name = "columnstoreProjection" > </ CollapsibleInput >
183+ ) }
184+ < CheckboxInput name = "sparse" > </ CheckboxInput >
185+ { showRollingIndexOption && (
186+ < CheckboxInput name = "buildInRollingProcess" > </ CheckboxInput >
187+ ) }
188+ </ div >
189+ </ CreateIndexOptionsAccordion >
190+ ) : (
191+ < Accordion
192+ data-testid = "create-index-modal-toggle-options"
193+ text = "Options"
174194 >
175- < CheckboxInput name = "unique" > </ CheckboxInput >
176- < CollapsibleInput name = "name" > </ CollapsibleInput >
177- < CollapsibleInput name = "expireAfterSeconds" > </ CollapsibleInput >
178- < CollapsibleInput name = "partialFilterExpression" > </ CollapsibleInput >
179- < CollapsibleInput name = "wildcardProjection" > </ CollapsibleInput >
180- < CollapsibleInput name = "collation" > </ CollapsibleInput >
181- { hasColumnstoreIndexesSupport ( serverVersion ) && (
182- < CollapsibleInput name = "columnstoreProjection" > </ CollapsibleInput >
183- ) }
184- < CheckboxInput name = "sparse" > </ CheckboxInput >
185- { showRollingIndexOption && (
186- < CheckboxInput name = "buildInRollingProcess" > </ CheckboxInput >
187- ) }
188- </ div >
189- </ Accordion >
195+ < div
196+ data-testid = "create-index-modal-options"
197+ className = { createIndexModalOptionStyles }
198+ >
199+ < CheckboxInput name = "unique" > </ CheckboxInput >
200+ < CollapsibleInput name = "name" > </ CollapsibleInput >
201+ < CollapsibleInput name = "expireAfterSeconds" > </ CollapsibleInput >
202+ < CollapsibleInput name = "partialFilterExpression" > </ CollapsibleInput >
203+ < CollapsibleInput name = "wildcardProjection" > </ CollapsibleInput >
204+ < CollapsibleInput name = "collation" > </ CollapsibleInput >
205+ { hasColumnstoreIndexesSupport ( serverVersion ) && (
206+ < CollapsibleInput name = "columnstoreProjection" > </ CollapsibleInput >
207+ ) }
208+ < CheckboxInput name = "sparse" > </ CheckboxInput >
209+ { showRollingIndexOption && (
210+ < CheckboxInput name = "buildInRollingProcess" > </ CheckboxInput >
211+ ) }
212+ </ div >
213+ </ Accordion >
214+ ) }
190215 </ >
191216 ) ;
192217}
0 commit comments