twenty icon indicating copy to clipboard operation
twenty copied to clipboard

User & Metadata Loading

Open gitstart-twenty opened this issue 9 months ago • 4 comments

Description

User & Metadata Loading

Refs

#4456

Demo

https://github.com/twentyhq/twenty/assets/140154534/4c20fca6-feaf-45f6-ac50-6532d2ebf050

Fixes #4456

gitstart-twenty avatar May 10 '24 10:05 gitstart-twenty

Thanks!

  1. Could we tweak the left menu to ensure the loader aligns perfectly with the menu items? There are some variations in the gap or items height.

  2. I think we shouldn't display the view bar during User & Metadata Loading since we don't know which page layout will appear afterward (Record page, /tasks...). Or do we? Is it definitely an "Object Index"? If so, can you add a skeleton for the view switcher while we wait for the view name?

https://github.com/twentyhq/twenty/assets/19412894/39616be4-53ff-44f9-9d93-bd8eb49e91e7

  1. Can you add a skeleton for the top right CTAs like in Figma?

Bonapara avatar May 10 '24 16:05 Bonapara

Thanks!

  1. Could we tweak the left menu to ensure the loader aligns perfectly with the menu items? There are some variations in the gap or items height.
  2. I think we shouldn't display the view bar during User & Metadata Loading since we don't know which page layout will appear afterward (Record page, /tasks...). Or do we? Is it definitely an "Object Index"? If so, can you add a skeleton for the view switcher while we wait for the view name?

CleanShot.2024-05-10.at.18.13.13-converted.mp4 3. Can you add a skeleton for the top right CTAs like in Figma?

Alright

gitstart-twenty avatar May 13 '24 10:05 gitstart-twenty

@gitstart-twenty I have left comments but then I took another look at the ticket and I think there is a miscommunication. The Prefetch Queries are actually loading the following data: favorites and views. It seems that the initial ticket was about userLoading and metadataLoading.

PrefetchQueries loading should impact:

  • the favorites menu only
  • the view bar only

User and Metadata should impact the what you actually have done in this PR. It does not change the overall strategy, I would still introduce a isMetadataLoadingState and isCurrentUserLoadingState (already exists) and leverage it where you are leveraging the prefetch loading state in this PR

charlesBochet avatar May 14 '24 15:05 charlesBochet

@gitstart-twenty I have left comments but then I took another look at the ticket and I think there is a miscommunication. The Prefetch Queries are actually loading the following data: favorites and views. It seems that the initial ticket was about userLoading and metadataLoading.

PrefetchQueries loading should impact:

  • the favorites menu only
  • the view bar only

User and Metadata should impact the what you actually have done in this PR. It does not change the overall strategy, I would still introduce a isMetadataLoadingState and isCurrentUserLoadingState (already exists) and leverage it where you are leveraging the prefetch loading state in this PR

Hey @charlesBochet, Thanks for the comments. Looking into them!

gitstart-twenty avatar May 14 '24 18:05 gitstart-twenty

Hey @charlesBochet Updated strategy here

gitstart-twenty avatar May 26 '24 23:05 gitstart-twenty

@gitstart-twenty Looks good :) Could you add storybook tests?

charlesBochet avatar May 27 '24 08:05 charlesBochet