Skip to content

Commit

Permalink
chore: release 1.67.0 (#1776)
Browse files Browse the repository at this point in the history
chore: release 1.67.0
  • Loading branch information
brandonroberts authored Oct 2, 2023
2 parents 2520772 + 8204aa5 commit d55c718
Show file tree
Hide file tree
Showing 26 changed files with 925 additions and 200 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist/
.next/
test-fixtures/
node_modules/
CHANGELOG.md
57 changes: 47 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,48 @@

> All notable changes to this project will be documented in this file
## [1.67.0-beta.6](https://github.com/open-sauced/insights/compare/v1.67.0-beta.5...v1.67.0-beta.6) (2023-10-02)


### 🍕 Features

* added hacktoberfest icon in user settings ([#1775](https://github.com/open-sauced/insights/issues/1775)) ([43e6b12](https://github.com/open-sauced/insights/commit/43e6b1249ad1b429b3e784d7a9fde5f8a83214cf))

## [1.67.0-beta.5](https://github.com/open-sauced/insights/compare/v1.67.0-beta.4...v1.67.0-beta.5) (2023-10-02)


### 🐛 Bug Fixes

* made card view for lists contributors list uniform with rest of app ([#1772](https://github.com/open-sauced/insights/issues/1772)) ([5a64ab6](https://github.com/open-sauced/insights/commit/5a64ab620da935d5c79a56f157a590a3e137e7c5))

## [1.67.0-beta.4](https://github.com/open-sauced/insights/compare/v1.67.0-beta.3...v1.67.0-beta.4) (2023-10-02)


### 🍕 Features

* change hacktoberfest to default topic ([#1773](https://github.com/open-sauced/insights/issues/1773)) ([95c3c74](https://github.com/open-sauced/insights/commit/95c3c742fa9b9d5ed0904a18b1ef191dc70f2db3))

## [1.67.0-beta.3](https://github.com/open-sauced/insights/compare/v1.67.0-beta.2...v1.67.0-beta.3) (2023-09-29)


### 🍕 Features

* improve visibility of the follow cta on user profiles ([#1739](https://github.com/open-sauced/insights/issues/1739)) ([11acadb](https://github.com/open-sauced/insights/commit/11acadb9ed53948aed279acd67f9a2bcb02c9477))

## [1.67.0-beta.2](https://github.com/open-sauced/insights/compare/v1.67.0-beta.1...v1.67.0-beta.2) (2023-09-29)


### 🍕 Features

* added contributor page for lists ([#1734](https://github.com/open-sauced/insights/issues/1734)) ([762de40](https://github.com/open-sauced/insights/commit/762de402167665a9dce8f1bbf01071049b431e7d))

## [1.67.0-beta.1](https://github.com/open-sauced/insights/compare/v1.66.0...v1.67.0-beta.1) (2023-09-29)


### 🍕 Features

* add overview page for a list ([#1736](https://github.com/open-sauced/insights/issues/1736)) ([6c6bfaa](https://github.com/open-sauced/insights/commit/6c6bfaa1ee1efc30be0e94b3d8650ddf1294b327))

## [1.66.0](https://github.com/open-sauced/insights/compare/v1.65.0...v1.66.0) (2023-09-28)


Expand Down Expand Up @@ -37,38 +79,33 @@

## [1.66.0-beta.10](https://github.com/open-sauced/insights/compare/v1.66.0-beta.9...v1.66.0-beta.10) (2023-09-28)


### 🐛 Bug Fixes

* adjust style to prevent shift ([#1754](https://github.com/open-sauced/insights/issues/1754)) ([9328ab8](https://github.com/open-sauced/insights/commit/9328ab8866efdf10d559d42c2f2268554fab7632))
- adjust style to prevent shift ([#1754](https://github.com/open-sauced/insights/issues/1754)) ([9328ab8](https://github.com/open-sauced/insights/commit/9328ab8866efdf10d559d42c2f2268554fab7632))

## [1.66.0-beta.9](https://github.com/open-sauced/insights/compare/v1.66.0-beta.8...v1.66.0-beta.9) (2023-09-28)


### 🐛 Bug Fixes

* Cherry-pick 🍒 Update X icon ([#1759](https://github.com/open-sauced/insights/issues/1759)) ([0a43e6a](https://github.com/open-sauced/insights/commit/0a43e6aaedb78d9b7b6eff84789d993d0a66c67d))
- Cherry-pick 🍒 Update X icon ([#1759](https://github.com/open-sauced/insights/issues/1759)) ([0a43e6a](https://github.com/open-sauced/insights/commit/0a43e6aaedb78d9b7b6eff84789d993d0a66c67d))

## [1.66.0-beta.8](https://github.com/open-sauced/insights/compare/v1.66.0-beta.7...v1.66.0-beta.8) (2023-09-27)


### 🐛 Bug Fixes

* fixed a typo in 30 days label ([#1755](https://github.com/open-sauced/insights/issues/1755)) ([2293dc2](https://github.com/open-sauced/insights/commit/2293dc2ab85ed3d1c0780a5956289249576698ce))
- fixed a typo in 30 days label ([#1755](https://github.com/open-sauced/insights/issues/1755)) ([2293dc2](https://github.com/open-sauced/insights/commit/2293dc2ab85ed3d1c0780a5956289249576698ce))

## [1.66.0-beta.7](https://github.com/open-sauced/insights/compare/v1.66.0-beta.6...v1.66.0-beta.7) (2023-09-26)


### 🍕 Features

* add `delete` functionality to list feature ([#1732](https://github.com/open-sauced/insights/issues/1732)) ([8a3e1da](https://github.com/open-sauced/insights/commit/8a3e1da522711ecc300dd86e950b709f12634b2e))
- add `delete` functionality to list feature ([#1732](https://github.com/open-sauced/insights/issues/1732)) ([8a3e1da](https://github.com/open-sauced/insights/commit/8a3e1da522711ecc300dd86e950b709f12634b2e))

## [1.66.0-beta.6](https://github.com/open-sauced/insights/compare/v1.66.0-beta.5...v1.66.0-beta.6) (2023-09-26)


### 🍕 Features

* add User Search ([#1678](https://github.com/open-sauced/insights/issues/1678)) ([008bf88](https://github.com/open-sauced/insights/commit/008bf88142d2360ab3268863c788a9071638dd2f))
- add User Search ([#1678](https://github.com/open-sauced/insights/issues/1678)) ([008bf88](https://github.com/open-sauced/insights/commit/008bf88142d2360ab3268863c788a9071638dd2f))

## [1.66.0-beta.5](https://github.com/open-sauced/insights/compare/v1.66.0-beta.4...v1.66.0-beta.5) (2023-09-25)

Expand Down
14 changes: 9 additions & 5 deletions components/ListHeader/list-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import { truncateString } from "lib/utils/truncate-string";
import { useToast } from "lib/hooks/useToast";

interface ListHeaderProps {
list?: DbUserList;
name: string;
listId: string;
isPublic: boolean;
isOwner: boolean;
numberOfContributors: number;
}

const ListHeader = ({ list, listId, isOwner }: ListHeaderProps): JSX.Element => {
const ListHeader = ({ name, isPublic, listId, isOwner, numberOfContributors }: ListHeaderProps): JSX.Element => {
const { toast } = useToast();
const posthog = usePostHog();

Expand All @@ -42,11 +44,13 @@ const ListHeader = ({ list, listId, isOwner }: ListHeaderProps): JSX.Element =>
<div className="flex flex-col justify-center p-2 header-info grow">
<div className="flex gap-2">
<Title level={1} className="!text-2xl font-semibold tracking-tight text-slate-900">
{(list && truncateString(list.name, 30)) || "Insights"}
{(name && truncateString(name, 30)) || "List"}
</Title>
{list && <Badge isPublic={list?.is_public} />}
{<Badge isPublic={isPublic} />}
</div>
<div className="flex items-center gap-2 mt-4" id="contributorCount">
{numberOfContributors} Contributors
</div>
<div className="flex items-center gap-2 mt-4">1000 Contributors</div>
</div>
</div>
<div className="absolute right-0 flex flex-col gap-3 py-2 md:items-center md:flex-row md:static">
Expand Down
12 changes: 12 additions & 0 deletions components/atoms/ClientOnly/client-only.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { useHasMounted } from "lib/hooks/useHasMounted";

function ClientOnly({ children }: { children: React.ReactNode }) {
const hasMounted = useHasMounted();

if (!hasMounted) {
return null;
}
return <>{children}</>;
}

export default ClientOnly;
3 changes: 3 additions & 0 deletions components/atoms/LanguagePill/LanguagePill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import JavaIcon from "/img/icons/interests/java.svg";
import GolangIcon from "img/icons/interests/golang.svg";
import VueIcon from "img/icons/interests/vuejs.svg";
import KubernetesIcon from "img/icons/interests/kubernetes.svg";
import HacktoberfestIcon from "img/icons/interests/hacktoberfest.svg";

import topicNameFormatting from "lib/utils/topic-name-formatting";

Expand All @@ -37,6 +38,7 @@ interface LanguagePillProps {
| "golang"
| "vue"
| "Kubernetes"
| "hacktoberfest"
| string;
classNames?: string;
onClick?: () => void;
Expand All @@ -60,6 +62,7 @@ const LanguagePill = ({ topic, classNames, onClick }: LanguagePillProps) => {
golang: GolangIcon,
vue: VueIcon,
kubernetes: KubernetesIcon,
hacktoberfest: HacktoberfestIcon,
};

return iconMap[name] || "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import React, { useState, useEffect } from "react";
import { useRouter } from "next/router";
import Image from "next/image";

import { TfiMoreAlt } from "react-icons/tfi";
import { FiCopy } from "react-icons/fi";
import { HiUserAdd } from "react-icons/hi";
import { FaIdCard } from "react-icons/fa";
import { SignInWithOAuthCredentials, User } from "@supabase/supabase-js";
import { usePostHog } from "posthog-js/react";
import { clsx } from "clsx";

import Avatar from "components/atoms/Avatar/avatar";
import RainbowBg from "img/rainbow-cover.png";
import Button from "components/atoms/Button/button";
import Text from "components/atoms/Typography/text";
import { Textarea } from "components/atoms/Textarea/text-area";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "components/atoms/Dropdown/dropdown";

import Avatar from "components/atoms/Avatar/avatar";
import RainbowBg from "img/rainbow-cover.png";
import Button from "components/atoms/Button/button";
import Text from "components/atoms/Typography/text";
import { Textarea } from "components/atoms/Textarea/text-area";
import { useUserCollaborations } from "lib/hooks/useUserCollaborations";
import { useToast } from "lib/hooks/useToast";
import { cardPageUrl } from "lib/utils/urls";
Expand Down Expand Up @@ -155,96 +156,120 @@ const ContributorProfileHeader = ({
</div>
{isConnected && (
<div className="flex flex-col items-center gap-3 translate-y-24 md:translate-y-0 md:flex-row">
{/* Mobile dropdown menu */}

<DropdownMenu modal={false}>
<div className="flex items-center md: gap-2 mb-10 md:gap-6 flex-wrap">
<Button className="sm:hidden" variant="primary" href={cardPageUrl(username!)}>
<FaIdCard className="" />
</Button>
<Button className="hidden sm:inline-flex" variant="primary" href={cardPageUrl(username!)}>
<FaIdCard className="mt-1 mr-1" /> Get Card
</Button>

<Button
onClick={() => handleCopyToClipboard(`${host}/user/${user?.user_metadata.user_name}`)}
className="bg-white sm:hidden"
variant="text"
>
<FiCopy className="" />
</Button>
<Button
onClick={() => handleCopyToClipboard(`${host}/user/${user?.user_metadata.user_name}`)}
className="px-8 py-2 bg-white hidden sm:inline-flex"
variant="text"
>
<FiCopy className="mt-1 mr-1" /> Share
</Button>

{!isOwner && (
<DropdownMenuTrigger title="More options" className="p-2 mr-3 bg-white rounded-full cursor-pointer ">
<TfiMoreAlt size={20} className="" />
</DropdownMenuTrigger>
)}
</div>

<DropdownMenuContent align="end" className="flex flex-col gap-1 py-2 rounded-lg">
{user ? (
!isOwner && (
<>
<DropdownMenuItem
<div className="flex justify-center items-center gap-2 mb-10 md:gap-6 flex-wrap">
{user ? (
!isOwner && (
<>
{isFollowing ? (
<Button
onClick={handleFollowClick}
className="rounded-md flex items-center gap-1 !cursor-pointer [&>span>span:nth-child(1)]:hover:hidden [&>span>span:nth-child(1)]:focus:hidden [&>span>span:nth-child(2)]:hover:inline [&>span>span:nth-child(2)]:focus:inline"
variant="primary"
className="group w-[6.25rem] justify-center items-center"
>
{/* `span` tag changes below must be in line with the styles on the parent */}
<span className="pl-3 pr-7">
{isFollowing ? (
<>
<span className="">Following</span>
<span className="hidden">Unfollow</span>
</>
) : (
"Follow"
)}
</span>
</DropdownMenuItem>
{isPremium && isRecievingCollaborations && (
<span className="text-center hidden sm:block group-hover:hidden">Following</span>
<span className="text-center block sm:hidden group-hover:block">Unfollow</span>
</Button>
) : (
<Button variant="primary" className="w-[6.25rem] text-center" onClick={handleFollowClick}>
<HiUserAdd fontSize={20} className="mr-1" /> Follow
</Button>
)}
</>
)
) : (
<>
<Button
className="sm:hidden"
variant="primary"
onClick={async () =>
handleSignIn({ provider: "github", options: { redirectTo: `${host}/${currentPath}` } })
}
>
<HiUserAdd />
</Button>
<Button
className="w-[6.25rem] hidden sm:inline-flex"
variant="primary"
onClick={async () =>
handleSignIn({ provider: "github", options: { redirectTo: `${host}/${currentPath}` } })
}
>
<HiUserAdd fontSize={20} className="mr-1" /> Follow
</Button>
</>
)}

<Button className="sm:hidden bg-white" variant="text" href={cardPageUrl(username!)}>
<FaIdCard className="" />
</Button>
<Button className="hidden sm:inline-flex text-black" variant="default" href={cardPageUrl(username!)}>
<FaIdCard className="mt-1 mr-1" /> Get Card
</Button>
<DropdownMenu modal={false}>
<div className="items-center gap-2 md:gap-6 flex-wrap">
{!isOwner && (
<DropdownMenuTrigger
title="More options"
className="p-2 mr-3 bg-white rounded-full cursor-pointer "
>
<TfiMoreAlt size={20} className="" />
</DropdownMenuTrigger>
)}
</div>

<DropdownMenuContent align="end" className="flex flex-col gap-1 py-2 rounded-lg">
{user ? (
!isOwner && (
<>
<DropdownMenuItem className="rounded-md">
<button onClick={() => setIsDialogOpen(true)} className="flex items-center gap-1 pl-3 pr-7">
Collaborate
<button
onClick={() => handleCopyToClipboard(`${host}/user/${user?.user_metadata.user_name}`)}
className="flex items-center gap-1 pl-3 pr-7"
>
Share
</button>
</DropdownMenuItem>
)}
</>
)
) : (
<>
<DropdownMenuItem className="rounded-md">
<button
onClick={async () =>
handleSignIn({ provider: "github", options: { redirectTo: `${host}/${currentPath}` } })
}
className="flex items-center gap-1 pl-3 pr-7"
>
Follow
</button>
</DropdownMenuItem>
{isRecievingCollaborations && (

{isPremium && isRecievingCollaborations && (
<DropdownMenuItem className="rounded-md">
<button onClick={() => setIsDialogOpen(true)} className="flex items-center gap-1 pl-3 pr-7">
Collaborate
</button>
</DropdownMenuItem>
)}
</>
)
) : (
<>
<DropdownMenuItem className="rounded-md">
<button
onClick={async () =>
handleSignIn({ provider: "github", options: { redirectTo: `${host}/${currentPath}` } })
}
className="flex items-center gap-1 pl-3 pr-7"
>
Collaborate
Share
</button>
</DropdownMenuItem>
)}
</>
)}
</DropdownMenuContent>
</DropdownMenu>
{isRecievingCollaborations && (
<DropdownMenuItem className="rounded-md">
<button
onClick={async () =>
handleSignIn({ provider: "github", options: { redirectTo: `${host}/${currentPath}` } })
}
className="flex items-center gap-1 pl-3 pr-7"
>
Collaborate
</button>
</DropdownMenuItem>
)}
</>
)}
</DropdownMenuContent>
</DropdownMenu>
</div>

{/* Mobile dropdown menu */}
</div>
)}
</div>
Expand Down
Loading

0 comments on commit d55c718

Please sign in to comment.