Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add OSCR tooltip to user page #3857

Merged
merged 10 commits into from
Aug 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import IssueCommentsTable from "components/Profiles/IssueCommentsTable/issue-com
import { contributionsOptions, useContributionsFilter } from "components/Profiles/contributors-sub-tab-list";
import { SubTabsList } from "components/TabList/tab-list";
import { OscrButton } from "components/Contributors/Oscr";
import InfoTooltip from "components/shared/InfoTooltip";
import UserRepositoryRecommendations from "../UserRepositoryRecommendations/user-repository-recommendations";

interface ContributorProfileTabProps {
Expand Down Expand Up @@ -370,7 +371,10 @@ const ContributorProfileTab = ({
</div>
<div className="grid grid-cols-2 2xl:grid-cols-4 justify-between gap-2 lg:flex-row md:gap-12 lg:gap-16">
<div>
<span className="text-xs text-light-slate-11">OSCR Rating</span>
<span className="flex gap-2 text-xs text-light-slate-11">
OSCR Rating
<InfoTooltip information="OSCR evaluates the engagement and impact of contributors across the entire open source ecosystem." />
</span>
<div className="flex mt-1 text-lg md:text-xl lg:text-2xl !text-black leading-none">
<OscrButton rating={contributor?.oscr} hideRating={!Boolean(user)} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/shared/InfoTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function InfoTooltip({ information, icon }: { information: string
<TooltipPortal>
<TooltipContent
side="bottom"
className="w-fit max-w-xs text-sm shadow-lg text-slate-100 px-4 py-3 rounded-xl bg-[#171E29]"
className="z-50 w-fit max-w-xs text-sm shadow-lg text-slate-100 px-4 py-3 rounded-xl bg-[#171E29]"
>
<TooltipArrow className="fill-[#171E29]" />
{information}
Expand Down
Loading