-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add Skeleton loading for side panel #7394
Conversation
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.
PR Summary
This pull request implements skeleton loading for the side panel to improve user experience during long loading times. Key changes include:
- Added new
isNewViewableRecordLoadingState
inisNewViewableRecordLoading.ts
to manage loading status - Updated
RightDrawerTopBar
to display a disabled Chip component during loading - Introduced
ShowPageSummaryCardSkeletonLoader
component for skeleton loading of summary cards - Modified
ShowPageRightContainer
to use skeleton loaders for tabs during loading - Updated
useOpenCreateActivityDrawer
hook to handle loading states for activity creation - Adjusted
ShowPageActivityContainer
to render empty content while loading
8 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
) : ( | ||
<></> | ||
); |
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.
style: Consider rendering a skeleton loader instead of an empty fragment for better UX during loading
baseColor={theme.background.tertiary} | ||
highlightColor={theme.background.transparent.lighter} |
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.
style: Consider using theme.background.secondary for baseColor to match the desired behavior mentioned in the PR description
Hi @gitstart-twenty, For 1. we should stick to the current design without chip indeed: For 2. What do you mean by initial name? Not sure to understand 3. Maybe @ijreilly will have some more input! |
packages/twenty-front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts
Show resolved
Hide resolved
highlightColor={theme.background.transparent.lighter} | ||
> | ||
<StyledContainer> | ||
<Skeleton height={40} width={40} /> |
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.
I think we could extract all these hardcoded values used in Sketelon components, so that we have a limited height diversity of skeleton components.
Like height_xs, height_s, ..., width_s...
Hello @Bonapara so when the user will create a Note:
about topic 3 |
Hello @ijreilly
Yes, this change should be reverted, It's not affecting the loading but we also are not sure how this change could affect other parts, we will push the change once we get confirmations about the other topics
Could you give more details about this implementation? |
@gitstart-twenty it was a design mistake indeed, we don't want to display company in the loading state if we're loading a note. So we can either display "note" in a disable state or a skeleton loader. For 3) make sense to have this behavior everywhere but only when the page is loading and not a specific tab. Do you see what I mean? We don't want to deactivate all the tabs each time one is loading. |
Currently, the loading state is not for the tabs individually, their disabling style is implemented individually only if the single tab receives The current loading state tries to apply the disabled styles to all items. This states refers to loading the entire list, and not each tab, but it will be overwritten if a single tab has What do you think about the following:
|
@Bonapara |
Ok I think we can keep it like this! |
Log
|
This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7112](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7112). --- ### Description - To test you can use `await new Promise(r => setTimeout(r, 5000));` line 74 of \`openCreateActivityDrawer.ts\` - We added a recoil state to define the loading status - Design points to note: 1 - We did not change the chip component styles because would be unrelated to the issue can you confirm if you still need this change? ![](https://assets-service.gitstart.com/28455/c5999ef1-a7fc-4c53-b425-d0588092ba90.png) 2- In Figma, the loading state shows the Chip rendering an initial name before showing the loaded name, currently, we are rendering the correct name while loading, the change that makes this possible is below ![](https://assets-service.gitstart.com/28455/a0e14045-9a14-4d19-9570-62781fba1aa4.png) if we set it as null, the initial name would appear, but also the previous data in the state would affect the UI, passing the `activityObjectNameSingular` data allows us to clear the previous data, and make the Chip instantly updated, let us know if this behavior is fine, or if you still want an initial name to be rendered while is loading. 3 - Currently, the loading state of the tabs does not affect the selected tab (auto-defined by the component) should we change this logic for all Tabs used in the app, or make this behavior optional by using props? ![](https://assets-service.gitstart.com/28455/223c2e9f-3f4b-4107-b40d-f98a95266d5d.png) ### Demo <https://www.loom.com/share/590df738a8ec41e6b64232bde237c01f?sid=7f8f4e40-ec82-4282-a43d-452a1cf27f4a> ### Refs twentyhq#7112 --------- Co-authored-by: gitstart-twenty <[email protected]> Co-authored-by: gitstart-twenty <[email protected]> Co-authored-by: Marie Stoppa <[email protected]>
This PR was created by GitStart to address the requirements from this ticket: TWNTY-7112.
Description
To test you can use
await new Promise(r => setTimeout(r, 5000));
line 74 of `openCreateActivityDrawer.ts`We added a recoil state to define the loading status
Design points to note:
1 - We did not change the chip component styles because would be unrelated to the issue can you confirm if you still need this change?
2- In Figma, the loading state shows the Chip rendering an initial name before showing the loaded name, currently, we are rendering the correct name while loading, the change that makes this possible is below
if we set it as null, the initial name would appear, but also the previous data in the state would affect the UI, passing the
activityObjectNameSingular
data allows us to clear the previous data, and make the Chip instantly updated, let us know if this behavior is fine, or if you still want an initial name to be rendered while is loading.3 - Currently, the loading state of the tabs does not affect the selected tab (auto-defined by the component) should we change this logic for all Tabs used in the app, or make this behavior optional by using props?
Demo
https://www.loom.com/share/590df738a8ec41e6b64232bde237c01f?sid=7f8f4e40-ec82-4282-a43d-452a1cf27f4a
Refs
#7112