-
Notifications
You must be signed in to change notification settings - Fork 231
refactor(compass-indexes): index status in-progress to creating and add building COMPASS-9821 #7272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bf80380
to
ceaacbb
Compare
{status === 'creating' && ( | ||
<Badge data-testid="index-creating" variant={BadgeVariant.Blue}> | ||
Creating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't strictly necessary to switch the name of this, but changing the type to something else helped with generating type errors on things that relied upon the current status that would break if we potentially changed when/how the status changed.
I can change it back to in-progress now, I offer that "creating" has alignment with "createIndex" the command that it represents.
2f6edd7
to
84f1f4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors compass index status terminology by changing "in-progress" to "creating" for better semantic clarity and consolidates index action handling. The change also introduces a "building" status distinction for indexes that have actual build progress.
- Replaced "inprogress" status with "creating" throughout the codebase
- Consolidated
RegularIndexActions
andInProgressIndexActions
into a unifiedIndexActions
component - Added logic to map regular index build progress to appropriate status display
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/compass-indexes/test/fixtures/regular-indexes.ts | Updated test fixtures to use 'creating' status |
packages/compass-indexes/src/modules/regular-indexes.ts | Changed status type from 'inprogress' to 'creating' |
packages/compass-indexes/src/index.spec.tsx | Updated test expectations for 'Creating' badge text |
packages/compass-indexes/src/components/regular-indexes-table/status-field.tsx | Added 'inprogress' to type union and updated badge rendering |
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.tsx | Added status determination logic and consolidated action components |
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx | Updated test data to use 'creating' status |
packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.tsx | Removed (consolidated into index-actions.tsx) |
packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.spec.tsx | Removed (consolidated into index-actions.spec.tsx) |
packages/compass-indexes/src/components/regular-indexes-table/index-actions.tsx | New unified component handling all index types |
packages/compass-indexes/src/components/regular-indexes-table/index-actions.spec.tsx | New comprehensive test suite for unified component |
packages/compass-indexes/src/components/regular-indexes-table/in-progress-index-actions.tsx | Removed (consolidated into index-actions.tsx) |
packages/compass-indexes/src/components/regular-indexes-table/in-progress-index-actions.spec.tsx | Removed (consolidated into index-actions.spec.tsx) |
packages/compass-indexes/src/components/indexes/indexes.spec.tsx | Updated test expectations for 'Creating' text |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/compass-indexes/src/components/regular-indexes-table/status-field.tsx
Show resolved
Hide resolved
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.tsx
Show resolved
Hide resolved
packages/compass-indexes/src/components/regular-indexes-table/index-actions.spec.tsx
Show resolved
Hide resolved
84f1f4e
to
4d4ac83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I think we might want both creating and in prgress badges, not replacing one with the other
packages/compass-indexes/src/components/regular-indexes-table/status-field.tsx
Show resolved
Hide resolved
4d4ac83
to
0939c9d
Compare
Description
Refactor compass index status to be related to buildProgress and change in-progress to be "creating" to reflect it's proper state.
https://jira.mongodb.org/browse/COMPASS-9821
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes