Skip to content

Commit a3e9f07

Browse files
committed
reusing original accordion
1 parent 79c2a50 commit a3e9f07

File tree

3 files changed

+23
-154
lines changed

3 files changed

+23
-154
lines changed

packages/compass-indexes/src/components/create-index-form/create-index-form.tsx

Lines changed: 23 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { usePreference } from 'compass-preferences-model/provider';
2121
import IndexFlowSection from './index-flow-section';
2222
import QueryFlowSection from './query-flow-section';
2323
import toNS from 'mongodb-ns';
24-
import CreateIndexOptionsAccordion from './create-index-options-accordion';
2524

2625
const createIndexModalFieldsStyles = css({
2726
margin: `${spacing[600]}px 0 ${spacing[800]}px 0`,
@@ -166,52 +165,30 @@ function CreateIndexForm({
166165
collectionName={collectionName}
167166
/>
168167
)}
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"
168+
169+
<Accordion
170+
data-testid="create-index-modal-toggle-options"
171+
text={showIndexesGuidanceVariant ? 'Index Options' : 'Options'}
172+
>
173+
<div
174+
data-testid="create-index-modal-options"
175+
className={createIndexModalOptionStyles}
194176
>
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-
)}
177+
<CheckboxInput name="unique"></CheckboxInput>
178+
<CollapsibleInput name="name"></CollapsibleInput>
179+
<CollapsibleInput name="expireAfterSeconds"></CollapsibleInput>
180+
<CollapsibleInput name="partialFilterExpression"></CollapsibleInput>
181+
<CollapsibleInput name="wildcardProjection"></CollapsibleInput>
182+
<CollapsibleInput name="collation"></CollapsibleInput>
183+
{hasColumnstoreIndexesSupport(serverVersion) && (
184+
<CollapsibleInput name="columnstoreProjection"></CollapsibleInput>
185+
)}
186+
<CheckboxInput name="sparse"></CheckboxInput>
187+
{showRollingIndexOption && (
188+
<CheckboxInput name="buildInRollingProcess"></CheckboxInput>
189+
)}
190+
</div>
191+
</Accordion>
215192
</>
216193
);
217194
}

packages/compass-indexes/src/components/create-index-form/create-index-options-accordion.spec.tsx

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/compass-indexes/src/components/create-index-form/create-index-options-accordion.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)