diff --git a/CHANGELOG.md b/CHANGELOG.md index a641b18bd8..6192e4a131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,54 @@ > All notable changes to this project will be documented in this file +## [1.73.0-beta.5](https://github.com/open-sauced/insights/compare/v1.73.0-beta.4...v1.73.0-beta.5) (2023-10-26) + + +### πŸ› Bug Fixes + +* show contributors name and company in table ([#2012](https://github.com/open-sauced/insights/issues/2012)) ([79776a3](https://github.com/open-sauced/insights/commit/79776a3194366ade24bcc36f56e4f15d3623e185)) + +## [1.73.0-beta.4](https://github.com/open-sauced/insights/compare/v1.73.0-beta.3...v1.73.0-beta.4) (2023-10-26) + + +### πŸ› Bug Fixes + +* add logic to force the user to tag at least one repository to a highlight ([#2007](https://github.com/open-sauced/insights/issues/2007)) ([665fbf2](https://github.com/open-sauced/insights/commit/665fbf21cdac82aad6af17689a9eb23300f4f340)) + +## [1.73.0-beta.3](https://github.com/open-sauced/insights/compare/v1.73.0-beta.2...v1.73.0-beta.3) (2023-10-26) + + +### πŸ› Bug Fixes + +* now the error message in highlight form will alert assistive tech ([#2008](https://github.com/open-sauced/insights/issues/2008)) ([a0d4b3b](https://github.com/open-sauced/insights/commit/a0d4b3b0d0e25182c8a6229513dca39f056a12a4)) + +## [1.73.0-beta.2](https://github.com/open-sauced/insights/compare/v1.73.0-beta.1...v1.73.0-beta.2) (2023-10-25) + + +### πŸ› Bug Fixes + +* background color in text-input ([#1998](https://github.com/open-sauced/insights/issues/1998)) ([1913462](https://github.com/open-sauced/insights/commit/1913462f16e4bc893742f51024ea496ca1e45fd7)) +* more menu overlap issue on safari ([#1999](https://github.com/open-sauced/insights/issues/1999)) ([66df010](https://github.com/open-sauced/insights/commit/66df010eaf1abf8afed252eec351213737d33899)) + +## [1.73.0-beta.1](https://github.com/open-sauced/insights/compare/v1.72.1-beta.1...v1.73.0-beta.1) (2023-10-25) + + +### πŸ• Features + +* implement improved UX for non-connected users profile ([#1992](https://github.com/open-sauced/insights/issues/1992)) ([f11160c](https://github.com/open-sauced/insights/commit/f11160c68a218dd92eba35d94dbb2af3dd4a9631)) + + +### πŸ§‘β€πŸ’» Code Refactoring + +* Improve UX on Create New List page - `/hub/lists/new` ([#1987](https://github.com/open-sauced/insights/issues/1987)) ([c0fcf7a](https://github.com/open-sauced/insights/commit/c0fcf7ac57d680ee0c2ad6a8145983dde2275355)) + +### [1.72.1-beta.1](https://github.com/open-sauced/insights/compare/v1.72.0...v1.72.1-beta.1) (2023-10-25) + + +### πŸ› Bug Fixes + +* set border radius for modals in small screens ([#2004](https://github.com/open-sauced/insights/issues/2004)) ([738c714](https://github.com/open-sauced/insights/commit/738c714d6d988170c8ed86ebe9fdc2d4b4763694)) + ## [1.72.0](https://github.com/open-sauced/insights/compare/v1.71.1...v1.72.0) (2023-10-24) diff --git a/components/atoms/Avatar/avatar-hover-card.tsx b/components/atoms/Avatar/avatar-hover-card.tsx index 1dbfd32afd..4325797d7e 100644 --- a/components/atoms/Avatar/avatar-hover-card.tsx +++ b/components/atoms/Avatar/avatar-hover-card.tsx @@ -19,8 +19,8 @@ const AvatarHoverCard = ({ contributor, repositories, size = "large" }: AvatarPr switch (size) { case "small": - width = 35; - height = 35; + width = 45; + height = 45; break; default: break; diff --git a/components/atoms/Select/multi-select.tsx b/components/atoms/Select/multi-select.tsx index ef6fb43ccf..8a3b9bdbfa 100644 --- a/components/atoms/Select/multi-select.tsx +++ b/components/atoms/Select/multi-select.tsx @@ -42,7 +42,7 @@ const MultiSelect = ({ return ( setOpen(value)}> -
+
+
+ +
{/* Column: Act */}
{contributor.author_login ? getActivity(totalPrs, false) : "-"} diff --git a/components/molecules/ContributorProfileHeader/contributor-profile-header.tsx b/components/molecules/ContributorProfileHeader/contributor-profile-header.tsx index 400cfa0508..1dc30bcdcc 100644 --- a/components/molecules/ContributorProfileHeader/contributor-profile-header.tsx +++ b/components/molecules/ContributorProfileHeader/contributor-profile-header.tsx @@ -31,6 +31,7 @@ import { OptionKeys } from "components/atoms/Select/multi-select"; import { addListContributor, useFetchAllLists } from "lib/hooks/useList"; import { useFetchUser } from "lib/hooks/useFetchUser"; import { cardPageUrl } from "lib/utils/urls"; +import { copyToClipboard } from "lib/utils/copy-to-clipboard"; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../Dialog/dialog"; const MultiSelect = dynamic(() => import("components/atoms/Select/multi-select"), { ssr: false }); @@ -65,6 +66,7 @@ const ContributorProfileHeader = ({ }: ContributorProfileHeaderProps) => { const router = useRouter(); const currentPath = router.asPath; + const [isDialogOpen, setIsDialogOpen] = useState(false); const [loading, setLoading] = useState(false); const { requestConnection } = useUserConnections(); @@ -182,7 +184,7 @@ const ContributorProfileHeader = ({
- {isConnected && ( + {isConnected ? (
{user ? ( @@ -313,6 +315,25 @@ const ContributorProfileHeader = ({
+ ) : ( +
+ {!isOwner && ( + + )} +
)}
@@ -434,7 +455,7 @@ const AddToListDropdown = ({ username }: { username: string }) => { } - className="w-10 md:px-4 max-sm:text-sm" + className="md:px-4 max-sm:text-sm" placeholder="Add to list" options={listOptions} selected={selectedList} diff --git a/components/molecules/DevProfile/dev-profile.tsx b/components/molecules/DevProfile/dev-profile.tsx index 907e97b6ef..1e608597c4 100644 --- a/components/molecules/DevProfile/dev-profile.tsx +++ b/components/molecules/DevProfile/dev-profile.tsx @@ -5,6 +5,7 @@ import Avatar from "components/atoms/Avatar/avatar"; import { getAvatarByUsername } from "lib/utils/github"; import { truncateString } from "lib/utils/truncate-string"; +import AvatarHoverCard from "components/atoms/Avatar/avatar-hover-card"; interface DevProfileProps { username: string; @@ -26,13 +27,7 @@ const DevProfile = ({ username, company, hasBorder }: DevProfileProps) => { {/* Desktop */}
- +

diff --git a/components/molecules/Dialog/dialog.tsx b/components/molecules/Dialog/dialog.tsx index 1168a44abe..75858f17d8 100644 --- a/components/molecules/Dialog/dialog.tsx +++ b/components/molecules/Dialog/dialog.tsx @@ -54,7 +54,7 @@ const DialogContent = React.forwardRef< ref={ref} className={clsx( className, - "fixed z-50 grid w-full pb-3 gap-4 rounded-b-lg bg-light-slate-2 lg:p-6 animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 md:w-max sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0" + "fixed z-50 grid w-full pb-3 gap-4 bg-light-slate-2 lg:p-6 animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 md:w-max rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0" )} {...props} > diff --git a/components/molecules/HighlightInput/highlight-input-form.tsx b/components/molecules/HighlightInput/highlight-input-form.tsx index 11410ee5ed..0c9284a075 100644 --- a/components/molecules/HighlightInput/highlight-input-form.tsx +++ b/components/molecules/HighlightInput/highlight-input-form.tsx @@ -432,6 +432,12 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E const taggedRepoFullNames = taggedRepoList.map((repo) => `${repo.repoOwner}/${repo.repoName}`); + // Check if the user has tagged at least one repo and ask them to tag at least one if they haven't + if (taggedRepoList.length < 1) { + setError("Please add at least one repository associated with your blog post"); + return; + } + if (res.isError) { setLoading(false); @@ -526,11 +532,13 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E setIsDivFocused(false)} />
- {errorMsg && ( -

- {errorMsg} -

- )} +

+ {errorMsg && ( + + {errorMsg} + + )} +

{ return (
-
+
{/* Avatar */} {icon === "github" && } {icon === "globe" && } diff --git a/components/molecules/InsightPageCard/insight-page-card.tsx b/components/molecules/InsightPageCard/insight-page-card.tsx index 88831634be..3373ccb74d 100644 --- a/components/molecules/InsightPageCard/insight-page-card.tsx +++ b/components/molecules/InsightPageCard/insight-page-card.tsx @@ -10,6 +10,8 @@ import { getRelativeDays } from "lib/utils/date-utils"; import getRepoInsights from "lib/utils/get-repo-insights"; import useRepositories from "lib/hooks/api/useRepositories"; +import { copyToClipboard } from "lib/utils/copy-to-clipboard"; + import CardRepoList from "../CardRepoList/card-repo-list"; import PieChart, { PieData } from "../PieChart/pie-chart"; import StackedAvatar from "../StackedAvatar/stacked-avatar"; @@ -52,16 +54,6 @@ const InsightPageCard = ({ insight, user }: InsightPageCardProps): JSX.Element = }, ]; - // Function to handle copy to clipboard - const handleCopyToClipboard = async (content: any) => { - const url = new URL(content, window.location.origin).toString(); - try { - await navigator.clipboard.writeText(url); - } catch (error) { - console.log(error); - } - }; - const averagePrOpened = repoData.length > 0 ? Math.round(((open || 0) / total) * 100) : 0; return ( @@ -116,7 +108,11 @@ const InsightPageCard = ({ insight, user }: InsightPageCardProps): JSX.Element = {/* Card footer */}
+ )} + + {showSocialLinks && ( +
+ {twitter_username && ( + + + + )} + {!!display_email && ( + + + + )} + {!!linkedin_url && ( + + + + )} +
+ )} + + {!user && !showSocialLinks && ( + + )} +
+
+ )} + {(hasHighlights || inputVisible) && user_name === login && (
@@ -179,8 +300,6 @@ const ContributorProfileTab = ({
)}
- {/* */} - {isError && <>An error occured} {isLoading && ( <> diff --git a/lib/utils/copy-to-clipboard.ts b/lib/utils/copy-to-clipboard.ts new file mode 100644 index 0000000000..d009ed5dea --- /dev/null +++ b/lib/utils/copy-to-clipboard.ts @@ -0,0 +1,7 @@ +export const copyToClipboard = async (content: string) => { + try { + await navigator.clipboard.writeText(content); + } catch (error) { + console.log("This browser does not support the clipboard.", error); + } +}; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c6726d5e68..766d2109e2 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.72.0", + "version": "1.73.0-beta.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.72.0", + "version": "1.73.0-beta.5", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index 94e6172143..ebfaecd312 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-sauced/insights", "description": "πŸ•The dashboard for open source discovery.", "keywords": [], - "version": "1.72.0", + "version": "1.73.0-beta.5", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", diff --git a/pages/hub/lists/new.tsx b/pages/hub/lists/new.tsx index f34baf9b13..6012c47a0c 100644 --- a/pages/hub/lists/new.tsx +++ b/pages/hub/lists/new.tsx @@ -144,27 +144,25 @@ const CreateListPage = () => { }; return ( -
-
-
- + <section className="flex flex-col justify-center w-full py-4 xl:flex-row xl:gap-20"> + <div className="flex flex-col"> + <div className="flex flex-col gap-4 pb-6 border-b border-light-slate-8"> + <Title className="text-2xl leading-none" level={1}> Create New List - - A list is a collection of contributors that you and your team can get insights for. - + A list is a collection of contributors that you and your team can get insights for.
-
- + <div className="flex flex-col gap-4 pt-6 pb-16"> + <Title className="text-1xl leading-none" level={4}> List Name
-
- + <div className="flex flex-col gap-4 pb-16"> + <Title className="text-1xl leading-none" level={4}> Page Visibility @@ -175,7 +173,7 @@ const CreateListPage = () => {
- Make Public + Make Public {
-
- + <div className="flex flex-col gap-4 pb-6"> + <Title className="text-1xl leading-none" level={4}> Add Contributors @@ -219,10 +217,6 @@ const CreateListPage = () => {
-
-
-
- setIsModalOpen(false)}