-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Migrate page layout to v2 #16364
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
base: main
Are you sure you want to change the base?
Migrate page layout to v2 #16364
Conversation
Greptile OverviewGreptile SummaryThis PR migrates the Key Changes:
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client as GraphQL Client
participant Service as PageLayoutService
participant WorkspaceRepo as WorkspaceRepository
participant PageLayoutRepo as PageLayoutRepository
participant Migration as MigrationV2System
participant Cache as FlatPageLayoutCache
participant Validator as FlatPageLayoutValidator
Note over Client,Validator: Page Layout Creation Flow
Client->>Service: create(pageLayoutData, workspaceId)
Service->>WorkspaceRepo: findOneOrFail({id: workspaceId})
WorkspaceRepo-->>Service: workspace {workspaceCustomApplicationId}
Service->>Service: generate v4() universalIdentifier
Service->>PageLayoutRepo: insert({...data, universalIdentifier, applicationId})
PageLayoutRepo-->>Service: insertResult
Service-->>Client: created PageLayout
Note over Client,Validator: Migration V2 Integration
Migration->>Validator: validateFlatPageLayoutCreation(flatPageLayout)
Validator-->>Migration: validation result
alt validation success
Migration->>PageLayoutRepo: insert flat page layout
Migration->>Cache: optimisticallyApplyAction
Cache->>Cache: addFlatEntityToFlatEntityMaps
Cache-->>Migration: updated cache
else validation failed
Migration-->>Client: validation errors
end
Note over Client,Validator: Cache Population
Cache->>PageLayoutRepo: find({where: {workspaceId}, withDeleted: true})
PageLayoutRepo-->>Cache: pageLayoutEntities[]
Cache->>Cache: transformPageLayoutEntityToFlatPageLayout
Cache->>Cache: addFlatEntityToFlatEntityMapsThroughMutation
Cache-->>Client: flatPageLayoutMaps
|
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.
29 files reviewed, 1 comment
...m/core/migrations/common/1764945428493-addUniversalIdentifierAndApplicationIdToPageLayout.ts
Show resolved
Hide resolved
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:10388 This environment will automatically shut down when the PR is closed or after 5 hours. |
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.
35 files reviewed, no comments
No description provided.