Skip to content

Commit df7b335

Browse files
committed
Merge branch 'main' into 7305-cal-1144-custom-event-type-name-differentiate-bw-valid-invalid-variable
2 parents ad7d14a + 8a9b985 commit df7b335

48 files changed

Lines changed: 989 additions & 403 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

.vscode/launch.json

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,20 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "Next.js: Server",
6-
"type": "node-terminal",
5+
"type": "node",
76
"request": "launch",
8-
"command": "npm run dev",
9-
"skipFiles": ["<node_internals>/**"],
10-
"outFiles": [
11-
"${workspaceFolder}/**/*.js",
12-
"!**/node_modules/**"
13-
],
14-
"sourceMaps": true,
15-
"resolveSourceMapLocations": [
16-
"${workspaceFolder}/**",
17-
"!**/node_modules/**"
18-
]
19-
},
20-
{
21-
"name": "Next.js: Client",
22-
"type": "pwa-chrome",
23-
"request": "launch",
24-
"url": "http://localhost:3000"
25-
},
26-
{
27-
"name": "Next.js: Full Stack",
28-
"type": "node-terminal",
29-
"request": "launch",
30-
"command": "npm run dev",
7+
"name": "Next.js Node Debug",
8+
"runtimeExecutable": "${workspaceFolder}/node_modules/next/dist/bin/next",
9+
"env": {
10+
"NODE_OPTIONS": "--inspect"
11+
},
12+
"cwd": "${workspaceFolder}/apps/web",
3113
"console": "integratedTerminal",
32-
"serverReadyAction": {
33-
"pattern": "started server on .+, url: (https?://.+)",
34-
"uriFormat": "%s",
35-
"action": "debugWithChrome"
14+
"sourceMapPathOverrides": {
15+
"meteor://💻app/*": "${workspaceFolder}/*",
16+
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
17+
"webpack://?:*/*": "${workspaceFolder}/*"
3618
}
3719
}
3820
]
39-
}
21+
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ If you get errors, be sure to fix them before committing.
128128
## Making a Pull Request
129129

130130
- Be sure to [check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) while creating you PR.
131-
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. Se more about [Linking a pull request to an issue
131+
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue
132132
](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
133133
- Be sure to fill the PR Template accordingly.

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/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/package.json

Lines changed: 1 addition & 1 deletion
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",
@@ -76,6 +75,7 @@
7675
"handlebars": "^4.7.7",
7776
"ical.js": "^1.4.0",
7877
"ics": "^2.37.0",
78+
"jose": "^4.13.1",
7979
"kbar": "^0.1.0-beta.36",
8080
"libphonenumber-js": "^1.10.12",
8181
"lodash": "^4.17.21",

apps/web/pages/[user].tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { BadgeCheckIcon } from "@heroicons/react/solid";
22
import classNames from "classnames";
3-
import MarkdownIt from "markdown-it";
43
import type { GetServerSidePropsContext } from "next";
54
import Link from "next/link";
65
import { useRouter } from "next/router";
@@ -24,6 +23,7 @@ import defaultEvents, {
2423
} from "@calcom/lib/defaultEvents";
2524
import { useLocale } from "@calcom/lib/hooks/useLocale";
2625
import useTheme from "@calcom/lib/hooks/useTheme";
26+
import { md } from "@calcom/lib/markdownIt";
2727
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
2828
import prisma from "@calcom/prisma";
2929
import { baseEventTypeSelect } from "@calcom/prisma/selects";
@@ -36,8 +36,6 @@ import type { EmbedProps } from "@lib/withEmbedSsr";
3636

3737
import { ssrInit } from "@server/lib/ssr";
3838

39-
const md = new MarkdownIt("default", { html: true, breaks: true, linkify: true });
40-
4139
export default function User(props: inferSSRProps<typeof getServerSideProps> & EmbedProps) {
4240
const { users, profile, eventTypes, isDynamicGroup, dynamicNames, dynamicUsernames, isSingleUser } = props;
4341
const [user] = users; //To be used when we only have a single user, not dynamic group
@@ -147,7 +145,7 @@ export default function User(props: inferSSRProps<typeof getServerSideProps> & E
147145
{!isBioEmpty && (
148146
<>
149147
<div
150-
className="dark:text-darkgray-600 text-sm text-gray-500 [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
148+
className=" dark:text-darkgray-600 text-sm text-gray-500 [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
151149
dangerouslySetInnerHTML={{ __html: md.render(user.bio || "") }}
152150
/>
153151
</>

apps/web/pages/[user]/[type].tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { LocationObject } from "@calcom/app-store/locations";
55
import { IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants";
66
import hasKeyInMetadata from "@calcom/lib/hasKeyInMetadata";
77
import { useLocale } from "@calcom/lib/hooks/useLocale";
8+
import { addListFormatting } from "@calcom/lib/markdownIt";
89
import type { User } from "@calcom/prisma/client";
910

1011
import { isBrandingHidden } from "@lib/isBrandingHidden";
@@ -152,7 +153,7 @@ async function getUserPageProps(context: GetStaticPropsContext) {
152153
metadata: EventTypeMetaDataSchema.parse(eventType.metadata || {}),
153154
recurringEvent: parseRecurringEvent(eventType.recurringEvent),
154155
locations: privacyFilteredLocations(locations),
155-
descriptionAsSafeHTML: eventType.description ? md.render(eventType.description) : null,
156+
descriptionAsSafeHTML: eventType.description ? addListFormatting(md.render(eventType.description)) : null,
156157
});
157158
// Check if the user you are logging into has any active teams or premium user name
158159
const hasActiveTeam =

0 commit comments

Comments
 (0)