Skip to content
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: show loading component state while images arent fully loaded #2609

Merged
merged 7 commits into from
Jul 9, 2024

Conversation

Cristhianzl
Copy link
Member

✨ (ProfilePictureForm): add loading state to handle initial loading state

@Cristhianzl Cristhianzl requested a review from lucaseduoli July 9, 2024 18:12
@Cristhianzl Cristhianzl self-assigned this Jul 9, 2024
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 9, 2024
Copy link
Contributor

github-actions bot commented Jul 9, 2024

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has a valid title
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body

Result

Pull request satisfies all enabled pull request rules.

Last Modified at 09 Jul 24 18:13 UTC

@dosubot dosubot bot added bug Something isn't working javascript Pull requests that update Javascript code labels Jul 9, 2024
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jul 9, 2024
@Cristhianzl Cristhianzl marked this pull request as draft July 9, 2024 18:23
@Cristhianzl Cristhianzl marked this pull request as ready for review July 9, 2024 19:02
Cristhianzl and others added 3 commits July 9, 2024 16:02
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jul 9, 2024
…rofilePicturesQueryResponse for clarity

♻️ (use-preload-images.tsx): add loading check to useEffect to prevent unnecessary execution
♻️ (profilePictureChooserComponent): update profilePictures prop type to handle undefined and add loading to usePreloadImages
♻️ (ProfilePictureForm): remove unnecessary state and use response directly from useGetProfilePicturesQuery
lucaseduoli
lucaseduoli previously approved these changes Jul 9, 2024
Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2024
@lucaseduoli lucaseduoli dismissed their stale review July 9, 2024 19:56

didnt test

Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…fect dependency array to ensure images are preloaded correctly
@Cristhianzl Cristhianzl merged commit 7174e6e into main Jul 9, 2024
23 checks passed
@Cristhianzl Cristhianzl deleted the cz/fix-profile-img-loading branch July 9, 2024 22:57
nicoloboschi pushed a commit to datastax/ragstack-ai-langflow that referenced this pull request Jul 11, 2024
…ngflow-ai#2609)

* ✨ (ProfilePictureForm): add loading state to handle initial loading state

* ♻️ (use-get-profile-pictures.ts): refactor profile pictures query to process data on the server side
♻️ (ProfilePictureForm): simplify state management by removing redundant loading state

* ♻️ (use-get-profile-pictures.ts): rename ProfilePicturesResponse to ProfilePicturesQueryResponse for clarity
♻️ (use-preload-images.tsx): add loading check to useEffect to prevent unnecessary execution
♻️ (profilePictureChooserComponent): update profilePictures prop type to handle undefined and add loading to usePreloadImages
♻️ (ProfilePictureForm): remove unnecessary state and use response directly from useGetProfilePicturesQuery

* 🐛 (use-preload-images.tsx): add missing dependency 'loading' to useEffect dependency array to ensure images are preloaded correctly

(cherry picked from commit 7174e6e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants