-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix: refactor get all to fix types not being fetched before checking for outdated components #4762
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
the
size:M
This PR changes 30-99 lines, ignoring generated files.
label
Nov 21, 2024
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
and removed
size:M
This PR changes 30-99 lines, ignoring generated files.
labels
Nov 21, 2024
dosubot
bot
added
size:XXL
This PR changes 1000+ lines, ignoring generated files.
and removed
size:L
This PR changes 100-499 lines, ignoring generated files.
labels
Nov 21, 2024
Cristhianzl
approved these changes
Nov 21, 2024
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.
lgtm
mieslep
pushed a commit
to mieslep/langflow
that referenced
this pull request
Nov 22, 2024
…for outdated components (langflow-ai#4762) * Added use get types to fetch types from backend using tanstack * Updated typesStore to use new set types * Updated project to not use getTypes anymore * deleted unused getTypes * add tests * [autofix.ci] apply automated fixes * fix tests --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
diogocabral
pushed a commit
to headlinevc/langflow
that referenced
this pull request
Nov 26, 2024
…for outdated components (langflow-ai#4762) * Added use get types to fetch types from backend using tanstack * Updated typesStore to use new set types * Updated project to not use getTypes anymore * deleted unused getTypes * add tests * [autofix.ci] apply automated fixes * fix tests --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request involves significant changes to the
FlowMenu
and related components to improve the handling of types and data fetching. The most important changes include the removal of theuseTypesStore
in favor ofuseQueryClient
, the introduction of a newuseGetTypes
hook, and updates to theAppInitPage
to ensure proper data loading.Changes to data fetching and state management:
src/frontend/src/components/appHeaderComponent/components/FlowMenu/index.tsx
: ReplaceduseTypesStore
withuseQueryClient
for prefetching types data. [1] [2] [3]src/frontend/src/controllers/API/queries/flows/use-get-types.ts
: Introduced a newuseGetTypes
hook to fetch types data usingreact-query
.Updates to initialization and loading logic:
src/frontend/src/pages/AppInitPage/index.tsx
: Updated the initialization logic to load types before other data, ensuring all necessary data is fetched before rendering the main content. [1] [2] [3]Removal of redundant
useTypesStore
calls:src/frontend/src/pages/FlowPage/index.tsx
: Removed unnecessary calls touseTypesStore
in theFlowPage
component. [1] [2]src/frontend/src/pages/ViewPage/index.tsx
: Removed redundantuseTypesStore
calls in theViewPage
component. [1] [2]These changes streamline the data fetching process and ensure that the application state is managed more efficiently.