Skip to content

Commit

Permalink
Merge branch 'beta' into fix/eslint-warning-anchor-is-valid
Browse files Browse the repository at this point in the history
  • Loading branch information
CorinaMurg authored Oct 25, 2024
2 parents ecbd2ca + f5acb94 commit 7aa5bba
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 256 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,50 @@

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

## [2.64.0](https://github.com/open-sauced/app/compare/v2.63.0...v2.64.0) (2024-10-22)


### 🍕 Features

* download `ContributorsTable` data as JSON/CSV ([#4151](https://github.com/open-sauced/app/issues/4151)) ([d87b37e](https://github.com/open-sauced/app/commit/d87b37eed95e8a28062adfd49ccbf425abd5f852))
* removed developer pack form from user settings page ([#4173](https://github.com/open-sauced/app/issues/4173)) ([da975d7](https://github.com/open-sauced/app/commit/da975d77bb00b5b9d8c3a3c930f0b5a1e6a1a625))
* removed payments and limits ([#4171](https://github.com/open-sauced/app/issues/4171)) ([898d889](https://github.com/open-sauced/app/commit/898d8895027e4a86ca02b6d79eb94c035750f7ab))


### 🐛 Bug Fixes

* a11y rule "iframe-has-title" fails with a warning. ([#4162](https://github.com/open-sauced/app/issues/4162)) ([f15764a](https://github.com/open-sauced/app/commit/f15764a69d106da6909bca2096a1eb379cfa5020))
* a11y rule "img-redundant-alt" fails with a warning ([#4176](https://github.com/open-sauced/app/issues/4176)) ([cc9cdf0](https://github.com/open-sauced/app/commit/cc9cdf0f162d576e5f23035f5a569e4e798ffe10))
* a11y rule "no-noninteractive-element-interactions" ([#4163](https://github.com/open-sauced/app/issues/4163)) ([4d26abc](https://github.com/open-sauced/app/commit/4d26abc894978cfe18729df8a8fdb9782b005bd2))
* fixed changing workspaces visibility regression ([#4172](https://github.com/open-sauced/app/issues/4172)) ([ee12474](https://github.com/open-sauced/app/commit/ee124748bf8a5e77121d73fef7172bf8a09647da))
* Make the "create workspace" option more obvious ([#4177](https://github.com/open-sauced/app/issues/4177)) ([9d8ae39](https://github.com/open-sauced/app/commit/9d8ae39c77d8e9e45f40e3d64a381bb3eb66582b))
* removed unused code ([#4178](https://github.com/open-sauced/app/issues/4178)) ([d6fff39](https://github.com/open-sauced/app/commit/d6fff39fb9e851be5fb7a9ab4697a78cc2e86fbf))
* resolve a11y warnings for role-supports-aria-props rule ([#4174](https://github.com/open-sauced/app/issues/4174)) ([95e2099](https://github.com/open-sauced/app/commit/95e2099eb7890a3843a385a84aeb73019df15677))
* throw errors on insight creation failure ([#4145](https://github.com/open-sauced/app/issues/4145)) ([e3f8db3](https://github.com/open-sauced/app/commit/e3f8db353b691f39bf6f9920406f45815cd87717))
* use a tags instead of link tags ([#4158](https://github.com/open-sauced/app/issues/4158)) ([7b48770](https://github.com/open-sauced/app/commit/7b48770212db47b72562f7fe16caa780b73c49a5))

## [2.64.0-beta.10](https://github.com/open-sauced/app/compare/v2.64.0-beta.9...v2.64.0-beta.10) (2024-10-22)


### 🐛 Bug Fixes

* Make the "create workspace" option more obvious ([#4177](https://github.com/open-sauced/app/issues/4177)) ([9d8ae39](https://github.com/open-sauced/app/commit/9d8ae39c77d8e9e45f40e3d64a381bb3eb66582b))
* resolve a11y warnings for role-supports-aria-props rule ([#4174](https://github.com/open-sauced/app/issues/4174)) ([95e2099](https://github.com/open-sauced/app/commit/95e2099eb7890a3843a385a84aeb73019df15677))

## [2.64.0-beta.9](https://github.com/open-sauced/app/compare/v2.64.0-beta.8...v2.64.0-beta.9) (2024-10-21)


### 🐛 Bug Fixes

* removed unused code ([#4178](https://github.com/open-sauced/app/issues/4178)) ([d6fff39](https://github.com/open-sauced/app/commit/d6fff39fb9e851be5fb7a9ab4697a78cc2e86fbf))

## [2.64.0-beta.8](https://github.com/open-sauced/app/compare/v2.64.0-beta.7...v2.64.0-beta.8) (2024-10-21)


### 🐛 Bug Fixes

* a11y rule "img-redundant-alt" fails with a warning ([#4176](https://github.com/open-sauced/app/issues/4176)) ([cc9cdf0](https://github.com/open-sauced/app/commit/cc9cdf0f162d576e5f23035f5a569e4e798ffe10))

## [2.64.0-beta.7](https://github.com/open-sauced/app/compare/v2.64.0-beta.6...v2.64.0-beta.7) (2024-10-17)


Expand Down
141 changes: 65 additions & 76 deletions CODEOWNERS

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion components/Contributors/AddToContributorInsightDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useRouter } from "next/router";
import { BsGithub } from "react-icons/bs";
import { usePostHog } from "posthog-js/react";
import { safeParse } from "valibot";
import { PlusIcon } from "@heroicons/react/24/outline";
import SingleSelect from "components/atoms/Select/single-select";
import Button from "components/shared/Button/button";
import { fetchApiData } from "helpers/fetchApiData";
Expand Down Expand Up @@ -118,7 +119,16 @@ export default function AddToContributorInsightDrawer({
) : (
<SingleSelect
options={[
{ label: "Create new insight...", value: "new" },
{
label: "Create new insight...",
value: "new",
icon: (
<PlusIcon
style={{ strokeWidth: "3px" }}
className="w-5 text-gray-500 h-5 p-0.5 -ml-1 text-semibold group-hover:bg-orange-100 rounded-md"
/>
),
},
...contributorInsights.map(({ id, name }) => ({
label: name,
value: id,
Expand Down
12 changes: 11 additions & 1 deletion components/Contributors/AddToContributorInsightModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useRouter } from "next/router";
import { BsGithub } from "react-icons/bs";
import { usePostHog } from "posthog-js/react";
import { safeParse } from "valibot";
import { PlusIcon } from "@heroicons/react/24/outline";
import Card from "components/atoms/Card/card";
import SingleSelect from "components/atoms/Select/single-select";
import { Dialog, DialogContent } from "components/molecules/Dialog/dialog";
Expand Down Expand Up @@ -119,7 +120,16 @@ export default function AddToContributorInsightModal({
) : (
<SingleSelect
options={[
{ label: "Create new insight...", value: "new" },
{
label: "Create new insight...",
value: "new",
icon: (
<PlusIcon
style={{ strokeWidth: "3px" }}
className="w-5 text-gray-500 h-5 p-0.5 -ml-1 text-semibold group-hover:bg-orange-100 rounded-md"
/>
),
},
...contributorInsights.map(({ id, name }) => ({
label: name,
value: id,
Expand Down
12 changes: 11 additions & 1 deletion components/Repositories/AddToWorkspaceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
import { useRouter } from "next/router";
import { BsGithub } from "react-icons/bs";
import { usePostHog } from "posthog-js/react";
import { PlusIcon } from "@heroicons/react/24/outline";
import Card from "components/atoms/Card/card";
import SingleSelect from "components/atoms/Select/single-select";
import { Dialog, DialogContent } from "components/molecules/Dialog/dialog";
Expand Down Expand Up @@ -114,7 +115,16 @@ export default function AddToWorkspaceModal({ repository, isOpen, onCloseModal,
) : (
<SingleSelect
options={[
{ label: "Create new workspace...", value: "new" },
{
label: "Create new workspace...",
value: "new",
icon: (
<PlusIcon
style={{ strokeWidth: "3px" }}
className="w-5 text-gray-500 h-5 p-0.5 -ml-1 text-semibold group-hover:bg-orange-100 rounded-md"
/>
),
},
...workspaces.map(({ id, name }) => ({
label: name,
value: id,
Expand Down
1 change: 0 additions & 1 deletion components/StarSearch/StarSearchChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ export function StarSearchChat({
role="feed"
aria-label="StarSearch conversation"
aria-busy={isRunning}
aria-setsize={-1}
className={clsx("w-full max-w-xl mx-auto lg:max-w-5xl pb-[210px] md:pb-[285px]")}
>
{chatMessagesToProcess.map((message, i, messages) => {
Expand Down
56 changes: 33 additions & 23 deletions components/atoms/Select/single-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface SingleSelectProps {
onValueChange: (value: string) => void;
placeholder?: string;
inputPlaceholder?: string;
options: { label: string; value: string }[];
options: { label: string; value: string; icon?: React.ReactElement }[];
position?: "popper" | "item-aligned";
isSearchable?: boolean;
insetLabel?: string;
Expand Down Expand Up @@ -90,28 +90,38 @@ const SingleSelect = ({
)}
<CommandGroup className="flex flex-col overflow-x-hidden overflow-y-scroll max-h-52">
{isOpen && options.length > 0
? options.map((option) => (
<CommandItem
key={option.value}
onSelect={(value) => {
setInputValue("");
setIsOpen(false);
onValueChange(option.value);
}}
onMouseDown={(e) => {
e.preventDefault();
setIsOpen(false);
onValueChange(option.value);
}}
onClick={() => {
setIsOpen(false);
onValueChange(option.value);
}}
className="!z-50 !cursor-pointer flex justify-between min-w-[7rem] items-center !px-3 rounded-md truncate break-words w-full"
>
{option.label}
</CommandItem>
))
? options.map((option) => {
const Icon = option.icon;
return (
<CommandItem
key={option.value}
onSelect={(value) => {
setInputValue("");
setIsOpen(false);
onValueChange(option.value);
}}
onMouseDown={(e) => {
e.preventDefault();
setIsOpen(false);
onValueChange(option.value);
}}
onClick={() => {
setIsOpen(false);
onValueChange(option.value);
}}
className="!z-50 !cursor-pointer flex justify-between min-w-[7rem] items-center !px-3 rounded-md truncate break-words w-full"
>
{Icon ? (
<div className="flex items-center">
{Icon}
<span className="ml-1">{option.label}</span>
</div>
) : (
option.label
)}
</CommandItem>
);
})
: null}
</CommandGroup>
</Command>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const AnnouncementCard = ({ title, description, bannerSrc, url, cta = "Learn mor
<div className="w-full">
<AspectRatio.Root ratio={1.85 / 1}>
<picture>
<img src={bannerSrc} className="object-cover w-full h-full" alt={`${title} banner image`} />
<img src={bannerSrc} className="object-cover w-full h-full" alt={`${title} banner`} />
</picture>
</AspectRatio.Root>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { useEffect, useState } from "react";
import Text from "components/atoms/Typography/text";
import Tooltip from "components/atoms/Tooltip/tooltip";
import colors from "../../../lib/utils/color.json";

export interface AllSimpleColors {
Expand All @@ -19,22 +17,15 @@ export interface LanguageObject {

interface CardHorizontalBarChartProps {
languageList: LanguageObject[];
withDescription: boolean;
}

const languageToColor: AllSimpleColors = colors as AllSimpleColors;

const CardHorizontalBarChart = ({ languageList, withDescription }: CardHorizontalBarChartProps): JSX.Element => {
const CardHorizontalBarChart = ({ languageList }: CardHorizontalBarChartProps): JSX.Element => {
const sortedLangArray = languageList.sort((a, b) => b.percentageUsed - a.percentageUsed);
// used this state to calculate thte percentage of each language
const [percentage, setPercentage] = useState<any>(0);

const [descriptText, setDescriptText] = useState(sortedLangArray[0]?.languageName || "javascript");

const handleChangeDescriptText = (descriptText: string) => {
setDescriptText(descriptText);
};

useEffect(() => {
if (sortedLangArray.length === 0) return;

Expand All @@ -54,7 +45,6 @@ const CardHorizontalBarChart = ({ languageList, withDescription }: CardHorizonta
index < 5 && (
<div
key={index}
onMouseOver={() => handleChangeDescriptText(languageName)}
className="h-2 transition-all duration-500 ease-in-out"
style={{
width: `${percentageUsed < 20 ? (percentageUsed / percentage) * 100 : percentageUsed}%`,
Expand All @@ -67,21 +57,6 @@ const CardHorizontalBarChart = ({ languageList, withDescription }: CardHorizonta
);
})}
</div>
{withDescription && (
<div className="flex gap-2 w-32 items-baseline">
<div
className={"w-2 h-2 rounded-full"}
style={{
backgroundColor: languageToColor[descriptText]
? (languageToColor[descriptText].color as string)
: NOTSUPPORTED,
}}
/>
<Tooltip className="max-w-[100px]" content={descriptText}>
<Text className="!text-xs !truncate !font-semibold !text-light-slate-11">{descriptText}</Text>
</Tooltip>
</div>
)}
</div>
);
};
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7aa5bba

Please sign in to comment.