Skip to content

Commit

Permalink
chore: release 2.6.0 (#2913)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Mar 11, 2024
2 parents b3076b7 + f4b9af7 commit da73fe7
Show file tree
Hide file tree
Showing 58 changed files with 695 additions and 303 deletions.
83 changes: 83 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,89 @@

> All notable changes to this project will be documented in this file

## [2.6.0-beta.8](https://github.com/open-sauced/app/compare/v2.6.0-beta.7...v2.6.0-beta.8) (2024-03-11)


### 馃悰 Bug Fixes

* prevent overflow when insights have long titles ([#2910](https://github.com/open-sauced/app/issues/2910)) ([7003f28](https://github.com/open-sauced/app/commit/7003f289f71981553c14d548667b1fdb044ecbaf))

## [2.6.0-beta.7](https://github.com/open-sauced/app/compare/v2.6.0-beta.6...v2.6.0-beta.7) (2024-03-11)


### 馃悰 Bug Fixes

* use workspace members for checking contributor insight edit access ([#2907](https://github.com/open-sauced/app/issues/2907)) ([d8c982b](https://github.com/open-sauced/app/commit/d8c982b097658bab2d59b418ab99e2b7ef654bc3))

## [2.6.0-beta.6](https://github.com/open-sauced/app/compare/v2.6.0-beta.5...v2.6.0-beta.6) (2024-03-11)


### 馃悰 Bug Fixes

* use workspace members for checking repository insight edit access ([#2905](https://github.com/open-sauced/app/issues/2905)) ([d17d6e9](https://github.com/open-sauced/app/commit/d17d6e93201db5c0ee4c4d5d1e4bc2eb4807434c))

## [2.6.0-beta.5](https://github.com/open-sauced/app/compare/v2.6.0-beta.4...v2.6.0-beta.5) (2024-03-11)


### 馃崟 Features

* Use new workspace API workspace access control endpoints ([#2903](https://github.com/open-sauced/app/issues/2903)) ([b2f552d](https://github.com/open-sauced/app/commit/b2f552d7f8eb167be0e78e3ddd82e55563a48be3))

## [2.6.0-beta.4](https://github.com/open-sauced/app/compare/v2.6.0-beta.3...v2.6.0-beta.4) (2024-03-11)


### 馃悰 Bug Fixes

* display edit button on repository insights for workspace members ([#2901](https://github.com/open-sauced/app/issues/2901)) ([c3e5bf9](https://github.com/open-sauced/app/commit/c3e5bf956aa1e2c44d7f62ecb69c07ca2b630f93))

## [2.6.0-beta.3](https://github.com/open-sauced/app/compare/v2.6.0-beta.2...v2.6.0-beta.3) (2024-03-08)


### 馃悰 Bug Fixes

* add path to tab list array for separate title/URL combinations ([#2898](https://github.com/open-sauced/app/issues/2898)) ([328a1a7](https://github.com/open-sauced/app/commit/328a1a7d304972565b84374754a9521126b47161))


### 馃崟 Features

* remove upgrade access button from user settings ([#2896](https://github.com/open-sauced/app/issues/2896)) ([bf4d594](https://github.com/open-sauced/app/commit/bf4d594ad81f5695685fadb35cb87e4a29224ef8))

## [2.6.0-beta.2](https://github.com/open-sauced/app/compare/v2.6.0-beta.1...v2.6.0-beta.2) (2024-03-08)


### 馃崟 Features

* filter tracked repositories in workspace ([#2889](https://github.com/open-sauced/app/issues/2889)) ([5fcb469](https://github.com/open-sauced/app/commit/5fcb46999d50bd1333d53c459f6b3366b2801155))

## [2.6.0-beta.1](https://github.com/open-sauced/app/compare/v2.5.2-beta.3...v2.6.0-beta.1) (2024-03-08)


### 馃崟 Features

* show owners of insight pages ([#2879](https://github.com/open-sauced/app/issues/2879)) ([f014435](https://github.com/open-sauced/app/commit/f014435bfd71d8853f05c39a262ec98fd4163999))

## [2.5.2-beta.3](https://github.com/open-sauced/app/compare/v2.5.2-beta.2...v2.5.2-beta.3) (2024-03-08)


### 馃悰 Bug Fixes

* increase z-index for workspace members config ([#2897](https://github.com/open-sauced/app/issues/2897)) ([90b50a2](https://github.com/open-sauced/app/commit/90b50a290a29192e84bb8ca649df89fdfa669aad))
* short circuit workspace paths through the middleware ([#2900](https://github.com/open-sauced/app/issues/2900)) ([e376191](https://github.com/open-sauced/app/commit/e37619144ee2160b52ed8335af1cc8a84833fdc3))

## [2.5.2-beta.2](https://github.com/open-sauced/app/compare/v2.5.2-beta.1...v2.5.2-beta.2) (2024-03-07)


### 馃悰 Bug Fixes

* Clear input after adding a repository to insight page ([#2497](https://github.com/open-sauced/app/issues/2497)) ([743836c](https://github.com/open-sauced/app/commit/743836c1695b7652eb6e4dee5a664f74e0aabcdd))

## [2.5.2-beta.1](https://github.com/open-sauced/app/compare/v2.5.1...v2.5.2-beta.1) (2024-03-07)


### 馃悰 Bug Fixes

* typo on modal and create consistency with OpenSauced spacing ([#2892](https://github.com/open-sauced/app/issues/2892)) ([c536347](https://github.com/open-sauced/app/commit/c536347c0cb99ed3625e3804ad9e2796ef4cec0a))

## [2.5.1](https://github.com/open-sauced/app/compare/v2.5.0...v2.5.1) (2024-03-06)


Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
<div align="center">
<br>
<img alt="Open Sauced" src="https://i.ibb.co/7jPXt0Z/logo1-92f1a87f.png" width="300px">
<img alt="OpenSauced" src="https://i.ibb.co/7jPXt0Z/logo1-92f1a87f.png" width="300px">
<h1>馃崟 app.opensauced.pizza 馃崟</h1>
<strong>The site provides insights to Open Source projects.</strong>
</div>
Expand Down Expand Up @@ -104,4 +104,4 @@ npx -y @open-sauced/conventional-commit
## 馃崟 Community

Got Questions? Join the conversation in our [Discord](https://discord.gg/U2peSNf23P).
Find Open Sauced videos and release overviews on our [YouTube Channel](https://www.youtube.com/channel/UCklWxKrTti61ZCROE1e5-MQ), and check out the resources on our [Dev.to org](https://dev.to/opensauced).
Find OpenSauced videos and release overviews on our [YouTube Channel](https://www.youtube.com/channel/UCklWxKrTti61ZCROE1e5-MQ), and check out the resources on our [Dev.to org](https://dev.to/opensauced).
12 changes: 11 additions & 1 deletion components/ListHeader/list-header.tsx
Expand Up @@ -10,6 +10,7 @@ import ContextThumbnail from "components/atoms/ContextThumbnail/context-thumbnai
import { truncateString } from "lib/utils/truncate-string";
import { useToast } from "lib/hooks/useToast";
import ClientOnly from "components/atoms/ClientOnly/client-only";
import StackedOwners from "components/Workspaces/StackedOwners";

interface ListHeaderProps {
name: string;
Expand All @@ -18,6 +19,7 @@ interface ListHeaderProps {
isPublic: boolean;
isOwner: boolean;
numberOfContributors: number;
owners?: string[];
}

const ListHeader = ({
Expand All @@ -27,6 +29,7 @@ const ListHeader = ({
workspaceId,
isOwner,
numberOfContributors,
owners,
}: ListHeaderProps): JSX.Element => {
const { toast } = useToast();
const posthog = usePostHog();
Expand Down Expand Up @@ -57,7 +60,14 @@ const ListHeader = ({
</Title>
</div>
<div className="flex items-center gap-2 mt-4" id="contributorCount">
<ClientOnly>{numberOfContributors} Contributors </ClientOnly>
<ClientOnly>
{owners && (
<div className="flex gap-2 items-center">
<StackedOwners owners={owners} /> |
</div>
)}
<p>{numberOfContributors} Contributors</p>
</ClientOnly>
</div>
</div>
</div>
Expand Down
7 changes: 2 additions & 5 deletions components/TabList/tab-list.tsx
Expand Up @@ -4,6 +4,7 @@ import TabListItem from "./tab-list-item";

type TabItem = {
name: string;
path: string;
numOf?: number;
};

Expand Down Expand Up @@ -35,11 +36,7 @@ const TabList: React.FC<NavProps> = ({ tabList, pageId, selectedTab }) => {
: "border-transparent hover:border-light-slate-8"
}`}
>
<TabListItem
tab={tab}
pageLink={`${pageId ? `${pageId}/` : ""}${tab.name.toLowerCase()}`}
selectedTab={selectedTab}
/>
<TabListItem tab={tab} pageLink={`${pageId ? `${pageId}/` : ""}${tab.path}`} selectedTab={selectedTab} />
</div>
))}
</nav>
Expand Down
37 changes: 37 additions & 0 deletions components/Workspaces/StackedOwners.tsx
@@ -0,0 +1,37 @@
import * as HoverCard from "@radix-ui/react-hover-card";
import Link from "next/link";
import HoverCardWrapper from "components/molecules/HoverCardWrapper/hover-card-wrapper";
import { Avatar } from "components/atoms/Avatar/avatar-hover-card";

export default function StackedOwners({ owners }: { owners: string[] }) {
return (
<div className="flex -space-x-3 transition-all duration-300 hover:-space-x-1">
{owners.slice(0, owners.length > 4 ? 4 : owners.length).map((username) => (
<div
key={`owner-picture-${username}`}
className="w-8 h-8 overflow-hidden transition-all duration-300 border-2 border-white border-solid rounded-full"
>
<HoverCard.Root>
<Link href={`/user/${username}`} as={`/user/${username}`}>
<HoverCard.Trigger>
<Avatar contributor={username} />
</HoverCard.Trigger>
</Link>

<HoverCard.Portal>
<HoverCard.Content sideOffset={5}>
<HoverCardWrapper username={username} />
</HoverCard.Content>
</HoverCard.Portal>
</HoverCard.Root>
</div>
))}

{owners.length > 4 && (
<div className="text-xs flex items-center bg-slate-100 text-center px-1 w-8 h-8 overflow-hidden transition-all duration-300 border-2 border-white border-solid rounded-full">
<p>+{owners.length - 4}</p>
</div>
)}
</div>
);
}
40 changes: 40 additions & 0 deletions components/Workspaces/TrackedRepositoryFilter.tsx
@@ -0,0 +1,40 @@
import { useEffect, useState } from "react";
import MultiSelect, { OptionKeys } from "components/atoms/Select/multi-select";

type TrackedRepositoryFilterProps = {
options: OptionKeys[];
handleSelect: (selected: OptionKeys[]) => void;
};

export default function TrackedRepositoryFilter({ options, handleSelect }: TrackedRepositoryFilterProps) {
const [isMultiSelectOpen, setIsMultiSelectOpen] = useState(false);
const [selected, setSelected] = useState<OptionKeys[]>([]);

useEffect(() => {
handleSelect(selected);
}, [selected]);

return (
<MultiSelect
placeholder="Filter"
inputPlaceholder="Search repositories"
className="px-3"
options={options}
open={isMultiSelectOpen}
setOpen={setIsMultiSelectOpen}
selected={selected}
setSelected={setSelected}
handleSelect={(option) => {
setSelected((list) => {
// toggle: if already in, filter, else add into list
if (list.find((o) => o.value === option.value)) {
list = list.filter((o) => o.value !== option.value);
} else {
list = [...list, option];
}
return list;
});
}}
/>
);
}
3 changes: 2 additions & 1 deletion components/Workspaces/WorkspacesTabList.tsx
Expand Up @@ -7,7 +7,8 @@ type TabName = "repositories" | "contributors" | "activity" | "highlights" | "";

const tabList: {
name: CapitalizeFirstLetter<TabName>;
}[] = [{ name: "Repositories" }];
path: string;
}[] = [{ name: "Repositories", path: "" }];

interface WorkspacesTabListProps {
selectedTab: TabName;
Expand Down
9 changes: 5 additions & 4 deletions components/atoms/Select/multi-select.tsx
Expand Up @@ -77,16 +77,17 @@ const MultiSelect = ({
)}
</button>
</PopoverTrigger>
<PopoverContent align="end" className="!w-full bg-white p-0 max-w-sm">
<PopoverContent align="end" className="!w-full bg-white p-0 max-w-sm h-fit">
{options.length > 0 && (
<Command loop onKeyDown={handleKeyDown} className="w-full px-0 bg-transparent">
<Command loop onKeyDown={handleKeyDown} className="w-full px-0 pt-1 bg-transparent">
<CommandInput
ref={inputRef}
placeholder={inputPlaceholder ?? "Search Items"}
value={inputValue}
onValueChange={setInputValue}
className="px-2 focus:ring-0"
/>
<CommandGroup className="flex flex-col !px-0 overflow-scroll max-h-48">
<CommandGroup className="flex flex-col !px-0 !py-0 overflow-x-hidden overflow-y-scroll max-h-52">
{open && options.length > 0
? options.map((option) => (
<CommandItem
Expand All @@ -102,7 +103,7 @@ const MultiSelect = ({
}}
onClick={() => handleSelect(option)}
className={clsx(
"!cursor-pointer flex justify-between items-center !px-1 rounded-md truncate break-words w-full",
"!cursor-pointer flex justify-between items-center !px-3 rounded-md truncate break-words w-full",
selected.some((s) => s.value === option.value) && ""
)}
>
Expand Down
4 changes: 2 additions & 2 deletions components/molecules/DevCard/dev-card.tsx
Expand Up @@ -123,7 +123,7 @@ export default function DevCard(props: DevCardProps) {
}}
>
<div className=" absolute left-[10px] top-[10px] flex items-center gap-1 cursor-pointer">
<Image className="rounded" alt="Open Sauced Logo" width={13} height={13} src={openSaucedImg} />
<Image className="rounded" alt="OpenSauced Logo" width={13} height={13} src={openSaucedImg} />
<p className={"font-semibold text-white"} style={{ fontSize: "8px" }}>
OpenSauced
</p>
Expand Down Expand Up @@ -245,7 +245,7 @@ export default function DevCard(props: DevCardProps) {
</Link>
)}
<div className="flex justify-center mt-2">
<Image className="rounded" alt="Open Sauced Logo" width={13} height={13} src={openSaucedImg} />
<Image className="rounded" alt="OpenSauced Logo" width={13} height={13} src={openSaucedImg} />
<p className={"font-semibold text-white ml-1"} style={{ fontSize: "8px" }}>
OpenSauced
</p>
Expand Down
2 changes: 1 addition & 1 deletion components/molecules/HeaderLogo/header-logo.tsx
Expand Up @@ -16,7 +16,7 @@ const HeaderLogo: React.FC<HeaderLogoProps> = ({ textIsBlack, withBg = false, re
<div className="flex items-center py-2 gap-2 cursor-pointer">
<Image
className="rounded"
alt="Open Sauced Logo"
alt="OpenSauced Logo"
width={20}
src={withBg ? openSaucedImgWithBg : openSaucedImg}
/>
Expand Down
16 changes: 15 additions & 1 deletion components/molecules/InsightHeader/insight-header.tsx
Expand Up @@ -14,6 +14,7 @@ import { truncateString } from "lib/utils/truncate-string";
import useRepositories from "lib/hooks/api/useRepositories";
import { useToast } from "lib/hooks/useToast";
import { setQueryParams } from "lib/utils/query-params";
import StackedOwners from "components/Workspaces/StackedOwners";
import CardRepoList from "../CardRepoList/card-repo-list";
import ComponentDateFilter from "../ComponentDateFilter/component-date-filter";

Expand All @@ -23,9 +24,17 @@ interface InsightHeaderProps {
insightId: string;
canEdit: boolean | undefined;
workspaceId?: string;
owners?: string[];
}

const InsightHeader = ({ insight, repositories, insightId, canEdit, workspaceId }: InsightHeaderProps): JSX.Element => {
const InsightHeader = ({
insight,
repositories,
insightId,
canEdit,
workspaceId,
owners,
}: InsightHeaderProps): JSX.Element => {
const router = useRouter();
const { range } = router.query;
const { data: repoData, meta: repoMeta } = useRepositories(repositories);
Expand Down Expand Up @@ -66,6 +75,11 @@ const InsightHeader = ({ insight, repositories, insightId, canEdit, workspaceId
</Title>
</div>
<div className="flex items-center gap-2 mt-4">
{owners && (
<div className="flex gap-2 items-center">
<StackedOwners owners={owners} /> |
</div>
)}
{insight && insight.repos && insight.repos.length > 0 && (
<CardRepoList limit={2} repoList={repoList} total={repoMeta.itemCount} />
)}
Expand Down
Expand Up @@ -4,7 +4,7 @@ import RepoCardProfile from "../RepoCardProfile/repo-card-profile";
const RepositoryResult = () => {
return (
<div className="flex py-3 justify-between group hover:bg-light-orange-9 px-4">
<RepoCardProfile orgName="open sauced" prCount={23} issueCount={102} avatar="" repoName="insights" />
<RepoCardProfile orgName="OpenSauced" prCount={23} issueCount={102} avatar="" repoName="insights" />
<Button className="text-light-orange-10 group-hover:text-white" variant="text">
Add Repository
</Button>
Expand Down
Expand Up @@ -13,7 +13,7 @@ const RepositoryCartItemTemplate: ComponentStory<typeof RepositoryCartItem> = (a
export const Default = RepositoryCartItemTemplate.bind({});

Default.args = {
orgName: "open sauced",
orgName: "OpenSauced",
repoName: "hot",
totalPrs: 32,
};
Expand Up @@ -199,7 +199,7 @@ const ContributorProfileTab = ({
/>
<div className="flex-1 md:flex-[2.5]">
<div className="flex items-center gap-2">
<Image className="rounded" alt="Open Sauced Logo" width={30} height={30} src={openSaucedImg} />
<Image className="rounded" alt="OpenSauced Logo" width={30} height={30} src={openSaucedImg} />
<Title className="font-semibold text-lg" level={4}>
Do you know {login}?
</Title>
Expand Down
2 changes: 1 addition & 1 deletion components/organisms/Footer/footer.tsx
Expand Up @@ -134,7 +134,7 @@ const Footer = (): JSX.Element => {
</div>
<div className="flex md:justify-center lg:hidden lg:border-none lg:order-2 border-t py-3 pb-4 mt-2 text-sm gap-x-2">
<Text className="text-light-slate-9">
{new Date().getFullYear()} <span className="hidden md:inline-block">Open sauced</span>
{new Date().getFullYear()} <span className="hidden md:inline-block">OpenSauced</span>
</Text>
<div className="flex items-center gap-x-3 text-light-slate-11 text-sm">
<a
Expand Down

0 comments on commit da73fe7

Please sign in to comment.