fix(layout): remove truncate* props from Layout and ItemLayout#1127
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
|
|
||
| const ItemLayoutExamples = () => ( | ||
| <div> | ||
| <Alert warning>This component is deprecated</Alert> |
There was a problem hiding this comment.
Let's try and be as helpful as we can. Perhaps add link to Layout guide and suggest flex as alternative?
|
|
||
| /** | ||
| * 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.
Can we suggest alternative approach here? Or point to Layout guide?
There was a problem hiding this comment.
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
| contentCSS: PropTypes.object, | ||
| contentMediaCSS: PropTypes.object, | ||
| endMediaCSS: PropTypes.object, | ||
| truncateContent: PropTypes.bool, |
There was a problem hiding this comment.
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.
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
Flexinstead and follow our Layout Components recommendationsHowever, if you still want to use
Layout/ItemLayout, the steps are:truncatedTextcomponentLayout/ItemLayout's slotLayoutSee complete code: https://codesandbox.io/s/pm4vn7j0mm
ItemLayoutSee 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 consequentlyItemLayoutso we decided to remove them from the API. (BREAKING CHANGE)