Releases: predixdesignsystem/px-demo-snippet
Polymer 1.x/2.x hybrid support.
Made demo-snippet great again
Large refactor in #2
This is a big overhaul to the internals of px-demo-snippet to ensure the HTML it prints out looks like the stuff we want developers to paste into their HTML.
Attribute print updates
There are a few important changes to the element property printer:
- Truthy attributes (value = true or 'true') are printed with just their attribute name. Before, someAttribute = true was printed as some-attribute="true". Now, it is printed as some-attribute. That's semantically correct.
- Falsey attributes (value =false or 'false') are not printed. Before, there were cases where 'false' was showing up.
- Empty strings (value = "") are not printed
- Zero numbers (value = 0) are printed. Before, they were coerced to false and those attributes did not show up. So someAttribute = 0 will print as some-attribute="0"
- Caches highlights
We cache strings after highlighting. Later, if we see that same string, we pull the highlighted result from the cache instead of requesting a highlight from prism-highlighter.
Remove element property setters
This also removes the element property watcher/changer that listens to this.elementProperties for changes and attempts to this.set those changed values on the element that is being demoed. This functionality now lives in px-demo and this just causes double setting the same value in the demos.
Exposes new method
Exposes the render() public method to force a re-render on demand
Adds tests
Adds tests to cover these cases and other basic functionality.
Made snippet more readable
Added ability to have attrs on new line and nesting of tags
Added property to turn this new behavior off
Added property to not show the value of a list of properties and instead just show it bound to a property
Design Refresh
- update dependencies for design refresh
- added new icons
- switch codepen url to https
- fix IE display issue
- simplify sass structure
v1.0.0-prerelease
update dependencies
added siblingElement
you can now pass a sibling Element that will show up in the demo snippet
added code pen integration
Added code pen integration, represented by a pencil icon on the demo snippet.
Should work out of the box for any component without sub-components.
any subcomponents need to add a parent-element attribute to the px-demo-snippet tag, calling their parent component.
Please note that at this point, any component with polymer-font-awesome will NOT show up the icons, since polygit expects a px- file, and polymer-font-awesome.html does not begin with one.
added parent Element
You can now specify a parent Element array that contains both the opening and closing tags of the parent element.