commercetools / ui-kit

Component library 💅
https://uikit.commercetools.com
MIT License
145 stars 25 forks source link

DropdownMenu: Allow choice for data-* props to be routed to triggerElement or DropdownMenu container #2849

Closed jocelyn-dunkley closed 3 months ago

jocelyn-dunkley commented 4 months ago

Is your feature request related to a problem? Please describe. We're working on the new Spaces project and we're using the DropdownMenu component. The marketing people will want to track the popularity of various components in FullStory so we want to be able to use data selectors about who clicks on the triggerElement and the DropdownMenu container itself. Any data attributes are not passed on anywhere in the component.

Describe the solution you'd like Please do one of the following:

  1. pass on all non-specified props to the component like {...rest}
  2. Add specific data attributes to the triggerElement and the DropdownMenu, respectively.

P.S. Can you do this for all new components from now on?

ddouglasz commented 4 months ago

Hello @jocelyn-dunkley We will keep this in mind and also, update you regarding the data-attribute for the DropdownMenu component. Thanks!

jocelyn-dunkley commented 4 months ago

@ddouglasz Hi do you have a timeline on this?

ddouglasz commented 4 months ago

Hey @jocelyn-dunkley Going by what we have as priority right now, We should get to this by next week.

Thank you.