| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3378.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
There was a problem hiding this comment.
I disagree with the 3 line strategy. It won't be suitable for all applications and will leave tiles truncated with trailing empty vertical space. Better than what is there now, but only because it currently leaves an abundance of empty space.
Are we against using a height measurer as was done at https://github.com/patternfly/patternfly-react/blob/master/packages/patternfly-3/patternfly-react-extensions/src/components/CatalogTile/CatalogTile.js#L29 ?
Sorry, something went wrong.
| @@ -1,3 +1,10 @@ | |||
| @mixin co-line-clamp($lines: 3) { | |||
There was a problem hiding this comment.
co?
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3378 +/- ##
==========================================
- Coverage 67.1% 67.09% -0.01%
==========================================
Files 903 903
Lines 25483 25482 -1
Branches 2254 2257 +3
==========================================
- Hits 17100 17097 -3
- Misses 7342 7343 +1
- Partials 1041 1042 +1
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
So the reason we have so much empty vertical space in OpenShift right now is to accommodate the absolute longest tile. This new change will keep everything a more consistent length so we don't need as much space (we will potentially need some vertical space given that titles and providers vary so much in length -- that's something we could potentially do this with as well if Sam is game for it). |
Sorry, something went wrong.
|
This is patternfly-react, not specific to Console, right? |
Sorry, something went wrong.
|
Yes, this is PatternFly-React rather than a console-specific change. We've been using OpenShift as a staging area to see how this component behaves with more variable data. |
Sorry, something went wrong.
| <CardBody className="catalog-tile-pf-body"> | ||
| <div className="catalog-tile-pf-description"> | ||
| <span className={classNames({'truncated': isTruncated})}> | ||
| <span className={classNames('co-line-clamp', {'truncated': isTruncated})}> |
There was a problem hiding this comment.
If we are auto-truncating via the co-line-clamp then we should not be truncating the string at all and no need for the truncated class.
We should remove the truncation properties (and update the text in the example tiles)
Sorry, something went wrong.
|
The original catalog tiles had a truncation function and allowed you to pass one in. Removing it would be a breaking change; is that what you want to do? I worked with Joe on a refs-based solution. We have to do more complicated stuff here since it's not a fixed width and height container, but it seems to work. I know you're on vacation, but let us know your thoughts when you get back. |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm after updating the examples
Sorry, something went wrong.
There was a problem hiding this comment.
some console statements still in code fyi (in case you didn't realize)
Sorry, something went wrong.
|
Thanks Joe. |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, a few suggestions which would be nice to get in.
Sorry, something went wrong.
There was a problem hiding this comment.
👍
Sorry, something went wrong.
| /** Modifies the card to include compact styling */ | ||
| isCompact?: boolean; | ||
| /** Callback for card ref */ | ||
| innerRef?: React.Ref<any>; |
There was a problem hiding this comment.
This should not be on the exported type, only on the inner component.
Sorry, something went wrong.
| } | ||
|
|
||
| export const Card: React.FunctionComponent<CardProps> = ({ | ||
| export const Card0: React.FunctionComponent<CardProps> = ({ |
There was a problem hiding this comment.
This should not be exported.
Sorry, something went wrong.
| ); | ||
| }; | ||
|
|
||
| // eslint-disable-next-line react/no-multi-comp |
There was a problem hiding this comment.
I don't believe this is necessary.
Sorry, something went wrong.
|
I still maintain that a hard coded line truncation is a bad idea. |
Sorry, something went wrong.
|
Hey - I wound up speaking to Dana about this yesterday because I was noticing some performance issues with the refs on the PF4 developer site. He and Michael Coker suggested we use a CSS solution, so I'm in the process of rolling back to the original approach. Coker thought line clamp was a decent approach for this. Serena just pointed out the issue we've been trying to fix with this PR to a larger audience and Joe and I would like to fast-track this fix so we can get it in under the wire into this upcoming version of OpenShift. |
Sorry, something went wrong.
|
Why is this less performant than it was in the previous version? |
Sorry, something went wrong.
|
In addition to the issues with the line height that we discussed over Slack, there seemed to be an issue where we were intermittently receiving the incorrect clientHeight. It happened intermittently on refresh on the dev site. I asked Dana about it and we tried running a production build to see if it was an issue with the dev site. However, on the production build, you would see a delay, where there was an incorrect clientHeight and then the correct values seemed to kick in, resizing the content. This is not acceptable behavior for OpenShift. |
Sorry, something went wrong.
There was a problem hiding this comment.
Do all items in the catalog have icons? If you don't have one it looks strange since the header is so large.
Sorry, something went wrong.
|
They mostly have text badges. We're going to shrink them down in OpenShift to widths and heights that make sense for those layouts. |
Sorry, something went wrong.
…st and added CSS to better trun
|
Rebased. |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm thanks for updating the snapshots
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Removed truncation fade per OpenShift request and added CSS/SCSS to deal with the description length (limit to 3 lines maximum).