artsy / palette

Artsy's design system
https://palette-storybook.artsy.net/
MIT License
214 stars 45 forks source link

feat(DIA-663): add disclosure element #1387

Closed araujobarret closed 4 months ago

araujobarret commented 4 months ago

DIA-663

Add the Disclosure element which is very similar to the Expandable.

This work is a bit ahead of time for the element being added to the DS so some things are still pending, such as disabled style.

https://github.com/artsy/palette/assets/15792853/e00a03ca-34ff-4751-83c8-1d00560381a0

📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @artsy/palette-charts@37.13.0-canary.1387.30738.0 npm install @artsy/palette@38.13.0-canary.1387.30738.0 # or yarn add @artsy/palette-charts@37.13.0-canary.1387.30738.0 yarn add @artsy/palette@38.13.0-canary.1387.30738.0 ```
dzucconi commented 4 months ago

I'd just wait for the full spec and implementation before merging.

araujobarret commented 4 months ago

It makes sense, I will leave it here while DS is not fully ready, at least I can test with volt-v2 locally which is kinda done already, only missing tests.

dzucconi commented 4 months ago

Here's the WAI-ARIA pattern for this thing: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/

I'm pretty sure Expandable complies. Vaguely curious if there's a lower level abstraction that can be shared. Though also this is simple enough that it's probably not worth it.

damassi commented 4 months ago

I'm kinda wondering why this would be in the DS -- its more of a one-off kinda thing. I can't imagine Disclosure being used widely? Maybe just use expandable or add a new prop if necessary (to expandable)?

dzucconi commented 4 months ago

I had the same question but apparently it's being added to the broader design system. I do feel like it should be there before we do the implementation. But 🤷

damassi commented 4 months ago

Yah, i agree -- add to the spec, then add here.

araujobarret commented 4 months ago

I'm closing it since it won't be added in the DS after some alignment.