-
-
Notifications
You must be signed in to change notification settings - Fork 78
feat(design): automatically add anchor link and copy URL button to article headings #4260
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
Merged
damienwebdev
merged 11 commits into
graycoreio:develop
from
joannalauu:feat/heading-anchors
Jan 6, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b27b180
feat(design): implemented heading link component in `@daffodil/design`
joannalauu 5c7cca5
feat(design): full url path to fragment is copied to clipboard by cli…
joannalauu e4721a9
refactor(daffio): removed all code implemented in `#3897`
joannalauu 44df223
test(design): add spec tests for `DaffArticleHeadingLinkComponent` an…
joannalauu 00dafaa
feat: don't add link to heading if `nolink` attribute is present
joannalauu 554459c
docs: update readme
joannalauu a489902
feat(design-examples): update article-headings examples
joannalauu 416f085
fix: error with html tags in readme
joannalauu 0eb7b39
implement requested changes
joannalauu f1b3159
add gap to heading-link styles
joannalauu 15ae60c
skip headings in article encapsulated components
joannalauu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
apps/daffio/src/app/docs/api/components/fragments/base/base.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
apps/daffio/src/app/docs/api/components/fragments/examples/examples.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/api/components/fragments/inputs/inputs.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/api/components/fragments/methods/methods.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/api/components/fragments/outputs/outputs.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/api/components/fragments/params/params.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/api/components/fragments/props/props.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
apps/daffio/src/app/docs/components/heading-link/heading-link-theme.scss
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
apps/daffio/src/app/docs/components/heading-link/heading-link.component.html
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
apps/daffio/src/app/docs/components/heading-link/heading-link.component.scss
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
apps/daffio/src/app/docs/components/heading-link/heading-link.component.ts
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/design-examples/article/src/article-headings/article-headings.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
libs/design/article/src/article-heading-link/heading-link/heading-link.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <a class="daff-article-heading-link__anchor" routerLink="." [fragment]="fragment()" queryParamsHandling="preserve"> | ||
| {{ label() }} | ||
| </a> | ||
| <button daff-icon-button class="daff-article-heading-link__button" [attr.aria-label]="ariaLabel" (click)="copyLink()"> | ||
| @if (copied()) { | ||
| <fa-icon [icon]="faCheck" /> | ||
| } @else { | ||
| <fa-icon [icon]="faLink" /> | ||
| } | ||
| </button> |
23 changes: 23 additions & 0 deletions
23
libs/design/article/src/article-heading-link/heading-link/heading-link.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| :host { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| align-items: center; | ||
| gap: 0.5rem; | ||
|
|
||
| &:hover { | ||
| .daff-article-heading-link__button { | ||
| opacity: 1; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .daff-article-heading-link { | ||
| &__anchor { | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| &__button { | ||
| opacity: 0; | ||
| transition: opacity 200ms ease; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.