-
Notifications
You must be signed in to change notification settings - Fork 56
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
EZP-29999: As an editor, I want to see custom icons for content types #805
Merged
sunpietro
merged 7 commits into
master
from
EZP-29999-as-editor-i-want-custom-icons-for-content-types-2
Feb 5, 2019
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
600496c
EZP-29999: Implement custom icons for content types
tischsoic 30bef37
Change ezplatform_admin_ui_content_type_icon to ez_content_type_icon
tischsoic 92412c2
Fix
tischsoic a3943c6
contentType -> content_type_identifier
tischsoic 5e51a7e
fixup! EZP-29999: Implement custom icons for content types
adamwojs abc1ece
fixup! EZP-29999: Implement custom icons for content types
adamwojs a39e8b3
Pass different contentTypesMap to MFU
tischsoic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
We need to pass different config to MFU because the one based on:
container.dataset.contentTypes
contains only CTs of elements displayed in Sub-items.Given that
mfuContentTypesMap
in contrast tocontentTypesMap
(which is passed to Sub-items) does not contain whole CT objects but rather data stored ineZ.adminUiConfig.contentTypes
, are we OK with passingmfuContentTypesMap
to MFU ascontentTypesMap
- ping @dew326 @sunpietro ?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.
I think the approach is ok.
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.
Is a difference only in missing data or in the data structure as well?
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.
contentTypesMap
is a map of CT objects;mfuContentTypesMap
in this case is a map of objects like:name
andthumbnail
does not exist on CT object.We can always call it
contentTypesDataMap
etc. We can also resign from passing this as a prop and extract it inside MFU. Or even make global helper function -getContentTypeIdentifierByHref
, which may be helpful in other React components.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.
Thanks for explanation. Can't the backend provide this structure instead?
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.
We opted for this solution mostly because this is more efficient than extracting objects for all Content Types. But maybe it is way to go. This question is more to @adamwojs .