Update shein schema import performance#578
Merged
BranDavidSebastian merged 2 commits intomasterfrom Mar 10, 2026
Merged
Conversation
Reviewer's GuideImproves product variation image saving by deduplicating images before persistence and optimizes Shein category import/display by using server-provided full paths and an effectiveName field, reducing client-side graph traversal and aligning queries/configs with new API fields. Sequence diagram for Shein category decoding using server fullPathsequenceDiagram
actor User
participant SheinCategoriesList as SheinDocumentTypeCategoriesList
participant GraphQLAPI as GraphQL_API
participant NodeCache as nodeCache
participant PathMap as pathMap
User->>SheinCategoriesList: Open_document_type_category_mapping
SheinCategoriesList->>SheinCategoriesList: decodeCategories()
SheinCategoriesList->>GraphQLAPI: sheinCategoriesQuery(remoteIds)
GraphQLAPI-->>SheinCategoriesList: nodes(remoteId,name,fullPath,parentRemoteId,...)
loop For_each_received_node
SheinCategoriesList->>NodeCache: store_normalized_node(remoteId)
SheinCategoriesList->>PathMap: pathMap[remoteId] = fullPath || name || remoteId
end
SheinCategoriesList-->>User: Render_categories_with_paths
User->>SheinCategoriesList: Manually_select_category(remoteId)
SheinCategoriesList->>NodeCache: get_node(remoteId)
SheinCategoriesList->>SheinCategoriesList: path = node.fullPath || node.name || node.remoteId
SheinCategoriesList-->>User: Show_selected_category_path(path)
Class diagram for variation image deduplication and Shein category selection nodeclassDiagram
class VariationImageSlot {
string id
string mediaId
bool isMainImage
}
class VariationRow {
string id
VariationImageSlot[] images
}
class VariationImagesBulkEditService {
+getDedupedImagesForSave(row)
}
class DedupedImage {
VariationImageSlot slot
int sortOrder
bool isMainImage
}
VariationRow "1" --> "many" VariationImageSlot : has
VariationImagesBulkEditService --> VariationRow : reads
VariationImagesBulkEditService --> DedupedImage : returns
class SheinCategoryNode {
}
class SheinCategorySelectionNode {
string remoteId
string name
string fullPath
string parentRemoteId
}
SheinCategorySelectionNode ..|> SheinCategoryNode
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Improve image handling in bulk variation editing and optimize Shein category and remote document type handling.
New Features:
Bug Fixes:
Enhancements: