patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

feat(Tile): deprecate

Open kmcfaul opened this issue 1 year ago • 4 comments

What: Closes #8542

Moves Tile to deprecated directory. Moves Tile demos to Tile examples so they are all sorted under a deprecated tab. Adds a new Card demo meant to mock up Tile - may need some additional work/support to fully replace Tile.

kmcfaul avatar Jul 30 '24 18:07 kmcfaul

Preview: https://patternfly-react-pr-10821.surge.sh

A11y report: https://patternfly-react-pr-10821-a11y.surge.sh

patternfly-build avatar Jul 30 '24 18:07 patternfly-build

@patternfly/design-reviewers Re: the new example in Card, is that sufficient for "Card as a tile" (since Cards kind of replace Tile, but don't look exactly the same), or do we want to revisit tile design and maybe make updates to Card?

kmcfaul avatar Aug 08 '24 15:08 kmcfaul

I think an example description would be helpful. Are these only selectable as a toggle function, rather than triggering an action or an outbound link?

"Card tiles"? And maybe adding checkboxes/radios within the example to toggle between:

  • single select input
  • multi select input
  • no input

edonehoo avatar Aug 22 '24 14:08 edonehoo

cc @edonehoo @thatblindgeye Updated with feedback.

Added an isHidden property to the selectableActions object, though fwiw it technically would already be possible to hide the radio/checkbox on the user end if they passed selectableActionProps: { style: { visibility: 'hidden' } } to selectableActions. isHidden is just a shorthand for setting the style manually, and we could remove it and update the examples if we'd prefer to leave it out of the props.

Added another example for multiselect tiles as well.

kmcfaul avatar Aug 27 '24 17:08 kmcfaul

Missing border should be fixed by the correct application of the screenreader class

kmcfaul avatar Sep 23 '24 15:09 kmcfaul

Thanks for the updates! I noticed there isn't the usual spacing between the + icon and the card title.

andrew-ronaldson avatar Sep 24 '24 14:09 andrew-ronaldson

usual spacing

Might be overlooking it, but Card doesn't have a built in support for icon with text like via a prop (the Card example with an icon and text uses Brand) so I've passed it directly. I did increase the spacing by wrapping them with a Flex. How does that look? @andrew-ronaldson

kmcfaul avatar Sep 25 '24 13:09 kmcfaul

The old tile examples use margin-inline-end: var(--pf-v6-c-tile__icon--MarginInlineEnd); for the spacer after the icon.

andrew-ronaldson avatar Sep 25 '24 14:09 andrew-ronaldson

@andrew-ronaldson @mcoker Card doesn't have an equivalent for icon spacing in the header. Could this be added post-v6 in a follow up if the Flex spacing is sufficient for now? Or should I add manual styling that uses the deprecated tile css?

kmcfaul avatar Sep 25 '24 14:09 kmcfaul

@andrew-ronaldson @mcoker Card doesn't have an equivalent for icon spacing in the header. Could this be added post-v6 in a follow up if the Flex spacing is sufficient for now? Or should I add manual styling that uses the deprecated tile css?

@kmcfaul (as discussed in standup) IMO we should add support for an icon in the card header, but I think that can be a follow-up since it would be non-breaking to add the enhancement then update our example. Using <Flex> lgtm for now

mcoker avatar Sep 25 '24 14:09 mcoker

  • For the flex layout with the icon/text, I'd bump the spacer down to 'sm', and use the gap/column-gap spacer (instead of the default spacer system, which uses margins). The core class to add would be .pf-m-gap-sm. You could also add whatever the react prop is for .pf-m-align-items-center and it will vertically align the icon and text (as long as the text doesn't wrap)

yes to Michael's comment

andrew-ronaldson avatar Sep 25 '24 15:09 andrew-ronaldson

Should I make a Core issue?

@andrew-ronaldson yes plz!

mcoker avatar Sep 25 '24 15:09 mcoker

Latest changes look great! Thanks!

andrew-ronaldson avatar Sep 25 '24 17:09 andrew-ronaldson