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.
Description
Issue 1:
Sources only had the view modes if they were considered top-level sources. While that’s fine for the CMS itself, the Commerce Orders do use nested sources (e.g. All Orders > New). Not having the view modes available for non-top-level sources triggered JS errors and caused the non-top-level index page not to work as expected.
Solution:
sourceViewModes
will always be defined and contain anything.data-view-modes
attribute is now populated for the non-top-level sources, tooIssue 2:
An error was thrown when a native field was dragged into the field layout designer and selected to be included in the card view straight away.
Solution:
Added
craft\fieldlayoutelements\BaseField::previewPlaceholderHtml()
.Issue 3:
When a field was dragged into the field layout designer, a corresponding checkbox was added under “Card Attributes” straight away. No checks were made to see if that field was previewable.
Solution:
Added extra checks to ensure the field is previewable before adding/removing a corresponding checkbox on the fly.
Issue 4:
When a field that was selected to show on the card was removed from the designer, the card preview was not updated accordingly.
Solution:
Uncheck the checkbox before removal.
Issue 5:
When a field that was selected to provide a thumbnail for the card was removed from the designer, the card preview was not updated accordingly.
Solution:
Set the card view designer to now show a thumbnail and update the preview.
Related issues
n/a