-
Notifications
You must be signed in to change notification settings - Fork 2
Adds project refresh functionality to context and UI #605
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
Introduces a `refreshProjects` method to the ProjectsContext, enabling manual and programmatic refresh of project data. Updates the ProjectsContextProvider to include this method and refactors the initial refresh logic. Integrates the refresh functionality into the ProjectListItem component to trigger a refresh when a project is selected. Also includes minor code style improvements for consistency.
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 adds project refresh functionality by introducing a refreshProjects method to the ProjectsContext and integrating it into the UI. The changes enable manual project data refresh when projects are selected and include code style improvements for consistency.
- Added
refreshProjectsmethod to ProjectsContext interface and provider - Integrated refresh functionality into ProjectListItem to trigger on project selection
- Applied consistent code formatting with semicolons and proper JSX formatting
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/common/context/ProjectsContext.ts | Added refreshProjects method to context interface and default value |
| src/features/projects/view/ProjectsContextProvider.tsx | Exposed refreshProjects method and refactored initial refresh logic |
| src/features/sidebar/view/internal/sidebar/projects/ProjectListItem.tsx | Integrated refresh functionality and applied code style improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Simplifies the useEffect dependency array by removing the unneeded dependency on the refreshProjects function. This prevents unnecessary re-renders and ensures the effect runs only once, improving performance and maintaining expected behavior. No functional changes introduced.
This reverts commit 5733e60.
Introduces a
refreshProjectsmethod to the ProjectsContext, enabling manual and programmatic refresh of project data. Updates the ProjectsContextProvider to include this method and refactors the initial refresh logic.Integrates the refresh functionality into the ProjectListItem component to trigger a refresh when a project is selected. Also includes minor code style improvements for consistency.
Description
Motivation and Context
Screenshots (if appropriate):
Types of changes