Prefetch Skeleton Loading on Indexes and Shows (#5545)
### Description Prefetch Skeleton Loading on Indexes and Shows ### Refs #4458 ### Demo https://jam.dev/c/a1ad04e1-80b6-4b2a-b7df-373f52f4b169 https://jam.dev/c/c5038b97-2f18-4c29-8dee-18c09376e5ee Fixes: #4458 --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SettingsAccounts } from '../SettingsAccounts';
|
||||
@ -12,7 +13,7 @@ import { SettingsAccounts } from '../SettingsAccounts';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccounts',
|
||||
component: SettingsAccounts,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts',
|
||||
},
|
||||
|
||||
@ -7,6 +7,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
@ -15,7 +16,7 @@ import { SettingsAccountsCalendars } from '../SettingsAccountsCalendars';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsCalendars',
|
||||
component: SettingsAccountsCalendars,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.AccountsCalendars),
|
||||
},
|
||||
|
||||
@ -8,6 +8,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedConnectedAccounts } from '~/testing/mock-data/accounts';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
@ -17,7 +18,7 @@ import { SettingsAccountsCalendarsSettings } from '../SettingsAccountsCalendarsS
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsCalendarsSettings',
|
||||
component: SettingsAccountsCalendarsSettings,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.AccountsCalendarsSettings),
|
||||
routeParams: { ':accountUuid': mockedConnectedAccounts[0].id },
|
||||
|
||||
@ -4,6 +4,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SettingsAccountsEmails } from '../SettingsAccountsEmails';
|
||||
@ -11,7 +12,7 @@ import { SettingsAccountsEmails } from '../SettingsAccountsEmails';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsEmails',
|
||||
component: SettingsAccountsEmails,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/emails',
|
||||
},
|
||||
|
||||
@ -7,12 +7,13 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsEmailsInboxSettings',
|
||||
component: SettingsAccountsEmailsInboxSettings,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/emails/:accountUuid',
|
||||
routeParams: { ':accountUuid': '123' },
|
||||
|
||||
@ -5,12 +5,13 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsNewAccount',
|
||||
component: SettingsNewAccount,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/new',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user