-
Notifications
You must be signed in to change notification settings - Fork 55
fix(layout): remove truncate* props from Layout and ItemLayout #1127
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1127 +/- ##
=========================================
+ Coverage 82.37% 82.4% +0.02%
=========================================
Files 733 733
Lines 8720 8717 -3
Branches 1168 1230 +62
=========================================
Hits 7183 7183
+ Misses 1522 1519 -3
Partials 15 15
Continue to review full report at Codecov.
|
856ebc9
to
1a81c61
Compare
251debe
to
168fe70
Compare
import Rtl from './Rtl' | ||
|
||
const ItemLayoutExamples = () => ( | ||
<div> | ||
<Alert warning>This component is deprecated</Alert> |
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
} | ||
|
||
/** | ||
* 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. |
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.
Can we suggest alternative approach here? Or point to Layout guide?
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.
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
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
@@ -101,8 +99,6 @@ class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> { | |||
contentCSS: PropTypes.object, | |||
contentMediaCSS: PropTypes.object, | |||
endMediaCSS: PropTypes.object, | |||
truncateContent: PropTypes.bool, |
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.
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?
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.
This is already marked as a BREAKING CHANGE in CHANGELOG.md
and it points to the description of the PR where we have a mitigation path. This should be enough for our clients to update without too much friction
Steps to from BREAKING CHANGES:
We recommend using
Flex
instead and follow our Layout Components recommendationsHowever, if you still want to use
Layout
/ItemLayout
, the steps are:truncated
Text
componentLayout
/ItemLayout
's slotLayout
See complete code: https://codesandbox.io/s/pm4vn7j0mm
ItemLayout
See complete code: https://codesandbox.io/s/r1mm947xp
fix(layout): remove truncate* props from Layout and ItemLayout
Closes #849
truncate*
props (truncateStart
,truncateMain
,truncateEnd
) failed to handle all truncation cases forLayout
(see #849 ) and consequentlyItemLayout
so we decided to remove them from the API. (BREAKING CHANGE)