Skip to content

Commit 9aeef13

Browse files
authored
Merge branch 'main' into fix/circular-dependency-error
2 parents e3ea696 + 262c8cf commit 9aeef13

48 files changed

Lines changed: 736 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e-embed.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
if: ${{ always() }}
3333
uses: actions/upload-artifact@v2
3434
with:
35-
name: test-results-core
35+
name: test-results-embed-core
3636
path: packages/embeds/embed-core/playwright/results
3737

3838
- name: Upload embed-react results
3939
if: ${{ always() }}
4040
uses: actions/upload-artifact@v2
4141
with:
42-
name: test-results-react
42+
name: test-results-embed-react
4343
path: packages/embeds/embed-react/playwright/results

apps/web/components/availability/SkeletonLoader.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22

3-
import { SkeletonText } from "@calcom/ui";
3+
import { Button, SkeletonText } from "@calcom/ui";
4+
import { FiMoreHorizontal } from "@calcom/ui/components/icon";
45

56
import classNames from "@lib/classNames";
67

@@ -18,17 +19,21 @@ export default SkeletonLoader;
1819

1920
function SkeletonItem() {
2021
return (
21-
<li className="group flex w-full items-center justify-between px-2 py-[23px] sm:px-6">
22-
<div className="flex-grow truncate text-sm">
23-
<div className="flex flex-col space-y-2">
24-
<SkeletonText className="h-4 w-32" />
25-
<SkeletonText className="h-2 w-32" />
26-
</div>
27-
</div>
28-
<div className="mt-4 hidden flex-shrink-0 sm:mt-0 sm:ml-5 lg:flex">
29-
<div className="flex justify-between space-x-2 rtl:space-x-reverse">
30-
<SkeletonText className="h-6 w-12" />
22+
<li>
23+
<div className="flex items-center justify-between py-5 hover:bg-neutral-50 ltr:pl-4 rtl:pr-4 sm:ltr:pl-0 sm:rtl:pr-0">
24+
<div className="items-between flex w-full flex-col justify-center hover:bg-neutral-50 sm:px-6">
25+
<SkeletonText className="my-1 h-4 w-32" />
26+
<SkeletonText className="my-1 h-2 w-24" />
27+
<SkeletonText className="my-1 h-2 w-40" />
3128
</div>
29+
<Button
30+
className="mx-5"
31+
type="button"
32+
variant="icon"
33+
color="secondary"
34+
StartIcon={FiMoreHorizontal}
35+
disabled
36+
/>
3237
</div>
3338
</li>
3439
);

apps/web/components/booking/BookingListItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ function BookingListItem(booking: BookingItemProps) {
223223
};
224224
const showRecordingsButtons =
225225
(booking.location === "integrations:daily" || booking?.location?.trim() === "") && isPast && isConfirmed;
226+
227+
const title = decodeURIComponent(booking.title);
226228
return (
227229
<>
228230
<RescheduleDialog
@@ -355,12 +357,12 @@ function BookingListItem(booking: BookingItemProps) {
355357

356358
<div className="cursor-pointer py-4">
357359
<div
358-
title={booking.title}
360+
title={title}
359361
className={classNames(
360362
"max-w-10/12 sm:max-w-56 text-sm font-medium leading-6 text-gray-900 md:max-w-full",
361363
isCancelled ? "line-through" : ""
362364
)}>
363-
{booking.title}
365+
{title}
364366
<span> </span>
365367

366368
{!!booking?.eventType?.price && !booking.paid && (

apps/web/components/booking/pages/BookingPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ const BookingPage = ({
426426
} else {
427427
mutation.mutate({
428428
...booking,
429-
start: dayjs(date).format(),
430-
end: dayjs(date).add(duration, "minute").format(),
429+
start: dayjs(date).tz(timeZone()).format(),
430+
end: dayjs(date).tz(timeZone()).add(duration, "minute").format(),
431431
eventTypeId: eventType.id,
432432
eventTypeSlug: eventType.slug,
433433
timeZone: timeZone(),

apps/web/components/eventtype/AvailabilityTab.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const EventTypeScheduleDetails = () => {
113113
);
114114

115115
const filterDays = (dayNum: number) =>
116-
schedule?.schedule.availability.filter((item) => item.days.includes((dayNum + 1) % 7)) || [];
116+
schedule?.schedule.filter((item) => item.days.includes((dayNum + 1) % 7)) || [];
117117

118118
return (
119119
<div className="space-y-4 rounded border px-6 pb-4">
@@ -156,15 +156,17 @@ const EventTypeScheduleDetails = () => {
156156
<FiGlobe className="ltr:mr-2 rtl:ml-2" />
157157
{schedule?.timeZone || <SkeletonText className="block h-5 w-32" />}
158158
</span>
159-
<Button
160-
href={`/availability/${schedule?.schedule.id}`}
161-
disabled={isLoading}
162-
color="minimal"
163-
EndIcon={FiExternalLink}
164-
target="_blank"
165-
rel="noopener noreferrer">
166-
{t("edit_availability")}
167-
</Button>
159+
{!!schedule?.id && (
160+
<Button
161+
href={`/availability/${schedule.id}`}
162+
disabled={isLoading}
163+
color="minimal"
164+
EndIcon={FiExternalLink}
165+
target="_blank"
166+
rel="noopener noreferrer">
167+
{t("edit_availability")}
168+
</Button>
169+
)}
168170
</div>
169171
</div>
170172
);

apps/web/components/eventtype/EventSetupTab.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useAutoAnimate } from "@formkit/auto-animate/react";
22
import { zodResolver } from "@hookform/resolvers/zod";
33
import { isValidPhoneNumber } from "libphonenumber-js";
4-
import MarkdownIt from "markdown-it";
54
import { Trans } from "next-i18next";
65
import Link from "next/link";
76
import type { EventTypeSetupProps, FormValues } from "pages/event-types/[type]";
@@ -14,6 +13,7 @@ import type { EventLocationType } from "@calcom/app-store/locations";
1413
import { getEventLocationType, MeetLocationType, LocationType } from "@calcom/app-store/locations";
1514
import { CAL_URL } from "@calcom/lib/constants";
1615
import { useLocale } from "@calcom/lib/hooks/useLocale";
16+
import { md } from "@calcom/lib/markdownIt";
1717
import { slugify } from "@calcom/lib/slugify";
1818
import turndown from "@calcom/lib/turndownService";
1919
import { Button, Editor, Label, Select, SettingsToggle, Skeleton, TextField } from "@calcom/ui";
@@ -23,8 +23,6 @@ import { EditLocationDialog } from "@components/dialog/EditLocationDialog";
2323
import type { SingleValueLocationOption, LocationOption } from "@components/ui/form/LocationSelect";
2424
import LocationSelect from "@components/ui/form/LocationSelect";
2525

26-
const md = new MarkdownIt("default", { html: true, breaks: true, linkify: true });
27-
2826
const getLocationFromType = (
2927
type: EventLocationType["type"],
3028
locationOptions: Pick<EventTypeSetupProps, "locationOptions">["locationOptions"]

apps/web/components/getting-started/steps-views/UserProfile.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ArrowRightIcon } from "@heroicons/react/solid";
2-
import MarkdownIt from "markdown-it";
32
import { useRouter } from "next/router";
43
import type { FormEvent } from "react";
54
import { useRef, useState } from "react";
65
import { useForm } from "react-hook-form";
76

87
import { useLocale } from "@calcom/lib/hooks/useLocale";
8+
import { md } from "@calcom/lib/markdownIt";
99
import { telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
1010
import turndown from "@calcom/lib/turndownService";
1111
import { trpc } from "@calcom/trpc/react";
@@ -14,8 +14,6 @@ import { Avatar } from "@calcom/ui";
1414

1515
import type { IOnboardingPageProps } from "../../../pages/getting-started/[[...step]]";
1616

17-
const md = new MarkdownIt("default", { html: true, breaks: true, linkify: true });
18-
1917
type FormData = {
2018
bio: string;
2119
};

apps/web/components/team/screens/Team.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import MarkdownIt from "markdown-it";
21
import Link from "next/link";
32
import type { TeamPageProps } from "pages/team/[slug]";
43

54
import { WEBAPP_URL } from "@calcom/lib/constants";
65
import { useLocale } from "@calcom/lib/hooks/useLocale";
6+
import { md } from "@calcom/lib/markdownIt";
77
import { Avatar } from "@calcom/ui";
88

9-
const md = new MarkdownIt("default", { html: true, breaks: true, linkify: true });
10-
119
type TeamType = TeamPageProps["team"];
1210
type MembersType = TeamType["members"];
1311
type MemberType = MembersType[number];
@@ -19,7 +17,7 @@ const Member = ({ member, teamName }: { member: MemberType; teamName: string | n
1917

2018
return (
2119
<Link key={member.id} href={`/${member.username}`}>
22-
<div className="sm:min-w-80 sm:max-w-80 dark:bg-darkgray-200 dark:hover:bg-darkgray-300 group flex min-h-full flex-col space-y-2 rounded-md bg-white p-4 hover:cursor-pointer hover:bg-gray-50 ">
20+
<div className="sm:min-w-80 sm:max-w-80 dark:bg-darkgray-200 dark:hover:bg-darkgray-300 group flex min-h-full flex-col space-y-2 rounded-md bg-white p-4 hover:cursor-pointer hover:bg-gray-50 ">
2321
<Avatar
2422
size="md"
2523
alt={member.name || ""}

apps/web/lib/getBooking.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ function getResponsesFromOldBooking(
3030
return acc;
3131
}, {});
3232
return {
33-
name: rawBooking.attendees[0].name,
34-
email: rawBooking.attendees[0].email,
33+
// It is possible to have no attendees in a booking when the booking is cancelled.
34+
name: rawBooking.attendees[0]?.name || "Nameless",
35+
email: rawBooking.attendees[0]?.email || "",
3536
guests: rawBooking.attendees.slice(1).map((attendee) => {
3637
return attendee.email;
3738
}),

apps/web/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"@hookform/resolvers": "^2.9.7",
4646
"@next-auth/prisma-adapter": "^1.0.4",
4747
"@next/bundle-analyzer": "^13.1.6",
48-
"@next/font": "^13.1.6",
4948
"@radix-ui/react-avatar": "^1.0.0",
5049
"@radix-ui/react-collapsible": "^1.0.0",
5150
"@radix-ui/react-dialog": "^1.0.0",
@@ -104,7 +103,7 @@
104103
"react-dom": "^18.2.0",
105104
"react-easy-crop": "^3.5.2",
106105
"react-feather": "^2.0.10",
107-
"react-hook-form": "^7.34.2",
106+
"react-hook-form": "^7.43.3",
108107
"react-hot-toast": "^2.3.0",
109108
"react-intl": "^5.25.1",
110109
"react-live-chat-loader": "^2.7.3",

0 commit comments

Comments
 (0)