iron-doc-viewer icon indicating copy to clipboard operation
iron-doc-viewer copied to clipboard

can we display the properties as attributes?

Open marcus7777 opened this issue 9 years ago • 2 comments

Description

when I'm teaching people about polymer they often end up copying and pasting the property into the attribute not knowing that HTML needs to have hyphens put before each capital letter and then HTML attributes are case independent.

Expected outcome

Maybe we could show Booth or if we can only show one please can we show the HTML version because if you copy and paste the HTML version into JavaScript you leave getting error message no error messages of course shown in HTML due to it not necessarily being in error.

Actual outcome

people who copy and paste properties interactive buttes end up with nothing happening until they work out what they've done let's speed up the process by showing the HTML version too

Live Demo

https://drive.google.com/file/d/0B2sFtTur-E_CSXNjcEVyREx1d2c/view

marcus7777 avatar Mar 26 '16 07:03 marcus7777

I think this sounds like a good proposal. I can definitely understand the confusion around the camelCase to dash-case conversion.

@justinfagnani @garlicnation what do you guys think?

robdodson avatar Apr 05 '16 23:04 robdodson

Duplicate of https://github.com/PolymerElements/iron-component-page/issues/32 (although probably more appropriate for it to be filed here).

I do think we should show both forms. I think we kind of stalled out earlier trying to figure out the exact design for that.

Showing "Attribute: foo" for each and every property might look a little repetitive (esp. since most of them are identical) but if we only show "Attribute: foo-bar" on the camelCase props, people might wonder why the other ones don't have attributes.

arthurevans avatar Apr 07 '16 19:04 arthurevans