-
Notifications
You must be signed in to change notification settings - Fork 51
fix(layout): remove truncate* props from Layout and ItemLayout #1127
Changes from all commits
a62993d
d57465d
45e470d
14825f7
1a2ac8a
168fe70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,12 +62,10 @@ export interface ItemLayoutProps extends UIComponentProps, ContentComponentProps | |
| contentMediaCSS?: ICSSInJSStyle | ||
| /** Styled applied to the end media element of the rendered component. */ | ||
| endMediaCSS?: ICSSInJSStyle | ||
| truncateContent?: boolean | ||
| truncateHeader?: boolean | ||
| } | ||
|
|
||
| /** | ||
| * The Item Layout handles layout styles for menu items, list items and other similar item templates. | ||
| * (DEPRECATED) The Item Layout handles layout styles for menu items, list items and other similar item templates. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we suggest alternative approach here? Or point to Layout guide?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should be enough to reference alternative components to use - may suggest not to include any links to the descriptions, as those are subject to potential changes
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in #1154 |
||
| */ | ||
| class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | ||
| static create: Function | ||
|
|
@@ -101,8 +99,6 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |
| contentCSS: PropTypes.object, | ||
| contentMediaCSS: PropTypes.object, | ||
| endMediaCSS: PropTypes.object, | ||
| truncateContent: PropTypes.bool, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we just take these out, won't they just get passed through to html and not do anything. Should we leave as warning / compile error or something for a few releases before we actually remove?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already marked as a BREAKING CHANGE in |
||
| truncateHeader: PropTypes.bool, | ||
| } | ||
|
|
||
| static defaultProps = { | ||
|
|
@@ -128,7 +124,7 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |
| }, | ||
|
|
||
| renderHeaderArea: (props, state, classes) => { | ||
| const { debug, header, headerMedia, truncateHeader, headerCSS, headerMediaCSS } = props | ||
| const { debug, header, headerMedia, headerCSS, headerMediaCSS } = props | ||
|
|
||
| const mergedClasses = cx(ItemLayout.slotClassNames.header, classes.header) | ||
| const mediaClasses = cx(ItemLayout.slotClassNames.headerMedia, classes.headerMedia) | ||
|
|
@@ -139,7 +135,6 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |
| alignItems="end" | ||
| gap={pxToRem(8)} | ||
| debug={debug} | ||
| truncateMain={truncateHeader} | ||
| main={rtlTextContainer.createFor({ element: header })} | ||
| rootCSS={headerCSS} | ||
| end={ | ||
|
|
@@ -154,7 +149,7 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |
| }, | ||
|
|
||
| renderContentArea: (props, state, classes) => { | ||
| const { debug, content, contentMedia, truncateContent, contentCSS, contentMediaCSS } = props | ||
| const { debug, content, contentMedia, contentCSS, contentMediaCSS } = props | ||
|
|
||
| const mergedClasses = cx(ItemLayout.slotClassNames.content, classes.content) | ||
| const mediaClasses = cx(ItemLayout.slotClassNames.contentMedia, classes.contentMedia) | ||
|
|
@@ -165,7 +160,6 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |
| alignItems="start" | ||
| gap={pxToRem(8)} | ||
| debug={debug} | ||
| truncateMain={truncateContent} | ||
| rootCSS={contentCSS} | ||
| main={rtlTextContainer.createFor({ element: content })} | ||
| end={ | ||
|
|
||
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.
Let's try and be as helpful as we can. Perhaps add link to Layout guide and suggest flex as alternative?
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.
done in #1154