Closed ThomasBurleson closed 9 years ago
Btw - Nice library.
I also recommend you reduce the clutter of you directives in the HTML markup. Some directives, IMO, could be CSS styles. Here is an idea:
<rp-timeline-item side="left">
<i class="info glyphicon glyphicon-check" rp-timeline-badge></i>
<rp-timeline-panel>
<!-- heading for the panel -->
<rp-timeline-heading>
<span rp-timeline-title>Some heading</span>
<p>
<small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small>
</p>
</rp-timeline-heading>
<!-- anything not in a `rp-timeline-heading` is content for the panel -->
<div class="rp-timeline-content">
<p>blah blah blah</p>
</div>
</rp-timeline-panel>
</rp-timeline-item>
Hi. I'll try and respond to all your comments in this reply
The HTML example above is based on lessons learned as my team implemented Angular Material.
We found concise, clear markup without overdoing the API (eg. markup) works best.
For example, I could improve with a second iteration:
<timeline-item side="left">
<!-- badge for the vertical timeline -->
<timeline-badge>
<div class="info glyphicon glyphicon-check" />
</timeline-badge>
<!-- heading for the panel -->
<timeline-heading>
<span timeline-title>Some heading</span>
<p>
<small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small>
</p>
</timeline-heading>
<!-- anything not in a `heading` or `badge` is content for the panel -->
<div class="timeline-content">
<p>blah blah blah</p>
</div>
</timeline-item>
Thanks for all the feedback.
I've taken on your points about decreasing the custom elements. I've also added replace: true and incorporated another directive I released to give the 'bounce' animation on view (https://github.com/rpocklin/angular-scroll-animate).
Feel free to take a look at the new angular-timeline demo, any feedback is welcome. http://rp.js.org/angular-timeline/example/index.html
For the time being I haven't got plans to prefix the CSS and directive but it's a good point you make.
@rpocklin - you can also use GSAP to easily stagger your animations. The new demo is superb.And the DOM looks much cleaner. Nice work.
Cheers - I think that closes this issue then :)
I recommend you namespace your directives and CSS: