Closed jawadsh123 closed 7 years ago
As discussed on the original repo I'll be submitting a PR with my fix on the bug-fixes branch which you can then create a new repo with and host it on webcomponents.org. Since we have to move away from "content" tag to "slot" there have been a few changes in which we can use the component. I've madified the examples given in the main file to reflect these. The main difference is that we need to use an additional slot attribute on the divs that play the role of underlay. Let me give an example.
How we used the component for Polymer 1.x
<swipe-action on-swiped-away="onSwipedAway" on-swipe-canceled="onSwipeCanceled">
<paper-material>
<p>I am the item that can be swiped horizontally (left and right)</p>
</paper-material>
<div swipe-left-action swipe-right-action on-tap="onActionTaped">
<p>I am the underlay that will be display when the item will be swiped left or right</p>
</div>
</swipe-action>
How we'll have to use it now for Polymer 2.x
<swipe-action on-swiped-away="onSwipedAway" on-swipe-canceled="onSwipeCanceled">
<paper-material>
<p>I am the item that can be swiped horizontally (left and right)</p>
</paper-material>
<div slot="action" swipe-left-action swipe-right-action on-tap="onActionTaped">
<p>I am the underlay that will be display when the item will be swiped left or right</p>
</div>
</swipe-action>
I'll be submitting the PR in a few hours.
The reason seems to be the deprecation of "content tag"
Ahh right, I forgot about that change!
As discussed on the original repo I'll be submitting a PR with my fix on the bug-fixes branch which you can then create a new repo with and host it on webcomponents.org.
Certainly I can do that. You are also free to take it over yourself as well, just please take all my bug fixes and features too, my applications do not work without them. ^.^
Since we have to move away from "content" tag to "slot" there have been a few changes in which we can use the component. I've madified the examples given in the main file to reflect these.
Perfect, will want everything updated yeah.
How we'll have to use it now for Polymer 2.x
I'm entirely for changing that interface, the slot style is not only the standard way going forward, it is also more clean and I definitely prefer it as well.
A question, will you be keeping compat with Polymer 1.5+? It has shims and such to allow for incompatibility between 1.5+ and 2.0+, thus making for a clean changeover.
I'll go ahead and merge the bug-fixes branch into master as well, thus continuing the mainline to create a repo from more easily.
The component is currently not working on Polymer 2.0. The reason seems to be the deprecation of "content tag"