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

✨Migrate the testimonials page #1401

Merged
merged 27 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9b377c5
✨Migrate the testimonials page
Sep 15, 2023
7752f5e
Merge branch 'main' into testimonialsPage
Sep 15, 2023
7e124a8
✨Add breadcrumb and SEO description
Sep 15, 2023
aa56397
✨Add testimonials component
Sep 19, 2023
30e13a8
Merge branch 'main' into testimonialsPage
Sep 19, 2023
67f97c1
✨Add button to hide internship testimonials from all
Sep 22, 2023
b17f7b1
Merge from main
Sep 25, 2023
a441c27
Merge branch 'main' into testimonialsPage
Sep 25, 2023
c1b5441
🐛Fix the eslint warning
Sep 25, 2023
6675984
✨Migrate part of the testimonial cards from old page
Sep 28, 2023
47ebc04
Merge branch 'main' into testimonialsPage
Oct 7, 2023
816d8b8
📃Migrate testimonial cards
Oct 8, 2023
62f6145
Merge branch 'main' into testimonialsPage
Oct 9, 2023
c1f0d2c
🐛center the loading animation
Oct 9, 2023
f6ec8d2
Merge branch 'main' into testimonialsPage
Oct 9, 2023
b971d3a
Merge branch 'main' into testimonialsPage
Oct 12, 2023
bd259d2
🐛Fix the display issue of testimonial cards
Oct 12, 2023
9aea503
✨Extract testimonialCards as a public component
Oct 17, 2023
9197538
Merge branch 'main' into testimonialsPage
Oct 18, 2023
2720fe2
Merge from `main` branch
Oct 18, 2023
789a6b4
🐛Fix the bug to show testimonials cards correctly
Oct 18, 2023
6dba68e
⚡Remove useless code from company.tsx
KristenHu Oct 19, 2023
7254bad
⚡Remove useless code from company.tsx
KristenHu Oct 19, 2023
d5c9ebd
⚡Remove useless props form testimonials.mdx
Oct 19, 2023
7a188fe
Merge branch 'main' into testimonialsPage
Oct 19, 2023
9897694
🐛Reverse the file
Oct 19, 2023
6f2e28b
⚡Remove the wrong description in testimonialsList
KristenHu Oct 19, 2023
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
2 changes: 1 addition & 1 deletion .tina/__generated__/_graphql.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .tina/__generated__/_lookup.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .tina/__generated__/_schema.json

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion .tina/collections/company.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as Schemas from "../../components/blocks";
import { testimonialsListSchema } from "../../components/blocks";
import { videoEmbedBlockSchema } from "../../components/blocks/videoEmbed";
import { microsoftPanelSchema } from "../../components/offices/microsoftPanel";
import { seoSchema } from "../../components/util/seo";
Expand All @@ -21,6 +22,7 @@ export const companySchema: Collection = {
fields: [
// @ts-ignore
seoSchema,
// @ts-ignore
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
{
type: "string",
name: "title",
Expand All @@ -30,7 +32,7 @@ export const companySchema: Collection = {
type: "rich-text",
name: "subTitle",
label: "Body",
templates: [videoEmbedBlockSchema],
templates: [videoEmbedBlockSchema, testimonialsListSchema],
},
{
type: "rich-text",
Expand All @@ -51,6 +53,11 @@ export const companySchema: Collection = {
label: "Show Regional Director Panel",
required: false,
},
{
type: "boolean",
name: "showTestimonials",
label: "Show Testimonials",
},
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
{
type: "object",
list: true,
Expand Down
3 changes: 3 additions & 0 deletions components/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { paymentBlockSchema } from "./payment-block";
import { recurringEventSchema } from "./recurringEvent";
import { serviceCardsBlockSchema } from "./serviceCards";
import { tableBlockSchema } from "./tableLayout";
import { testimonialsListSchema } from "./testimonialsList";
import { upcomingEventsBlockSchema } from "./upcomingEvents";
import { verticalImageLayoutBlockSchema } from "./verticalImageLayout";
import { verticalListItemSchema } from "./verticalListItem";
Expand Down Expand Up @@ -82,6 +83,7 @@ export const pageBlocks: Template[] = [
joinAsPresenterSchema,
paymentBlockSchema,
latestTechSchema,
testimonialsListSchema,
];

export * from "../bookingButton/bookingButton";
Expand Down Expand Up @@ -114,6 +116,7 @@ export * from "./newslettersTable";
export * from "./recurringEvent";
export * from "./serviceCards";
export * from "./tableLayout";
export * from "./testimonialsList";
export * from "./upcomingEvents";
export * from "./verticalImageLayout";
export * from "./verticalListItem";
Expand Down
5 changes: 5 additions & 0 deletions components/blocks/mdxComponentRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { GoogleMapsWrapper } from "./googleMapsWrapper";
import { NewslettersTable } from "./newslettersTable";
import { RecurringEvent } from "./recurringEvent";
import { TableLayout, TableLayoutProps } from "./tableLayout";
import { TestimonialsList } from "./testimonialsList";
import { UpcomingEvents } from "./upcomingEvents";
import { VerticalImageLayout } from "./verticalImageLayout";
import { VerticalListItem } from "./verticalListItem";
Expand Down Expand Up @@ -166,6 +167,9 @@ export const componentRenderer: Components<{
content: TinaMarkdownContent;
};
MicrosoftPanel: Record<string, never>;
TestimonialsList: {
hideInternshipTestimonials: boolean;
};
}> = {
AgreementForm: (props) => <AgreementForm data={props} />,
ClientLogos: () => <ClientLogos />,
Expand Down Expand Up @@ -193,4 +197,5 @@ export const componentRenderer: Components<{
UtilityButton: (props) => <UtilityButton {...props} />,
ContentCard: (props) => <ContentCard data={props} />,
MicrosoftPanel: () => <MicrosoftPanel />,
TestimonialsList: (props) => <TestimonialsList data={props} />,
};
44 changes: 44 additions & 0 deletions components/blocks/testimonialsCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import Image from "next/image";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import { TestimonialType } from "../../helpers/getTestimonials";
import { Rating } from "../util/consulting/rating";

const defaultAvatar = "/images/thumbs/avatar-thumbnail.png";

type TestimonialCardProps = {
testimonial: TestimonialType;
};

export const TestimonialCard = ({ testimonial }: TestimonialCardProps) => {
return (
<div
className="flex w-full grow flex-col rounded-md border-b-4 border-b-sswRed bg-gray-100 p-8 text-center text-xl drop-shadow md:min-h-96 md:max-w-sm md:grow-0 md:p-10 md:basis_gap-96-6"
data-aos="flip-right"
key={testimonial?.name}
>
<div className="flex flex-col items-center">
<Image
alt={`Picture of ${testimonial?.name} as an avatar`}
src={testimonial?.avatar ?? defaultAvatar}
height={120}
width={120}
quality={90}
className="rounded-full"
/>
</div>
<Rating className="mx-auto mt-8" rating={testimonial?.rating} />
<p className="mt-4 min-h-24">
{testimonial?.name}
{testimonial?.company && (
<>
{", "}
<span className="font-semibold">{testimonial?.company}</span>
</>
)}
</p>
<div className="mt-2 text-sm text-gray-900">
<TinaMarkdown content={testimonial?.body} />
</div>
</div>
);
};
75 changes: 75 additions & 0 deletions components/blocks/testimonialsList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { useEffect, useState } from "react";
import { FaSpinner } from "react-icons/fa";
import type { Template } from "tinacms";
import client from "../../.tina/__generated__/client";
import { TestimonialCard } from "./testimonialsCard";

/**
* Render a table of newsletters.
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
* @param data The data for the table.
* @returns The table component.
*/
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
export const TestimonialsList = ({ data: { hideInternshipTestimonials } }) => {
const [testimonials, setTestimonials] = useState([]);
const [hasLoaded, setHasLoaded] = useState(false);

useEffect(() => {
if (!hasLoaded) {
loadTestimonials();
}
}, [hasLoaded]);

const loadTestimonials = () => {
client.queries.testimonialsConnection().then((data) => {
const testimonials = data.data?.testimonialsConnection?.edges?.map(
(edge) => edge?.node
);

const sortedTestimonials = testimonials
?.filter(
(testimonial) =>
testimonial?.categories !== null &&
testimonial?.categories[0]?.category.name !== "Internship"
)
?.map((testimonial) => testimonial);

if (hideInternshipTestimonials) {
setTestimonials(sortedTestimonials);
} else {
setTestimonials(testimonials);
}
setHasLoaded(true);
});
};
KristenHu marked this conversation as resolved.
Show resolved Hide resolved

return (
<>
{hasLoaded ? (
<div className="mx-auto my-6 flex w-full flex-row flex-wrap items-stretch justify-center gap-6">
{testimonials?.map((testimonial, i) => (
<TestimonialCard key={i} testimonial={testimonial} />
))}
</div>
) : (
<>
<p className="flex items-center justify-center text-xl">
<FaSpinner className="m-icon animate-spin" />
Loading Testimonials...
</p>
</>
)}
</>
);
};

export const testimonialsListSchema: Template = {
name: "TestimonialsList",
label: "Testimonials List",
fields: [
{
type: "boolean",
label: "Hide Intership Testimonials",
name: "hideInternshipTestimonials",
},
],
};
46 changes: 2 additions & 44 deletions components/testimonials/TestimonialRow.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import Image from "next/image";
import { useEffect, useState } from "react";
import { useEditState } from "tinacms/dist/react";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import {
getTestimonialsByCategories,
TestimonialType,
getTestimonialsByCategories,
} from "../../helpers/getTestimonials";
import { Rating } from "../util/consulting/rating";
import { TestimonialCard } from "../blocks/testimonialsCard";
import { Container } from "../util/container";
import classNames from "classnames";

const defaultAvatar = "/images/thumbs/avatar-thumbnail.png";

type TestimonialRowProps = {
testimonialsResult: TestimonialType[];
Expand Down Expand Up @@ -56,43 +51,6 @@ export const TestimonialRow = ({
);
};

type TestimonialCardProps = {
testimonial: TestimonialType;
};

const TestimonialCard = ({ testimonial }: TestimonialCardProps) => {
return (
<div
className="flex w-full grow flex-col rounded-md border-b-4 border-b-sswRed bg-gray-100 p-8 text-center text-xl drop-shadow md:min-h-96 md:max-w-sm md:grow-0 md:p-10 md:basis_gap-96-6"
data-aos="flip-right"
>
<div className="flex flex-col items-center">
<Image
alt={`Picture of ${testimonial?.name} as an avatar`}
src={testimonial?.avatar ?? defaultAvatar}
height={120}
width={120}
quality={90}
className="rounded-full"
/>
</div>
<Rating className="mx-auto mt-8" rating={testimonial?.rating} />
<p className={classNames("mt-4", testimonial?.company && "min-h-24")}>
{testimonial?.name}
{testimonial?.company && (
<>
{", "}
<span className="mb-2 font-semibold">{testimonial?.company}</span>
</>
)}
</p>
<div className="text-sm text-gray-900">
<TinaMarkdown content={testimonial?.body} />
</div>
</div>
);
};

export const testimonialRowSchema = {
type: "object",
label: "Testimonials",
Expand Down
18 changes: 18 additions & 0 deletions content/company/testimonials.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
seo:
title: Testimonials
description: >-
Delighting clients worldwide with top-tier Microsoft solutions.
Testimonials, scalable services, 30+ years of expertise.
showBreadcrumb: true
subTitle: "#### We go the extra mile to turn our clients into fans\n\nHere's a list of some of\_[our clients](https://www.ssw.com.au/company/clients)' testimonials. From small business solutions to large multinational companies, SSW has made happy clients all over the world and we are proud to share some of our experiences with you.\n\n## About US\n\nSSW's Consulting Services have delivered best of breed Microsoft solutions for more than 1,000 clients in 15 countries. With 40 consultants in 5 countries, SSW's developers are some of the best in the business. We have many Microsoft Certifications, 5 MVPs, and a Microsoft Regional Director.\n\nWe deliver scalable and extensible custom solutions with the future in mind. Our solutions improve businesses' bottom lines, with real time savings and long term value. We will provide you with the competitive advantage you need.\n\nSSW Consulting has over 30 years of experience developing awesome Microsoft solutions that today build on top of Angular, React, Azure, TFS, SharePoint, Office 365, .NET, WebAPI, Dynamics 365 and SQL Server.\n\n[KNOW MORE](https://www.ssw.com.au/company/about-us)\n\n<TestimonialsList hideInternshipTestimonials={true} />\n"
sidebar: ''
sidebarTestimonial: ''
showRdPanel: false
title: Testimonials
showTestimonials: false
testimonialCategories:
- testimonialCategory: content/testimonialCategories/General.mdx
showAllTestimonials: true
HideInternshipTestimonials: true
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
---
6 changes: 3 additions & 3 deletions content/consulting/access-database-upsizing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ callToAction: 'Let''s find a solution to your {{TITLE}} issues'
seo:
title: Enterprise Development and Consulting for Access Upsizing
description: >-
Need a solution for Microsoft Access? SSW Consulting's expert migration
services can upsize your Access database to SQL Server for a more reliable
platform.
Need a solution for Microsoft Access? SSW Consulting migration services can
upsize your Access database to SQL Server for a reliable platform.
canonical: google.com
KristenHu marked this conversation as resolved.
Show resolved Hide resolved
images:
- url: /images/consulting/open-graph/access.jpg
width: 1200
Expand Down
9 changes: 9 additions & 0 deletions content/testimonials/AndrewJClark.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Andrew J Clark
company: The Logistics Linchpin
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

I wanted to let you know how great it has been working with Kiki over the last two days. Kiki's work has been outstanding and he helped me through a couple of difficult conversations with the client that could have jeopardised the whole progress of not only the implementation of Zendesk but my whole project. Everything is now on track for success thanks to Kiki's work and more particularly his ability to handle an unexpected and tense situation with calm authority.
9 changes: 9 additions & 0 deletions content/testimonials/BillJohnson.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Bill Johnson
company: InfoMet Pty Ltd
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

SSW Exchange Reporter is an essential tool for anyone trying to monitor their organizations email. We use SSW Exchange Reporter because it generates professional user friendly reports.
9 changes: 9 additions & 0 deletions content/testimonials/BillRussell.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Bill Russell
company: Pioneer Solutions Group
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

Thanks. The new download [of SSW Access Reporter] is exactly what I needed. Awesome Product!
9 changes: 9 additions & 0 deletions content/testimonials/BoSearle.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Bo Searle
company: Vault - Secure Sovereign Community Cloud
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

Just wanted to quickly to let you know that David has done a expeciational job for this project. given the challenging landscape of Vault's backend, he is always happy to hear the problems we have and trying his best to work around and find a solution for us. Nothing is ever too much for him so far! I really appreciate his ability to work with a non technical person (myself) to ensure we create a desirable outcome for this project.
9 changes: 9 additions & 0 deletions content/testimonials/ChristineChang.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Christine Chang
company: Tapp Group Limited
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

Michael and Tiago were invaluable in aiding us to refresh and update our website. Tiago has been very patient and helpful throughout the entire process, guiding me as we worked through what was needed, being accommodating based on my limited knowledge of websites and amending as we continuously reassessed what we needed from SSW. Thank you both for the hard work and patience.
10 changes: 10 additions & 0 deletions content/testimonials/DanielMurtagh.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Daniel Murtagh
company: Bell Shakespeare
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

I just wanted to drop you a quick line to pass on my sincere thanks and appreciation for Jean's work.
He has been an absolute pleasure to work on our SharePoint development. He is polite, friendly, solutions focussed, open and honest. I have particularly appreciated his ability to take the time to understand our business needs and to implement solutions that are tailored and customised to suit our needs.
13 changes: 13 additions & 0 deletions content/testimonials/DavidBlacketer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: David Blacketer
company: Berkley IT in Asia Pacific
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

As we are now 20 plus weeks into our projects with yourselves I wanted to express that I am very happy with the team's productivity and everyone's participation but especially impressed with Jean, Kosta and Matt Wicks.
Jean's management is very much on point, prompt, detailed, decisive change management, and outcome focused which is a lot of comfort to me as my time investment capability is minimal but appropriate for the project successful delivery.
The interaction and engagement across our organisations is also working well, efficient, collaborative and all things good that I want in a well-run and successful development project.
Complements aside, as I have discussed with Jean, I am looking forward to continuing our engagement with this team on 3 follow-on projects already approved and a fourth likely to be aproved before Jan 2021, thanks!

9 changes: 9 additions & 0 deletions content/testimonials/EugeniuJalba.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Eugeniu Jalba
company: SSW Event Attendee
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

Peter, Your great teaching skills, the very interactive session by showing the "correct" way of doing things (including the various alternative methods) made this class outstanding.
9 changes: 9 additions & 0 deletions content/testimonials/FrancineBinns.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Francine Binns
company: IPWEA NSW & ACT
rating: -1
categories:
- category: content/testimonialCategories/General.mdx
---

It was a pleasure working with Jayden. He was professional, accommodating, listened and advised when necessary. I've also had positive feedback from IPWEA Australasia.
Loading
Loading