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

feat (improvement): update the createOneObjectMetaItem #5673

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

pacyL2K19
Copy link
Contributor

This PR

  • Fix Object creation takes too long #5278
  • Updates the implementation of the createOneObjectMataItem hook to reduce the number of api calls
  • Users can now navigate to the newly created object first and the graphql api calls to cache data are happening in the background - this will improve the user experience and reduce the create object api call time by >2
Screenshot 2024-05-30 at 12 00 15

In the issue description, it also suggested to have a loading indicator while creating the object, it seems like on #5352 we adopted to disable it while creating the object - which looks good to me and it works, let me know if we still need the loading indicator instead @Bonapara

Looking forward to getting your feedback
cc: @charlesBochet

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Updated createOneObjectMetadataItem hook to reduce API calls
  • Added findManyRecordsCache function for background cache updates
  • Improved user navigation by caching data post-navigation
  • Enhanced user experience by reducing create object API call time
  • Modified SettingsNewObject.tsx to integrate new caching strategy

Copy link
Contributor

@thomtrp thomtrp left a comment

Choose a reason for hiding this comment

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

@Bonapara can you test and tell if we still need other improvements?

@Bonapara
Copy link
Member

Bonapara commented Jun 3, 2024

Hi @pacyL2K19,

Thanks for the PR 🙌. Disabling the button instead of setting a loader could work, but could you deactivate the Save button? Clicking it twice still triggers a QueryFailedError.

@pacyL2K19
Copy link
Contributor Author

Hi @pacyL2K19,

Thanks for the PR 🙌. Disabling the button instead of setting a loader could work, but could you deactivate the Save button? Clicking it twice still triggers a QueryFailedError.

Hi @Bonapara
The current behavior already disables the Save button, no way one can click on it anymore, here is the record:
https://www.loom.com/share/cccaaf95595b47e580fee1d648601953?sid=ac5a7032-5c2a-490e-b143-97781f0ddd30
Is there any other work that needs to be done on this Button? Please let me know

Copy link
Contributor

@thomtrp thomtrp left a comment

Choose a reason for hiding this comment

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

@pacyL2K19 thanks for your contribution ! 🔥

The logic is already there to disable the button indeed.

Closing this issue @Bonapara !

@thomtrp thomtrp merged commit 7fa05bf into twentyhq:main Jun 3, 2024
11 checks passed
Copy link

github-actions bot commented Jun 3, 2024

Thanks @pacyL2K19 for your contribution!
This marks your 1st PR on the repo. You're top 21% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@pacyL2K19 pacyL2K19 deleted the feat/object-creation-improvement branch June 3, 2024 10:45
piyushyadav1617 pushed a commit to piyushyadav1617/twenty that referenced this pull request Jun 3, 2024
# This PR

- Fix twentyhq#5278 
- Updates the implementation of the `createOneObjectMataItem` hook to
reduce the number of api calls
- Users can now navigate to the newly created object first and the
graphql api calls to cache data are happening in the background - this
will improve the user experience and reduce the create object api call
time by >2
<img width="1508" alt="Screenshot 2024-05-30 at 12 00 15"
src="https://github.com/twentyhq/twenty/assets/61581306/46513fd1-d46e-40bc-a036-07e3acdf2870">

In the issue description, it also suggested to have a loading indicator
while creating the object, it seems like on twentyhq#5352 we adopted to disable
it while creating the object - which looks good to me and it works, let
me know if we still need the loading indicator instead @Bonapara

Looking forward to getting your feedback
cc: @charlesBochet

---------

Co-authored-by: Thomas Trompette <[email protected]>
FelixMalfait added a commit that referenced this pull request Jul 11, 2024
# This PR

- Fix #5675 
- Fix #6118 

Similarly to #5673 I have improved the field creation time by
re-fetching data on page redirection to the object page

<img width="1511" alt="Screenshot 2024-07-10 at 16 06 37"
src="https://github.com/twentyhq/twenty/assets/61581306/8ef8f4cb-4334-4f4c-b5d9-fea11fd5d99a">

@FellipeMTX @Bonapara

---------

Co-authored-by: Félix Malfait <[email protected]>
arnavsaxena17 pushed a commit to arnavsaxena17/twenty that referenced this pull request Oct 6, 2024
# This PR

- Fix twentyhq#5278 
- Updates the implementation of the `createOneObjectMataItem` hook to
reduce the number of api calls
- Users can now navigate to the newly created object first and the
graphql api calls to cache data are happening in the background - this
will improve the user experience and reduce the create object api call
time by >2
<img width="1508" alt="Screenshot 2024-05-30 at 12 00 15"
src="https://github.com/twentyhq/twenty/assets/61581306/46513fd1-d46e-40bc-a036-07e3acdf2870">

In the issue description, it also suggested to have a loading indicator
while creating the object, it seems like on twentyhq#5352 we adopted to disable
it while creating the object - which looks good to me and it works, let
me know if we still need the loading indicator instead @Bonapara

Looking forward to getting your feedback
cc: @charlesBochet

---------

Co-authored-by: Thomas Trompette <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object creation takes too long
3 participants