Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the Split component #896

Open
craigcook opened this issue Sep 5, 2023 · 1 comment
Open

Simplify the Split component #896

craigcook opened this issue Sep 5, 2023 · 1 comment

Comments

@craigcook
Copy link
Member

craigcook commented Sep 5, 2023

Our Split component is extremely versatile with a lot of options and variations. Some of those options aren't very commonly used and arguably we shouldn't even offer them without clear design guidance. Furthermore, the sheer number of options makes the whole component fairly complex in order to support those underused variations as well as combinations of options that should almost never be used together anyway. I think it's a case of offering too many choices when a more limited set of options could be better for everyone.

I propose removing the Media Overflow, Pop-out Media, and Constrained Media options, for starters. Possibly also remove the Content and Media alignment options but we'll need to think more about those.

Media Overflow

image

An overflowing "partial bleed" image was a feature of the since-deprecated Hero component that works well in some cases but ultimately proved too cumbersome. It requires carefully choosing an image that can have some arbitrary portion hidden outside the viewport without losing the important parts. That means the image has to be essentially decorative, which is a good argument for it being a background rather than inline in the first place. It also often fails to reverse in RTL languages without also swapping out a reversed image (lest the important part on the other side be hidden from view). And of course it should never be used with a video. So while the effect of an image "bleeding" out of the viewport can be cool when done right, it's usually too tricky to do right so we stopped doing it.

Pop-out Media

image

This was a feature of the now-rarely-used Billboard component (which Split was partially intended to replace), but was also a very specific element of our visual design at that moment in time. The pop-out image has since fallen out of use in most of our designs. As a component variation, it's hard to implement in a content-agnostic way because the image has to scale in proportion to the text, both of which are by necessity unknowable. It also only works with a background color.

Constrained Media

image

This one mostly makes sense as a companion to Overflow Media, as a way to make sure a huge image intended to overflow to one side doesn't become much taller than the text. But if we remove the Overflow option I don't think we need the Constrained option either. I don't think we'd have a scenario where media would need to have a constrained height but NOT overflow the viewport.

@stephaniehobson
Copy link
Contributor

We can extra-definitely drop the overflow and pop out styles based on the new design for the refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants