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:
@ -9,6 +9,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
@ -18,7 +19,7 @@ import { ChooseYourPlan } from '../ChooseYourPlan';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Auth/ChooseYourPlan',
|
||||
component: ChooseYourPlan,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: { routePath: AppPath.PlanRequired },
|
||||
parameters: {
|
||||
msw: {
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
|
||||
|
||||
@ -17,7 +18,7 @@ import { CreateProfile } from '../CreateProfile';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Auth/CreateProfile',
|
||||
component: CreateProfile,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: { routePath: AppPath.CreateProfile },
|
||||
parameters: {
|
||||
msw: {
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
|
||||
|
||||
@ -25,6 +26,7 @@ const meta: Meta<PageDecoratorArgs> = {
|
||||
setCurrentWorkspace(mockedOnboardingUsersData[1].defaultWorkspace);
|
||||
return <Story />;
|
||||
},
|
||||
PrefetchLoadingDecorator,
|
||||
PageDecorator,
|
||||
],
|
||||
args: { routePath: AppPath.CreateWorkspace },
|
||||
|
||||
@ -10,13 +10,14 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Auth/PasswordReset',
|
||||
component: PasswordReset,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: {
|
||||
routePath: '/reset-password/:passwordResetToken',
|
||||
routeParams: { ':passwordResetToken': 'MOCKED_TOKEN' },
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
|
||||
|
||||
@ -17,7 +18,7 @@ import { PaymentSuccess } from '../PaymentSuccess';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Auth/PaymentSuccess',
|
||||
component: PaymentSuccess,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: { routePath: AppPath.PlanRequiredSuccess },
|
||||
parameters: {
|
||||
msw: {
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SignInUp } from '../SignInUp';
|
||||
@ -16,7 +17,7 @@ import { SignInUp } from '../SignInUp';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Auth/SignInUp',
|
||||
component: SignInUp,
|
||||
decorators: [PageDecorator],
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
args: { routePath: AppPath.SignInUp },
|
||||
parameters: {
|
||||
msw: {
|
||||
|
||||
Reference in New Issue
Block a user