Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(esl-anchornav): create esl-anchornav to provide anchor navigation #2577

Merged
merged 15 commits into from
Aug 13, 2024

Conversation

dshovchko
Copy link
Collaborator

@dshovchko dshovchko commented Aug 8, 2024

Closes: #2578

@dshovchko dshovchko added feature New feature needs review The PR is waiting for review labels Aug 8, 2024
@dshovchko dshovchko self-assigned this Aug 8, 2024
src/modules/esl-anchornav/core/esl-anchor.ts Outdated Show resolved Hide resolved
src/modules/esl-utils/dom/scroll/parent.ts Outdated Show resolved Hide resolved
src/modules/esl-utils/dom/scroll/parent.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav-sticked.ts Outdated Show resolved Hide resolved
public set sticked(value: boolean) {
if (this._sticked === value) return;
this._sticked = value;
this.$$attr('sticked', value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't sound good to have potentially conflicting marker attributes. Do we really need it ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need marker for sticky state styling

src/modules/esl-anchornav/core/esl-anchornav-sticked.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
site/views/components/esl-anchornav.njk Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav.ts Outdated Show resolved Hide resolved
src/modules/esl-anchornav/core/esl-anchornav-types.ts Outdated Show resolved Hide resolved
if (y <= topBoundary) active = item;
});
if (active) {
this._items.forEach(($item, id) => $item.classList.toggle('active', id === active.id));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For wave 2: customization for active class

@ala-n ala-n merged commit bb9ceea into main-beta Aug 13, 2024
7 checks passed
@ala-n ala-n deleted the feat/esl-anchornav branch August 13, 2024 15:17
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
@ala-n
Copy link
Collaborator

ala-n commented Aug 13, 2024

🎉 This issue has been resolved in version 5.0.0-beta.31 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature needs review The PR is waiting for review released on @beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants