Skip to content

Commit 2d5c217

Browse files
committed
Merge branch 'dev'
2 parents 39981c2 + a3c5624 commit 2d5c217

21 files changed

+265
-53
lines changed

.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
// Other rules
5+
"@next/next/no-img-element": "off"
6+
}
37
}

components/Docs/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Markdown: React.FunctionComponent<IMarkdownProps> = ({ content, slu
4141
elm.parentElement?.parentElement?.classList.add('important');
4242
}
4343
}
44-
}, ['']);
44+
}, []);
4545

4646
if (!content) {
4747
return null;

components/Link/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Link: React.FunctionComponent<ILinkProps> = ({ title, link, hideDot
1616
useEffect(() => {
1717
const crntPath = router.asPath.replace(/\/#/, '#');
1818
setIsActive(crntPath === link.replace(/\/#/, '#'));
19-
}, [router.asPath]);
19+
}, [link, router.asPath]);
2020

2121
return (
2222
<NextLink

components/Link/ParentLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const ParentLink: React.FunctionComponent<IParentLinkProps> = ({ title, l
4040
))}
4141
</ul>
4242
);
43-
}, [links, item]);
43+
}, [links]);
4444

4545
const onShowChildren = () => {
4646
setShowChildren((prev) => !prev);
@@ -72,7 +72,7 @@ export const ParentLink: React.FunctionComponent<IParentLinkProps> = ({ title, l
7272
}
7373

7474
setShowChildren(false);
75-
}, [router.asPath, links]);
75+
}, [router.asPath, links, link]);
7676

7777
return (
7878
<>

components/Page/Sponsors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const Sponsors: React.FunctionComponent<ISponsorsProps> = (props: React.P
4949
title={`Thanks ${sponsor.name}!`}>
5050
{
5151
sponsor.avatarUrl ? (
52-
<img className="mt-6 h-12 bg-white rounded-full border-2 border-transparent hover:border-whisper-500" src={sponsor.avatarUrl} />
52+
<img className="mt-6 h-12 bg-white rounded-full border-2 border-transparent hover:border-whisper-500" alt={sponsor.name} src={sponsor.avatarUrl} />
5353
) : (
5454
<UserIcon className='mt-6 h-12 p-2 bg-white rounded-full border-2 border-transparent hover:border-whisper-500 text-vulcan-500/50' />
5555
)

components/Page/Testimonial.tsx

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
11
import * as React from 'react';
2+
import { Review } from '../../models';
3+
import { StarIcon } from '@heroicons/react/24/solid';
4+
import { format, parseISO } from 'date-fns';
25

3-
export interface ITestimonialProps {}
6+
export interface ITestimonialProps {
7+
reviews: Review[];
8+
}
9+
10+
export const Testimonial: React.FunctionComponent<ITestimonialProps> = ({
11+
reviews
12+
}: React.PropsWithChildren<ITestimonialProps>) => {
13+
14+
if (!reviews || reviews.length === 0) {
15+
return null;
16+
}
417

5-
export const Testimonial: React.FunctionComponent<ITestimonialProps> = (props: React.PropsWithChildren<ITestimonialProps>) => {
618
return (
7-
null
19+
<section className="bg-vulcan-500">
20+
<div className="max-w-7xl mx-auto py-16 px-4 sm:px-6 lg:px-8">
21+
<div className="max-w-3xl mx-auto text-center">
22+
<h2 className="text-3xl tracking-tight font-extrabold sm:leading-none text-transparent bg-clip-text bg-gradient-to-r from-teal-200 to-teal-700">What people are saying</h2>
23+
<p className="mt-4 text-lg text-whisper-700 space-y-4">
24+
Explore reviews from Front Matter CMS users
25+
</p>
26+
</div>
27+
<div className="mt-12 grid lg:mb-12 lg:grid-cols-2 bg-vulcan-400">
28+
{reviews.map((review, index) => (
29+
<figure key={index} className={`flex flex-col justify-center items-center p-8 text-center border-b border-vulcan-200 md:p-12 ${index % 2 === 0 ? "lg:border-r" : ""} ${index > 3 ? "lg:border-b-0" : ""}`}>
30+
<div className={`stars mb-4 flex space-x-1`}>
31+
{
32+
review.rating && [...Array(review.rating)].map((_, index) => (
33+
<StarIcon key={index} className='w-5 h-5 text-yellow-500' />
34+
))
35+
}
36+
</div>
37+
38+
<blockquote className="mx-auto mb-4 max-w-2xl text-whisper-100">
39+
<p className="my-4">&quot;{review.text}&quot;</p>
40+
</blockquote>
41+
42+
<figcaption className="flex justify-center items-center space-x-3">
43+
<img className="w-9 h-9 rounded-full" src={`https://marketplace.visualstudio.com/avatar?userid=${review.userId}`} alt="profile picture" />
44+
<div className="space-y-0.5 font-medium text-whisper-300 text-left">
45+
<div>{review.userDisplayName}</div>
46+
<div className="text-xs text-whisper-900">{format(parseISO(review.updatedDate), "MM/dd/yyyy")}</div>
47+
</div>
48+
</figcaption>
49+
</figure >
50+
))}
51+
</div >
52+
</div >
53+
</section >
854
);
955
};

content/changelog/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Change Log
22

3+
## [9.3.0] - 2023-xx-xx
4+
5+
### ✨ New features
6+
7+
### 🎨 Enhancements
8+
9+
- [#638](https://github.com/estruyf/vscode-front-matter/issues/638): Add Hexo support for the `_drafts` folder
10+
- [#659](https://github.com/estruyf/vscode-front-matter/issues/659): Implement a filter for the taxonomy dashboard
11+
- [#662](https://github.com/estruyf/vscode-front-matter/issues/662): Always show the `all articles` tab with the page counter
12+
- [#663](https://github.com/estruyf/vscode-front-matter/issues/663): Make card tags clickable to filter the view
13+
14+
### ⚡️ Optimizations
15+
16+
### 🐞 Fixes
17+
18+
- [#660](https://github.com/estruyf/vscode-front-matter/issues/660): Allow only to select unique content relationship values
19+
- [#661](https://github.com/estruyf/vscode-front-matter/issues/661): Fixing the dropdowns when used at the bottom of a collapsible group
20+
- [#664](https://github.com/estruyf/vscode-front-matter/issues/664): Fix for parsing draft status in Hexo and Jekyll
21+
322
## [9.2.0] - 2023-09-11
423

524
### ✨ New features

models/Reviews.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export interface Reviews {
2+
reviews: Review[];
3+
totalReviewCount: number;
4+
hasMoreReviews: boolean;
5+
}
6+
7+
export interface Review {
8+
id: number;
9+
userId: string;
10+
userDisplayName: string;
11+
updatedDate: string;
12+
rating: number;
13+
text: string;
14+
productVersion: string;
15+
isDeleted: boolean;
16+
isIgnored: boolean;
17+
reCaptchaToken?: any;
18+
reply?: Reply;
19+
}
20+
21+
export interface Reply {
22+
id: number;
23+
reviewId: number;
24+
userId: string;
25+
replyText: string;
26+
updatedDate: string;
27+
isDeleted: boolean;
28+
}

models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export * from "./Analytics";
22
export * from "./InitResponse";
33
export * from "./NewConversationResponse";
44
export * from "./PageFrontMatter";
5+
export * from "./Reviews";
56
export * from "./SponsorData";

pages/analytics/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const Charts = () => {
9999
});
100100

101101
return result;
102-
}, [stats?.activate]);
102+
}, [stats]);
103103

104104
const webviewsData = useMemo(() => {
105105
return processData(stats?.webviews);
@@ -137,7 +137,7 @@ const Charts = () => {
137137
});
138138

139139
return results;
140-
}, [stats?.events]);
140+
}, [stats]);
141141

142142
const getWebviewIds = useMemo(() => {
143143
return processKeys(webviewsData);

0 commit comments

Comments
 (0)