-
Notifications
You must be signed in to change notification settings - Fork 55
feat: command bar #2881
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
feat: command bar #2881
Conversation
…nto fix/trigger-view
- Removed unused properties and methods from TriggerViewContext and TriggerViewState interfaces. - Updated TriggerViewContextType to simplify context management. - Cleaned up CIMaterialState and related interfaces. - Adjusted WorkflowProps to include openCIMaterialModal function. - Modified TriggerCINode to utilize openCIMaterialModal instead of context. - Enhanced processCIMaterialResponse to ensure type safety with CIMaterialType. - Updated getCIMaterialList function parameters for better clarity. - Removed unused route WEBHOOK_RECEIVED_PAYLOAD_ID from routes configuration.
… handling and commit history updates
…l handling and loading states
- Updated the logic to correctly set the `isSelected` property of the material to ensure the correct material state is maintained. - Modified the `setMaterialList` function to set `isMaterialLoading` for the selected material while leaving other properties unchanged, improving the loading state handling during material fetching.
… in BuildImageModal
…onstants in EnvTriggerView
- Refactored GitInfoMaterial to support bulk CI triggering, including handling of multiple applications and their respective states. - Introduced new service functions for triggering builds and managing errors. - Added utility functions for payload generation and validation of materials. - Updated TriggerBuildSidebar to render application-specific materials and cache options. - Implemented new types and interfaces for better type safety and clarity. - Enhanced user experience with informative tooltips and error handling for CI configurations.
…ecks in TriggerBuildSidebar
…ex values and enhance button functionality
…or better user experience
… related components
…ror handling and state management
…nto fix/trigger-view
…ror handling, state management, and UI updates
…egex value and improve BuildImageHeader layout
… Resources - add Review State
chore: update common-lib version
This reverts commit 2e91e64.
…resource-watcher-ui
… with keyboard shortcuts
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 replaces the existing command bar implementation with a new CommandBar component. The change involves removing the old command infrastructure and implementing a modern command bar with improved navigation and recent action tracking.
- Removes the old command component architecture and related utilities
- Implements a new CommandBar component with React hooks and modern patterns
- Adds support for recent navigation actions and keyboard shortcuts
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
src/components/common/navigation/Navigation.tsx | Removes old Command component integration and adds new CommandBar component |
src/components/command/* | Removes entire old command implementation including types, utilities, and components |
src/Pages/Shared/CommandBar/* | Adds new CommandBar implementation with TypeScript types, constants, and components |
package.json | Removes flexsearch dependency that was used by the old command system |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
…mprove scroll behavior handling
…d shortcut handling and navigation
queryKey: ['recentNavigationActions'], | ||
select: ({ result }) => | ||
result.commandBar.recentNavigationActions.reduce<CommandBarGroupType>((acc, action) => { | ||
const requiredGroup = structuredClone(NAVIGATION_GROUPS).find((group) => |
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.
const requiredGroup = structuredClone(NAVIGATION_GROUPS).find((group) => | |
const requiredGroup = NAVIGATION_GROUPS.find((group) => |
structuredClone is not required
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.
Mutating requiredGroup id which will mess up NAVIGATION_GROUPS const
if (requiredGroup) { | ||
const requiredItem = requiredGroup.items.find((item) => item.id === action.id) | ||
requiredItem.id = `${RECENT_NAVIGATION_ITEM_ID_PREFIX}${action.id}` | ||
acc.items.push(structuredClone(requiredItem)) |
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.
acc.items.push(structuredClone(requiredItem)) | |
acc.items.push(requiredItem) |
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.
Have removed in next PR
acc.items.push(structuredClone(requiredItem)) | ||
} | ||
return acc | ||
}, structuredClone(RECENT_ACTIONS_GROUP)), |
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.
}, structuredClone(RECENT_ACTIONS_GROUP)), | |
}, RECENT_ACTIONS_GROUP), |
revert: dc__truncate
decouple CD Trigger testing
…nto fix/cd-trigger
feat: remove duplication between EnvTrigger and TriggerView regarding Deploy and Bulk Deploy
|
Description
This PR replaces the existing command bar implementation with a new CommandBar component. The change involves removing the old command infrastructure and implementing a modern command bar with improved navigation and recent action tracking.
Removes the old command component architecture and related utilities
Implements a new CommandBar component with React hooks and modern patterns
Adds support for recent navigation actions and keyboard shortcuts
Fixes https://github.com/devtron-labs/sprint-tasks/issues/2539
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: