design-system icon indicating copy to clipboard operation
design-system copied to clipboard

[POC] Convert Popover to Radix-UI popover

Open joshuaellis opened this issue 1 year ago • 1 comments

What does it do?

This is a POC for the upcoming DS sync, it shows the potential of replacing difficult components (such as Popover / Accordion / Dropdowns) with radix-ui components as a base.

Why is it needed?

Radix-UI is a un-styled design system full of UI primitives enabling user to create accessible interfaces without the technical knowledge (full accessibility is hard and not every dev has the same level of knowledge on the subject). It would mean we could focus on design implementation and adding variations based on the needs of the product.

I haven't resolved any of the tests, nor added the actual PropTypes that the radix components expose, hence why this is definitely a draft PR.

Related issue(s)/PR(s)

This came about as a response from #674 where we were using a ResizeObserver as the handler for it's floating placement in conjunction with a custom position function.

Other thoughts

  • I find it odd that the popover is trapped in a fixed height space, what happens if we want to use a non-list ui in the component? There might be some issues? It feels like the list version warrants being it's own variation of a base Popover styled in the Strapi themes?
  • This might be part of a larger effort to expand & simplify our design system in a largely framework agnostic way (v2)

joshuaellis avatar Sep 16 '22 13:09 joshuaellis

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
design-system ✅ Ready (Inspect) Visit Preview Sep 16, 2022 at 1:25PM (UTC)
design-system-website ✅ Ready (Inspect) Visit Preview Sep 16, 2022 at 1:25PM (UTC)

vercel[bot] avatar Sep 16 '22 13:09 vercel[bot]