carbon-ui-builder icon indicating copy to clipboard operation
carbon-ui-builder copied to clipboard

Add support for custom dev properties

Open zvonimirfras opened this issue 3 years ago • 5 comments

</> tab should have a way of adding (and removing) multiple custom properties

It needs an id and a value.

id should be prefilled with data- (as html custom properties) but editable value is a string

(feature requested by devs for testing - data-testid)

zvonimirfras avatar Sep 28 '22 16:09 zvonimirfras

Hi @zvonimirfras, does this need to be like for each element to change their properties? I don't get what you are expecting over here

codingmickey avatar Oct 12 '22 13:10 codingmickey

Hi @zvonimirfras, does this need to be like for each element to change their properties? I don't get what you are expecting over here

Hi Kartik (@codingmickey)!

Contextual code tab has code related properties for the selected component. Example: image

Talking to some of the users surfaced the need for adding custom properties. They'd use this to add extra attributes to the DOM elements for things like test-ids (that they could use to write tests).

To close this issue, this needs

  • UI for adding and removing these properties
  • they should be stored in the component JSON
  • exported as attributes in both of the supported frameworks.

Makes sense?

If you want to get into more specifics, feel free to ping me on discord (Zvonimir#9989) Or just ask here.

zvonimirfras avatar Oct 12 '22 13:10 zvonimirfras

Yes got it!! Thanks a lot, @zvonimirfras for the detailed overview. I will start working on this in my free time. Firstly will try to get comfortable with the code base.

Sure! I will ask my doubts curiously if I come across any 👍🏽

codingmickey avatar Oct 14 '22 06:10 codingmickey

Great, @codingmickey! Since this requires some design, and we follow Carbon Design System guidelines, please share a sketch before you start coding, to avoid needing design do-overs. (you can reach out to me privately too, I'm not hard to find)

You can even make it in UI Builder, to go all meta 😛

zvonimirfras avatar Oct 14 '22 14:10 zvonimirfras

hi @zvonimirfras sorry for the inactivity I totally forgot about this issue.. does this still need help? I'm ready to, or any other feature/bug that is to be looked

codingmickey avatar May 28 '23 11:05 codingmickey