graycoreio / daffodil

Angular Ecommerce PWA Framework
https://next.daff.io
MIT License
155 stars 28 forks source link

feat(design): create sticky tracker directive #2833

Open xelaint opened 3 months ago

xelaint commented 3 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Can't change styles depending on if a container is sticky or not.

Fixes: #2825

What is the new behavior?

Directive to calculate when a container is sticky to the page so that the .daff-sticky class can be added or removed, to assist with styling.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Directive doesn't work as intended at the moment. The class isn't being added/removed at the right time.

The example in home-view needs to be removed before merging.