Owner: johntlee@google.com Status: Started (was: Available)
I think it might make sense to expand <cr-expand-button> to a new <cr-expansion-panel> that takes in 2 slots, 1 for the header/summary and 1 for the expandable content. It should handle all the toggling internally and house the <iron-collapse> HTML so that it doesn't have to be duplicated every time it's used.
Something like:
<cr-expansion-panel>
<div slot="header">Click me...</div>
<div slot="content">...to see me</div>
</cr-expansion-panel>
@johntlee: Would the proposed new element be used in multiple WebUI pages? This is a requirement for adding new shared UI elements. Otherwise the element is added only where it is used, and only promoted to the shared location when a 2nd client is found.
Ended up just cleaning of cr-expand-button and nixing the expansion-panel idea.
The only uses of cr-expand-button that don't use the slots are when we want to conditionally show the expand-button or not. I didn't fix these since I didn't think it made sense to have an expand-button custom element that had a property that made it not look like and not act like an expand-button.
Comment 1 by johntlee@chromium.org
, Jan 3Status: Started (was: Available)