pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.03k stars 258 forks source link

feat: Use Popover API to render the command list #273

Open Bricklou opened 3 weeks ago

Bricklou commented 3 weeks ago

Overview

The Popover API is now widely supported. It would be a good idea to move to it.

Why? Because it would allow use to take advantage of the #top-layer context without having to bother about having a z-index issue on the component. Plus, popover can compute screen border by themselves, which means there would be less JS computation to fix offscreen problems.

Who does this impact? Who is this for?

This would concern everything user, and obviously, might be a breaking change to many of them. But on the other hand, it would use supported browser features instead of custom JS behaviour to compute the rendering.