Skip to content

Commit

Permalink
chore: release 1.70.0 (#1868)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Oct 11, 2023
2 parents cf175da + 4d240a8 commit 2495d06
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 26 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@

> All notable changes to this project will be documented in this file
## [1.70.0-beta.1](https://github.com/open-sauced/insights/compare/v1.69.1-beta.2...v1.70.0-beta.1) (2023-10-11)


### 🍕 Features

* add new "Get Card" CTA button to profile ([#1839](https://github.com/open-sauced/insights/issues/1839)) ([9f16f3b](https://github.com/open-sauced/insights/commit/9f16f3b63a1411635927d3a0b138a1500d0b5298))


### 🐛 Bug Fixes

* filter out orgs from GitHub list import ([#1866](https://github.com/open-sauced/insights/issues/1866)) ([90bf15a](https://github.com/open-sauced/insights/commit/90bf15a73f4385647eb233f80634f3ba92fdc77d))

### [1.69.1-beta.2](https://github.com/open-sauced/insights/compare/v1.69.1-beta.1...v1.69.1-beta.2) (2023-10-11)


### ✅ Tests

* increase timeout for e2e tests ([#1867](https://github.com/open-sauced/insights/issues/1867)) ([2e0a175](https://github.com/open-sauced/insights/commit/2e0a175eff06688801ff958d68b4db1ffc8d22c0))

### [1.69.1-beta.1](https://github.com/open-sauced/insights/compare/v1.69.0...v1.69.1-beta.1) (2023-10-11)


### 🐛 Bug Fixes

* mobile responsiveness for add to list dropdown ([fda8d3a](https://github.com/open-sauced/insights/commit/fda8d3a1427a92fde4ad3644373a4dc99d2091e1))

## [1.69.0](https://github.com/open-sauced/insights/compare/v1.68.0...v1.69.0) (2023-10-11)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ import React, { useState, useEffect } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import Image from "next/image";
import { clsx } from "clsx";
import { usePostHog } from "posthog-js/react";

import { TfiMoreAlt } from "react-icons/tfi";
import { HiUserAdd } from "react-icons/hi";
import { SlUserFollowing } from "react-icons/sl";
import { SignInWithOAuthCredentials, User } from "@supabase/supabase-js";
import { usePostHog } from "posthog-js/react";
import { clsx } from "clsx";

import dynamic from "next/dynamic";
import PizzaGradient from "img/icons/pizza-gradient.svg";

import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "components/atoms/Dropdown/dropdown";

import Avatar from "components/atoms/Avatar/avatar";
import Tooltip from "components/atoms/Tooltip/tooltip";
import RainbowBg from "img/rainbow-cover.png";
import Button from "components/atoms/Button/button";
import Text from "components/atoms/Typography/text";
Expand All @@ -27,6 +30,7 @@ import { useToast } from "lib/hooks/useToast";
import { OptionKeys } from "components/atoms/Select/multi-select";
import { addListContributor, useFetchAllLists } from "lib/hooks/useList";
import { useFetchUser } from "lib/hooks/useFetchUser";
import { cardPageUrl } from "lib/utils/urls";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../Dialog/dialog";

const MultiSelect = dynamic(() => import("components/atoms/Select/multi-select"), { ssr: false });
Expand Down Expand Up @@ -137,7 +141,7 @@ const ContributorProfileHeader = ({
)}

<div className="container flex flex-row items-end justify-between gap-2 px-2 py-6 mx-auto md:px-16">
<div className="translate-y-[65px] hidden md:inline-flex">
<div className="translate-y-[65px] hidden md:inline-flex relative">
<Avatar
initialsClassName="text-[100px] -translate-y-2.5 leading-none"
initials={githubName?.charAt(0)}
Expand All @@ -147,8 +151,19 @@ const ContributorProfileHeader = ({
size={184}
isCircle
/>

<Tooltip content="Get dev card">
<Link
href={cardPageUrl(username!)}
className="absolute bottom-0 z-10 grid w-12 h-12 rounded-full shadow-md place-content-center border-conic-gradient right-4"
>
<div className="grid overflow-hidden rounded-full w-11 h-11 place-content-center bg-black/80">
<Image priority alt="user profile cover image" className="w-6 h-[1.7rem] " src={PizzaGradient} />
</div>
</Link>
</Tooltip>
</div>
<div className="translate-y-[110px] md:hidden ">
<div className="translate-y-[110px] md:hidden relative">
<Avatar
initialsClassName="text-[70px] -translate-y-1 leading-none"
initials={githubName?.charAt(0)}
Expand All @@ -158,6 +173,14 @@ const ContributorProfileHeader = ({
size={120}
isCircle
/>
<Link
href={cardPageUrl(username!)}
className="absolute bottom-0 z-10 grid rounded-full shadow-md w-11 h-11 right-1 place-content-center border-conic-gradient"
>
<div className="grid w-[2.5em] h-[2.5em] overflow-hidden rounded-full place-content-center bg-black/80">
<Image priority alt="user profile cover image" className="w-5 h-5 " src={PizzaGradient} />
</div>
</Link>
</div>
{isConnected && (
<div className="flex flex-col items-center gap-3 translate-y-24 md:translate-y-0 md:flex-row">
Expand All @@ -166,18 +189,38 @@ const ContributorProfileHeader = ({
!isOwner && (
<>
{isFollowing ? (
<Button
onClick={handleFollowClick}
variant="primary"
className="group w-[6.25rem] justify-center items-center"
>
<span className="hidden text-center sm:block group-hover:hidden">Following</span>
<span className="block text-center sm:hidden group-hover:block">Unfollow</span>
</Button>
<>
<Button
onClick={handleFollowClick}
variant="primary"
className="group w-[6.25rem] justify-center items-center hidden md:flex"
>
<span className="hidden text-center sm:block group-hover:hidden">Following</span>
<span className="block text-center sm:hidden group-hover:block">Unfollow</span>
</Button>
<button
className="p-2 text-white rounded-lg md:hidden bg-sauced-orange"
onClick={handleFollowClick}
>
<SlUserFollowing className="text-xl" />
</button>
</>
) : (
<Button variant="primary" className="w-[6.25rem] text-center" onClick={handleFollowClick}>
<HiUserAdd fontSize={20} className="mr-1" /> Follow
</Button>
<>
<Button
variant="primary"
className="w-[6.25rem] text-center hidden md:flex"
onClick={handleFollowClick}
>
<HiUserAdd fontSize={20} className="mr-1" /> Follow
</Button>
<button
onClick={handleFollowClick}
className="p-2 text-white rounded-lg md:hidden bg-sauced-orange"
>
<HiUserAdd className="text-xl font-bold" />
</button>
</>
)}
</>
)
Expand Down Expand Up @@ -269,8 +312,6 @@ const ContributorProfileHeader = ({
</DropdownMenuContent>
</DropdownMenu>
</div>

{/* Mobile dropdown menu */}
</div>
)}
</div>
Expand Down Expand Up @@ -393,7 +434,7 @@ const AddToListDropdown = ({ username }: { username: string }) => {
</Link>
</div>
}
className="w-10 px-4"
className="w-10 md:px-4 max-sm:text-sm"
placeholder="Add to list"
options={listOptions}
selected={selectedList}
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/UnsignedUsersRedirects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { test, expect } from "@playwright/test";

test("Homepage redirects to /feed for unsigned users", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveURL(/\/feed/, { timeout: 10000 });
await expect(page).toHaveURL(/\/feed/, { timeout: 20000 });
});

test("Insights Hub redirects to /feed for unsigned users", async ({ page }) => {
await page.goto("/hub/insights");
await expect(page).toHaveURL(/\/feed/, { timeout: 10000 });
await expect(page).toHaveURL(/\/feed/, { timeout: 20000 });
});
28 changes: 28 additions & 0 deletions img/icons/pizza-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@open-sauced/insights",
"description": "🍕The dashboard for open source discovery.",
"keywords": [],
"version": "1.69.0",
"version": "1.70.0-beta.1",
"author": "Brian Douglas <[email protected]>",
"private": true,
"license": "Apache 2.0",
Expand Down
7 changes: 5 additions & 2 deletions pages/hub/lists/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ import { useToast } from "lib/hooks/useToast";
interface CreateListPayload {
name: string;
is_public: boolean;
contributors: GhFollowing[];
contributors: { id: number; login: string }[];
}

interface GhFollowing {
id: number;
login: string;
type: string;
}

const CreateListPage = () => {
Expand Down Expand Up @@ -110,7 +111,9 @@ const CreateListPage = () => {
return;
}

const following = getFollowingRandom(followingList, 10);
// Filter out orgs
const contributorFollowingList = followingList.filter((contributor) => contributor.type === "User");
const following = getFollowingRandom(contributorFollowingList, 10);

const response = await createList({
name,
Expand Down
11 changes: 11 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ body {
width: 100%;
}

.border-conic-gradient {
background-image: conic-gradient(
from 180deg at 50% 50%,
#ff6a06 0deg,
#ff6492 120.00000357627869deg,
#ffe22c 223.12500715255737deg,
#fc620d 360deg,
#ff7e33 360deg
);
}

.sbui-btn > span {
display: flex;
align-items: center;
Expand Down

0 comments on commit 2495d06

Please sign in to comment.