RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
92 stars 18 forks source link

[bug] `<rh-tile-group>`: built in style guidelines #1303

Closed bennypowers closed 4 weeks ago

bennypowers commented 10 months ago

Description

The style guidelines give some terse advice about tile group grid widths.

Tile and Tile Group should implement those styles, not page devs.

Suggested solution

If you check the tile demos, you'll see that the demo files include global css in order to layout the tile groups. These styles should be built-in to the tile group element, such that we'd be able to delete all the global css from the tile demo files, and they would still a) look like they do now b) work in multiple ds grid layout circumstances

Example API

No response

Additional context

Good excuse to work on grid tokens, play with subgrid as well.

marionnegp commented 9 months ago

Another question to answer in <rh-tile-group> docs: Should these be used with only radio/checkbox tiles, or do you need them to display link tiles in a grid too?

markcaron commented 8 months ago

Moved to Chansey release.

IMO, <rh-tile-group> should handle only the functionality needed for radio and checkbox tile groups, like a <fieldset>. Any layout or grid styling/patterns should be handled with a separate layer of CSS that can be applied to any element, including <rh-tile-group>. This way we won't have to maintain layout/grid in multiple components while also providing a larger degree of flexibility.

Let's focus on coming up with a layout/grid CSS solution in CY24 Q1.

bennypowers commented 2 months ago

here's what it looks like when the user doesn't customize the layout

Image

markcaron commented 2 months ago

As discussed in standup + refinement today, we're looking to utilize container queries to apply some basic grid styles per our docs reflected in the Tile mockup.

The grid is applied irrespective of whether they're link tiles or checkbox/radio tiles, and can easily be overwritten by some CSS.

Good first issue. If you're picking this up, see me with questions.

bennypowers commented 1 month ago

@OneEightyFirst heads up we're planning on baking in the internal layout of tile group