Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-windows-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cloudfour/patterns': patch
---

Comment permalinks now resolve to the hash URL of the comment ID rather than a nonexistent Timber `comment.link` property
1 change: 0 additions & 1 deletion src/components/comment/comment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ test(
await commentMarkup({
comment: {
ID: 1,
link: '#comment-1',
date: new Date('January 1 2000'),
avatar: '',
author: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/comment/comment.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<div class="c-comment__meta">
<div class="c-comment__meta-detail">
<a class="c-comment__meta-link"
href="{{comment.link}}">
href="#comment-{{comment.ID}}">
<span class="c-comment__meta-icon">
{% include '@cloudfour/components/icon/icon.twig' with {
name: 'link',
Expand Down
1 change: 0 additions & 1 deletion src/components/comment/demo/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export const makeComment = ({

const result = {
ID: id,
link: `#comment-${id}`,
date: new Date(),
avatar: `https://placeimg.com/92/92/${sample(placeImgCategories)}`,
author: {
Expand Down