From cd3d5b2554dfb9deec196b1551114358f84767fb Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 15 Aug 2024 06:25:39 -0400 Subject: [PATCH 1/8] fix: now see it now link on feed when logged in goes to the user's dev card (#3954) --- pages/feed/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/feed/index.tsx b/pages/feed/index.tsx index 622a0cb31f..3245af0089 100644 --- a/pages/feed/index.tsx +++ b/pages/feed/index.tsx @@ -209,7 +209,7 @@ export default function Feeds(props: HighlightSSRProps) { "Discover your open source impact with the OSCR - Open Source Contributor Rating. Visit your profile to view your personalized DevCard, showcasing your influence and impact on the open source ecosystem. Check out your OSCR DevCard and share it today!" } bannerSrc={"/assets/images/anouncement-cards/OSCR-devcard.png"} - url={`/u/${loggedInUser?.name ? loggedInUser.name + "/card" : "bdougie/card"}`} + url={`/u/${loggedInUser?.login ? loggedInUser.login + "/card" : "bdougie/card"}`} cta={"See It Now!"} /> From 365d2378ae8f2aed27e3faa0bbdb7fa6b71d0384 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 15 Aug 2024 10:40:06 +0000 Subject: [PATCH 2/8] chore(patch): release 2.56.1-beta.1 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.56.1-beta.1](https://github.com/open-sauced/app/compare/v2.56.0...v2.56.1-beta.1) (2024-08-15) ### πŸ› Bug Fixes * now see it now link on feed when logged in goes to the user's dev card ([#3954](https://github.com/open-sauced/app/issues/3954)) ([cd3d5b2](https://github.com/open-sauced/app/commit/cd3d5b2554dfb9deec196b1551114358f84767fb)) --- CHANGELOG.md | 7 +++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a47e7bfcc0..c580c6ae6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [2.56.1-beta.1](https://github.com/open-sauced/app/compare/v2.56.0...v2.56.1-beta.1) (2024-08-15) + + +### πŸ› Bug Fixes + +* now see it now link on feed when logged in goes to the user's dev card ([#3954](https://github.com/open-sauced/app/issues/3954)) ([cd3d5b2](https://github.com/open-sauced/app/commit/cd3d5b2554dfb9deec196b1551114358f84767fb)) + ## [2.56.0](https://github.com/open-sauced/app/compare/v2.55.2...v2.56.0) (2024-08-14) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index ae70b58d2f..41650d6977 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/app", - "version": "2.56.0", + "version": "2.56.1-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/app", - "version": "2.56.0", + "version": "2.56.1-beta.1", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index 603ee3a37a..e5cecbf30b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-sauced/app", "description": "πŸ•The dashboard for open source discovery.", "keywords": [], - "version": "2.56.0", + "version": "2.56.1-beta.1", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 1391aadc0629bbd2599456a7c5823a11161ab225 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 15 Aug 2024 11:00:00 -0500 Subject: [PATCH 3/8] feat: update onboarding steps to include sharing the DevCard (#3951) --- pages/start.tsx | 183 ++++++++++++++++++++++++------------------------ 1 file changed, 90 insertions(+), 93 deletions(-) diff --git a/pages/start.tsx b/pages/start.tsx index c9201b29ae..6152d94327 100644 --- a/pages/start.tsx +++ b/pages/start.tsx @@ -21,6 +21,7 @@ import Title from "components/atoms/Typography/title"; import Text from "components/atoms/Typography/text"; import Icon from "components/atoms/Icon/icon"; import Button from "components/shared/Button/button"; +import DevCard from "components/molecules/DevCard/dev-card"; import useSupabaseAuth from "lib/hooks/useSupabaseAuth"; import { setQueryParams } from "lib/utils/query-params"; @@ -28,12 +29,10 @@ import useSession from "lib/hooks/useSession"; import { captureAnalytics } from "lib/utils/analytics"; import useStore from "lib/store"; -import { getInterestOptions } from "lib/utils/getInterestOptions"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "components/atoms/Select/select"; import { timezones } from "lib/utils/timezones"; import { useFetchUser } from "lib/hooks/useFetchUser"; -import { LanguageSwitch } from "components/shared/LanguageSwitch/language-switch"; type StepKeys = "1" | "2" | "3"; @@ -66,11 +65,11 @@ const LoginStep1: React.FC = ({ user }) => { useEffect(() => { if (onboarded) { - router.push("/workspaces"); + // router.push("/workspaces"); } else if (onboarded === false && user && providerToken) { setQueryParams({ step: "2" } satisfies QueryParams); } - }, [user, onboarded, providerToken]); + }, [user, onboarded, providerToken, router]); const handleGitHubAuth = async () => { // Redirect user to GitHub to authenticate @@ -127,83 +126,10 @@ const LoginStep1: React.FC = ({ user }) => { }; interface LoginStep2Props { - handleUpdateInterests: (interests: string[]) => void; -} - -const LoginStep2: React.FC = ({ handleUpdateInterests: handleUpdateInterestsParent }) => { - const [selectedInterests, setSelectedInterests] = useState([]); - const interestArray = getInterestOptions(); - const { user } = useSupabaseAuth(); - const { data: userInfo, isLoading } = useFetchUser(user?.user_metadata.user_name); - - useEffect(() => { - if (isLoading) { - return; - } - - captureAnalytics({ - title: "User Onboarding", - property: "onboardingStep2", - value: "visited", - userInfo, - }); - }, [userInfo, isLoading]); - - const handleSelectInterest = (interest: string) => { - if (selectedInterests.length > 0 && selectedInterests.includes(interest)) { - setSelectedInterests((prev) => prev.filter((item) => item !== interest)); - } else { - setSelectedInterests((prev) => [...prev, interest]); - } - }; - - const handleUpdateInterest = async () => { - handleUpdateInterestsParent(selectedInterests); - setQueryParams({ step: "3" } satisfies QueryParams); - }; - - return ( - <> -
-
-
- - Step Two -
-
- Choose your interests -
-
- - Take a moment to select your interests to help us provide personalized project recommendations. By doing - so, you'll find projects that match your skills and aspirations. - -
-
- {interestArray.map((topic, index) => ( - handleSelectInterest(topic)} - topic={topic} - key={index} - /> - ))} -
-
- -
- - ); -}; - -interface LoginStep3Props { - interests: string[]; user: User | null; } -const LoginStep3: React.FC = ({ interests, user }) => { +const LoginStep2: React.FC = ({ user }) => { const { data: userInfo, isLoading } = useFetchUser(user?.user_metadata.user_name); useEffect(() => { @@ -213,14 +139,13 @@ const LoginStep3: React.FC = ({ interests, user }) => { captureAnalytics({ title: "User Onboarding", - property: "onboardingStep3", + property: "onboardingStep2", value: "visited", userInfo, }); }, [userInfo, isLoading]); const store = useStore(); - const router = useRouter(); const { sessionToken } = useSupabaseAuth(); const [timezone, setTimezone] = useState(""); const [loading, setLoading] = useState(false); @@ -242,12 +167,12 @@ const LoginStep3: React.FC = ({ interests, user }) => { "Content-Type": "application/json", Authorization: `Bearer ${sessionToken}`, }, - body: JSON.stringify({ interests, timezone }), + body: JSON.stringify({ interests: [], timezone }), }); if (data.ok) { store.onboardUser(); - router.push("/workspaces"); + setQueryParams({ step: "3" } satisfies QueryParams); } else { setLoading(false); // eslint-disable-next-line no-console @@ -315,6 +240,77 @@ const LoginStep3: React.FC = ({ interests, user }) => { ); }; +interface LoginStep3Props { + user: User | null; +} + +const LoginStep3: React.FC = ({ user }) => { + type UserDevStats = DbUser & DbListContributorStat; + const username: string = user?.user_metadata.user_name; + const router = useRouter(); + const [userDevStats, setUserDevStats] = useState(undefined); + + async function fetchUserData(username: string) { + const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/users/${username}/devstats`, { + headers: { + "Content-Type": "application/json", + }, + }); + + if (response.ok) { + return (await response.json()) as UserDevStats; + } + + return undefined; + } + + useEffect(() => { + fetchUserData(username).then((devstats) => { + setUserDevStats(devstats); + }); + }, []); + + return ( + <> +
+
+
+ + Congrats! +
+
+ Share Your DevCard! +
+
+ + Congratulations on your new account. Share your creator card to let other people know you're here. + +
+
+ {userDevStats && } +
+ + + + +
+
+ + ); +}; + const Login: WithPageLayout = () => { type LoginSteps = number; @@ -328,8 +324,6 @@ const Login: WithPageLayout = () => { const [currentLoginStep, setCurrentLoginStep] = useState(Number(step) || 1); - const [interests, setInterests] = useState([]); - useEffect(() => { if (step) { setCurrentLoginStep(Number(step)); @@ -364,24 +358,27 @@ const Login: WithPageLayout = () => { - - Choose your interests + + What time is it?
{ disabled={currentLoginStep !== 3} className={`!text-[16px] ${currentLoginStep === 3 && highlighted}`} > - What time is it? + Share Your DevCard!
{currentLoginStep === 1 && } - {currentLoginStep === 2 && setInterests(interests)} />} - {currentLoginStep >= 3 && } + {currentLoginStep === 2 && } + {currentLoginStep >= 3 && }
From 7828b52cb1fac723d1fe5224c2d76aef78a71018 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 15 Aug 2024 16:14:31 +0000 Subject: [PATCH 4/8] chore(minor): release 2.57.0-beta.1 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.57.0-beta.1](https://github.com/open-sauced/app/compare/v2.56.1-beta.1...v2.57.0-beta.1) (2024-08-15) ### πŸ• Features * update onboarding steps to include sharing the DevCard ([#3951](https://github.com/open-sauced/app/issues/3951)) ([1391aad](https://github.com/open-sauced/app/commit/1391aadc0629bbd2599456a7c5823a11161ab225)) --- CHANGELOG.md | 7 +++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c580c6ae6e..22e200764e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [2.57.0-beta.1](https://github.com/open-sauced/app/compare/v2.56.1-beta.1...v2.57.0-beta.1) (2024-08-15) + + +### πŸ• Features + +* update onboarding steps to include sharing the DevCard ([#3951](https://github.com/open-sauced/app/issues/3951)) ([1391aad](https://github.com/open-sauced/app/commit/1391aadc0629bbd2599456a7c5823a11161ab225)) + ## [2.56.1-beta.1](https://github.com/open-sauced/app/compare/v2.56.0...v2.56.1-beta.1) (2024-08-15) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 41650d6977..f40ce94db4 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/app", - "version": "2.56.1-beta.1", + "version": "2.57.0-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/app", - "version": "2.56.1-beta.1", + "version": "2.57.0-beta.1", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index e5cecbf30b..a1ab7b4ae0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-sauced/app", "description": "πŸ•The dashboard for open source discovery.", "keywords": [], - "version": "2.56.1-beta.1", + "version": "2.57.0-beta.1", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 7f94272ccd1a7b073137bc221647f6154d2b24a8 Mon Sep 17 00:00:00 2001 From: Dunsin <78784850+Dun-sin@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:44:53 +0100 Subject: [PATCH 5/8] fix: add loading feedback when creating contributor insight (#3947) Co-authored-by: Nick Taylor --- .../[workspaceId]/contributor-insights/[listId]/edit.tsx | 2 ++ pages/workspaces/[workspaceId]/contributor-insights/new.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pages/workspaces/[workspaceId]/contributor-insights/[listId]/edit.tsx b/pages/workspaces/[workspaceId]/contributor-insights/[listId]/edit.tsx index 5ab2f86731..b0cc5d3b74 100644 --- a/pages/workspaces/[workspaceId]/contributor-insights/[listId]/edit.tsx +++ b/pages/workspaces/[workspaceId]/contributor-insights/[listId]/edit.tsx @@ -150,6 +150,8 @@ export default function ContributorInsightEditPage({ className="flex gap-2.5 items-center cursor-pointer w-min sm:mt-0 self-end" disabled={loading} onClick={updateInsight} + loading={loading} + loadingText={"Updating insight"} > Update Insight diff --git a/pages/workspaces/[workspaceId]/contributor-insights/new.tsx b/pages/workspaces/[workspaceId]/contributor-insights/new.tsx index b80cce3a79..71c1536f3e 100644 --- a/pages/workspaces/[workspaceId]/contributor-insights/new.tsx +++ b/pages/workspaces/[workspaceId]/contributor-insights/new.tsx @@ -147,6 +147,8 @@ export default function CreateContributorInsightPage({ variant="primary" className="flex gap-2.5 items-center cursor-pointer w-min mt-2 sm:mt-0 self-end" disabled={loading} + loading={loading} + loadingText={"Creating insight"} > Create Insight From 7220216561ceb9f5c388e83735ad15897afaf0ef Mon Sep 17 00:00:00 2001 From: Dunsin <78784850+Dun-sin@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:57:58 +0000 Subject: [PATCH 6/8] chore(patch): release 2.57.0-beta.2 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.57.0-beta.2](https://github.com/open-sauced/app/compare/v2.57.0-beta.1...v2.57.0-beta.2) (2024-08-15) ### πŸ› Bug Fixes * add loading feedback when creating contributor insight ([#3947](https://github.com/open-sauced/app/issues/3947)) ([7f94272](https://github.com/open-sauced/app/commit/7f94272ccd1a7b073137bc221647f6154d2b24a8)) --- CHANGELOG.md | 7 +++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22e200764e..d95735f04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [2.57.0-beta.2](https://github.com/open-sauced/app/compare/v2.57.0-beta.1...v2.57.0-beta.2) (2024-08-15) + + +### πŸ› Bug Fixes + +* add loading feedback when creating contributor insight ([#3947](https://github.com/open-sauced/app/issues/3947)) ([7f94272](https://github.com/open-sauced/app/commit/7f94272ccd1a7b073137bc221647f6154d2b24a8)) + ## [2.57.0-beta.1](https://github.com/open-sauced/app/compare/v2.56.1-beta.1...v2.57.0-beta.1) (2024-08-15) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index f40ce94db4..e63d24949a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/app", - "version": "2.57.0-beta.1", + "version": "2.57.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/app", - "version": "2.57.0-beta.1", + "version": "2.57.0-beta.2", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index a1ab7b4ae0..a366143d0a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-sauced/app", "description": "πŸ•The dashboard for open source discovery.", "keywords": [], - "version": "2.57.0-beta.1", + "version": "2.57.0-beta.2", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 58360d9e85f0c9118e1734b8d7275fd066462639 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 15 Aug 2024 14:17:45 -0500 Subject: [PATCH 7/8] fix: add docs link for SBOM to repository page (#3958) --- pages/s/[org]/[repo]/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/s/[org]/[repo]/index.tsx b/pages/s/[org]/[repo]/index.tsx index 74b00afe2d..fbe3483473 100644 --- a/pages/s/[org]/[repo]/index.tsx +++ b/pages/s/[org]/[repo]/index.tsx @@ -262,7 +262,11 @@ export default function RepoPage({ repoData, ogImageUrl }: RepoPageProps) {

Create a workspace from the software bill of materials (SBOM) for this repository

- + Learn more... about SBOM
From 6c5988fe730cf3fc67f889f8d3ed209fc4a84568 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 15 Aug 2024 19:32:21 +0000 Subject: [PATCH 8/8] chore(patch): release 2.57.0-beta.3 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.57.0-beta.3](https://github.com/open-sauced/app/compare/v2.57.0-beta.2...v2.57.0-beta.3) (2024-08-15) ### πŸ› Bug Fixes * add docs link for SBOM to repository page ([#3958](https://github.com/open-sauced/app/issues/3958)) ([58360d9](https://github.com/open-sauced/app/commit/58360d9e85f0c9118e1734b8d7275fd066462639)) --- CHANGELOG.md | 7 +++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d95735f04b..1d5f172c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [2.57.0-beta.3](https://github.com/open-sauced/app/compare/v2.57.0-beta.2...v2.57.0-beta.3) (2024-08-15) + + +### πŸ› Bug Fixes + +* add docs link for SBOM to repository page ([#3958](https://github.com/open-sauced/app/issues/3958)) ([58360d9](https://github.com/open-sauced/app/commit/58360d9e85f0c9118e1734b8d7275fd066462639)) + ## [2.57.0-beta.2](https://github.com/open-sauced/app/compare/v2.57.0-beta.1...v2.57.0-beta.2) (2024-08-15) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e63d24949a..22f9cee349 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/app", - "version": "2.57.0-beta.2", + "version": "2.57.0-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/app", - "version": "2.57.0-beta.2", + "version": "2.57.0-beta.3", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index a366143d0a..50f0fca06b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-sauced/app", "description": "πŸ•The dashboard for open source discovery.", "keywords": [], - "version": "2.57.0-beta.2", + "version": "2.57.0-beta.3", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0",