fix: do not overide product information in the state with information with lower completeness level #1256
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.
PR Type
[x] Bugfix
What Is the Current Behavior?
Product images and description are sometimes missing on the product detail page when routing there from a product list.
This happens if the category products call responds later then the product details call.
Both calls are triggered when routing to the product details page.
Problem 1: There is no need for the additional category products call when routing to the product details page.
Problem 2: Product information with a lower completeness level should not overwrite product information in the state with a higher completeness level.
What Is the New Behavior?
The first commit addresses Problem 1 by reverting the commit that introduced this wrong behavior.
The second commit fixes the product information state update handling and considers the different completeness levels.
Does this PR Introduce a Breaking Change?
[x] No
Other Information
The fix for the issue of #1140 is reverted since it introduced more problems then it fixed.
A new fix for #1140 will be necessary.It addressed a very corner case like scenario that is ignored for now.AB#79022