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 feedback btn #35

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions assets/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const ChevronOpenIcon = (props: IconSvgProps) => (
>
<g
fill="none"
fill-rule="evenodd"
fillRule="evenodd"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
Expand Down Expand Up @@ -166,4 +166,41 @@ export const BugIcon: React.FC<IconSvgProps> = ({
);
};

export default BugIcon;
export const FeedbackIcon: React.FC<IconSvgProps> = ({
size = 24,
width,
height,
...props
}) => {
return (
<svg
height={size || height}
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
d="M16 1C17.6569 1 19 2.34315 19 4C19 4.55228 18.5523 5 18 5C17.4477 5 17 4.55228 17 4C17 3.44772 16.5523 3 16 3H4C3.44772 3 3 3.44772 3 4V20C3 20.5523 3.44772 21 4 21H16C16.5523 21 17 20.5523 17 20V19C17 18.4477 17.4477 18 18 18C18.5523 18 19 18.4477 19 19V20C19 21.6569 17.6569 23 16 23H4C2.34315 23 1 21.6569 1 20V4C1 2.34315 2.34315 1 4 1H16Z"
fill="currentColor"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M20.7991 8.20087C20.4993 7.90104 20.0132 7.90104 19.7133 8.20087L11.9166 15.9977C11.7692 16.145 11.6715 16.3348 11.6373 16.5404L11.4728 17.5272L12.4596 17.3627C12.6652 17.3285 12.855 17.2308 13.0023 17.0835L20.7991 9.28666C21.099 8.98682 21.099 8.5007 20.7991 8.20087ZM18.2991 6.78666C19.38 5.70578 21.1325 5.70577 22.2134 6.78665C23.2942 7.86754 23.2942 9.61999 22.2134 10.7009L14.4166 18.4977C13.9744 18.9398 13.4052 19.2327 12.7884 19.3355L11.8016 19.5C10.448 19.7256 9.2744 18.5521 9.50001 17.1984L9.66448 16.2116C9.76728 15.5948 10.0602 15.0256 10.5023 14.5834L18.2991 6.78666Z"
fill="currentColor"
/>
<path
d="M5 7C5 6.44772 5.44772 6 6 6H14C14.5523 6 15 6.44772 15 7C15 7.55228 14.5523 8 14 8H6C5.44772 8 5 7.55228 5 7Z"
fill="currentColor"
/>
<path
d="M5 11C5 10.4477 5.44772 10 6 10H10C10.5523 10 11 10.4477 11 11C11 11.5523 10.5523 12 10 12H6C5.44772 12 5 11.5523 5 11Z"
fill="currentColor"
/>
<path
d="M5 15C5 14.4477 5.44772 14 6 14H7C7.55228 14 8 14.4477 8 15C8 15.5523 7.55228 16 7 16H6C5.44772 16 5 15.5523 5 15Z"
fill="currentColor"
/>
</svg>
);
};
49 changes: 48 additions & 1 deletion components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client";
import NextLink from "next/link";
import { Button } from "@nextui-org/button";
import { Tooltip } from "@nextui-org/tooltip";
Expand All @@ -9,10 +10,18 @@ import {
} from "@nextui-org/navbar";
import { Chip } from "@nextui-org/chip";
import { Link } from "@nextui-org/link";
import BugIcon from "@/assets/icons";
import { BugIcon, FeedbackIcon } from "@/assets/icons";
import { MyImage } from "@/components/ui/image";
import { SITE_CONFIG } from "@/data/config";

import {
Dropdown,
DropdownTrigger,
DropdownMenu,
DropdownSection,
DropdownItem,
} from "@nextui-org/dropdown";

export const Navbar = () => {
return (
<NextUINavbar maxWidth="xl" position="static" isBordered>
Expand Down Expand Up @@ -55,6 +64,44 @@ export const Navbar = () => {
</Tooltip>
</Link>
</NavbarItem>
<NavbarItem>
<Dropdown>
<Tooltip content="Give us feedback">
{/* add wrapper div workaround for tool tip */}
<div className="hover:brightness-90">
<DropdownTrigger>
<Button
size="sm"
isIconOnly
aria-label="Give us feedback"
variant="flat"
>
<FeedbackIcon className="text-default-500" />
</Button>
</DropdownTrigger>
</div>
</Tooltip>
<DropdownMenu aria-label="Feedback options">
<DropdownItem
key="contributor"
href={SITE_CONFIG.links.contributorFeedback}
target="_blank"
description="How can we improve your experience as a contributor?"
>
Contributor
</DropdownItem>

<DropdownItem
key="maintainer"
href={SITE_CONFIG.links.maintainerFeedback}
target="_blank"
description="Let us know about your experience as a maintainer"
>
Project maintainer
</DropdownItem>
</DropdownMenu>
</Dropdown>
</NavbarItem>
<NavbarItem>
<Link
isExternal
Expand Down
7 changes: 6 additions & 1 deletion components/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ import {
} from "@nextui-org/table";
import { Spinner } from "@nextui-org/spinner";
import { Contribution, PaginatedContributions } from "@/types/contribution";
import { ExternalLink, Content, Labels, Time, Project } from "./row";
import { ExternalLink, Content, Time, Project } from "./row";

import { useContributions } from "@/hooks/useContributions";
import { KudosQueryParameters } from "@/lib/notion/types";
import dynamic from "next/dynamic";
const Labels = dynamic(() => import("./row").then((m) => m.Labels), {
ssr: false,
});

interface IColumn {
name: string;
Expand Down
2 changes: 2 additions & 0 deletions data/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const SITE_CONFIG = {
"https://github.com/kudos-ink/portal/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=",
includeProject:
"https://github.com/kudos-ink/repository-classification/issues/new?labels=new-project&template=NEW_PROJECT.yaml&title=%5BAdd%5D%3A+",
maintainerFeedback: "https://eu.jotform.com/form/233383475336057",
contributorFeedback: "https://eu.jotform.com/form/233386452273055",
},
};

Expand Down