Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/beta' into feature-distinguish…
Browse files Browse the repository at this point in the history
…-create-option
  • Loading branch information
Anish0203 committed Oct 22, 2024
2 parents 6f61ed5 + 1f838fa commit 05e00e0
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 228 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@

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

## [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.

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.

2 changes: 1 addition & 1 deletion components/organisms/ContributorCard/contributor-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const ContributorCard = ({
</div>
</div>
<div className="flex flex-col items-end gap-2">
<CardHorizontalBarChart withDescription={false} languageList={languageList} />
<CardHorizontalBarChart languageList={languageList} />
{!!isMaintainer && <Badge text="maintainer" />}
</div>
</div>
Expand Down
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/app",
"description": "🍕The dashboard for open source discovery.",
"keywords": [],
"version": "2.64.0-beta.7",
"version": "2.64.0-beta.9",
"author": "Brian Douglas <brian@opensauced.pizza>",
"private": true,
"license": "Apache 2.0",
Expand Down

0 comments on commit 05e00e0

Please sign in to comment.