From c6ffb4a096374bb2c96d687768ff002708a38eb0 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Wed, 11 Oct 2023 14:58:26 -0400 Subject: [PATCH 01/60] fix: now treemap on list activity page appears on small screens --- .../molecules/ContributionsTreemap/contributions-treemap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/molecules/ContributionsTreemap/contributions-treemap.tsx b/components/molecules/ContributionsTreemap/contributions-treemap.tsx index e0e9e4e0de..186434fe21 100644 --- a/components/molecules/ContributionsTreemap/contributions-treemap.tsx +++ b/components/molecules/ContributionsTreemap/contributions-treemap.tsx @@ -45,7 +45,7 @@ export const ContributionsTreemap = ({ setRepoId, repoId, data, color, onClick } Contributors
-
+
Date: Wed, 11 Oct 2023 21:24:06 +0200 Subject: [PATCH 02/60] feat: Add OS detection hook and update search dialog (#1760) --- .../organisms/SearchDialog/search-dialog.tsx | 9 ++++++--- lib/hooks/useIsMacOS.ts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 lib/hooks/useIsMacOS.ts diff --git a/components/organisms/SearchDialog/search-dialog.tsx b/components/organisms/SearchDialog/search-dialog.tsx index 41dc6f95ce..dea81f7187 100644 --- a/components/organisms/SearchDialog/search-dialog.tsx +++ b/components/organisms/SearchDialog/search-dialog.tsx @@ -12,6 +12,7 @@ import useLockBody from "lib/hooks/useLockBody"; import { getAvatarByUsername } from "lib/utils/github"; import { searchUsers } from "lib/hooks/search-users"; import useDebounceTerm from "lib/hooks/useDebounceTerm"; +import useIsMacOS from "lib/hooks/useIsMacOS"; const SearchDialog = () => { useLockBody(); @@ -23,6 +24,7 @@ const SearchDialog = () => { const setOpenSearch = store((state) => state.setOpenSearch); const debouncedSearchTerm = useDebounceTerm(searchTerm, 300); const [searchResult, setSearchResult] = useState<{ data: DbUserSearch[]; meta: {} }>(); + const isMac = useIsMacOS(); useEffect(() => { document.addEventListener("keydown", handleCloseSearch); @@ -94,7 +96,7 @@ const SearchDialog = () => { onKeyDown={handleKeyboardCtrl} /> - ⌘K + {isMac ? "⌘K" : CTRL+K}
@@ -115,6 +117,7 @@ const SearchDialog = () => { const SearchDialogTrigger = () => { const setOpenSearch = store((state) => state.setOpenSearch); + const isMac = useIsMacOS(); useEffect(() => { document.addEventListener("keydown", handleOpenSearch); @@ -130,7 +133,7 @@ const SearchDialogTrigger = () => { return ( <>
setOpenSearch(true)} >
@@ -138,7 +141,7 @@ const SearchDialogTrigger = () => { Search for users
- ⌘K + {isMac ? "⌘K" : CTRL+K}
setOpenSearch(true)}> diff --git a/lib/hooks/useIsMacOS.ts b/lib/hooks/useIsMacOS.ts new file mode 100644 index 0000000000..cbff85138d --- /dev/null +++ b/lib/hooks/useIsMacOS.ts @@ -0,0 +1,16 @@ +import { useEffect, useState } from "react"; + +const MACOS_USER_AGENT_PART = /Mac|Macintosh|MacIntel|Mac OS X/; + +function useIsMacOS(): boolean { + const [isMac, setIsMac] = useState(false); + + useEffect(() => { + const userAgentCheck = MACOS_USER_AGENT_PART.test(window.navigator.userAgent); + setIsMac(userAgentCheck); + }, []); + + return isMac; +} + +export default useIsMacOS; From 4bde212eef5ea07b76b4e25b37eb73e7d381d03b Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Wed, 11 Oct 2023 14:33:06 -0500 Subject: [PATCH 03/60] fix: add check for listId to hooks (#1869) --- lib/hooks/api/useContributionsByProject.ts | 2 +- lib/hooks/api/useContributorList.ts | 2 +- lib/hooks/api/useContributorsByProject.ts | 2 +- lib/hooks/api/useMostActiveContributors.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/hooks/api/useContributionsByProject.ts b/lib/hooks/api/useContributionsByProject.ts index bc44b9f62d..e43fcaa525 100644 --- a/lib/hooks/api/useContributionsByProject.ts +++ b/lib/hooks/api/useContributionsByProject.ts @@ -11,7 +11,7 @@ export const useContributionsByProject = ({ initialData?: DbProjectContributions[]; }) => { const { data, error } = useSWR( - `lists/${listId}/stats/contributions-by-project?range=${range}`, + listId ? `lists/${listId}/stats/contributions-by-project?range=${range}` : null, publicApiFetcher as Fetcher // { // fallbackData: { diff --git a/lib/hooks/api/useContributorList.ts b/lib/hooks/api/useContributorList.ts index cfb46e45f3..24144ce99d 100644 --- a/lib/hooks/api/useContributorList.ts +++ b/lib/hooks/api/useContributorList.ts @@ -42,7 +42,7 @@ export const useContributorsList = ({ query.append("range", range.toString()); const { data, error, mutate } = useSWR( - `lists/${listId}/contributors?${query}`, + listId ? `lists/${listId}/contributors?${query}` : null, publicApiFetcher as Fetcher, Error>, { fallbackData: initialData, diff --git a/lib/hooks/api/useContributorsByProject.ts b/lib/hooks/api/useContributorsByProject.ts index 18677a0214..b7883ced0f 100644 --- a/lib/hooks/api/useContributorsByProject.ts +++ b/lib/hooks/api/useContributorsByProject.ts @@ -5,7 +5,7 @@ import publicApiFetcher from "lib/utils/public-api-fetcher"; export const useContributorsByProject = (listId: string, range: number) => { const [repoId, setRepoId] = useState(null); const { data, error } = useSWR( - `lists/${listId}/stats/top-project-contributions-by-contributor?repo_id=${repoId}&range=${range}`, + listId ? `lists/${listId}/stats/top-project-contributions-by-contributor?repo_id=${repoId}&range=${range}` : null, publicApiFetcher as Fetcher ); diff --git a/lib/hooks/api/useMostActiveContributors.ts b/lib/hooks/api/useMostActiveContributors.ts index d3f998e407..dc276aef02 100644 --- a/lib/hooks/api/useMostActiveContributors.ts +++ b/lib/hooks/api/useMostActiveContributors.ts @@ -43,7 +43,7 @@ const useMostActiveContributors = ({ const apiEndpoint = `lists/${listId}/stats/most-active-contributors?${query.toString()}`; const { data, error, mutate } = useSWR( - apiEndpoint, + listId ? apiEndpoint : null, publicApiFetcher as Fetcher ); From ea475fc9c04fcabcbf2c78605d459d00386252d6 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Wed, 11 Oct 2023 19:40:11 +0000 Subject: [PATCH 04/60] chore(minor): release 1.71.0-beta.1 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.71.0-beta.1](https://github.com/open-sauced/insights/compare/v1.70.0...v1.71.0-beta.1) (2023-10-11) ### πŸ• Features * Add OS detection hook and update search dialog ([#1760](https://github.com/open-sauced/insights/issues/1760)) ([585a2aa](https://github.com/open-sauced/insights/commit/585a2aa0b3591a82800781804d7f77234b6860fa)) ### πŸ› Bug Fixes * add check for listId to hooks ([#1869](https://github.com/open-sauced/insights/issues/1869)) ([4bde212](https://github.com/open-sauced/insights/commit/4bde212eef5ea07b76b4e25b37eb73e7d381d03b)) * now treemap on list activity page appears on small screens ([c6ffb4a](https://github.com/open-sauced/insights/commit/c6ffb4a096374bb2c96d687768ff002708a38eb0)) * now treemap on list activity page appears on small screens ([#1873](https://github.com/open-sauced/insights/issues/1873)) ([92f9790](https://github.com/open-sauced/insights/commit/92f97907b82941e6942f35971cba4a0e55ec4906)) --- CHANGELOG.md | 14 ++++++++++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f0c0c96e..83a9e2a533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ > All notable changes to this project will be documented in this file +## [1.71.0-beta.1](https://github.com/open-sauced/insights/compare/v1.70.0...v1.71.0-beta.1) (2023-10-11) + + +### πŸ• Features + +* Add OS detection hook and update search dialog ([#1760](https://github.com/open-sauced/insights/issues/1760)) ([585a2aa](https://github.com/open-sauced/insights/commit/585a2aa0b3591a82800781804d7f77234b6860fa)) + + +### πŸ› Bug Fixes + +* add check for listId to hooks ([#1869](https://github.com/open-sauced/insights/issues/1869)) ([4bde212](https://github.com/open-sauced/insights/commit/4bde212eef5ea07b76b4e25b37eb73e7d381d03b)) +* now treemap on list activity page appears on small screens ([c6ffb4a](https://github.com/open-sauced/insights/commit/c6ffb4a096374bb2c96d687768ff002708a38eb0)) +* now treemap on list activity page appears on small screens ([#1873](https://github.com/open-sauced/insights/issues/1873)) ([92f9790](https://github.com/open-sauced/insights/commit/92f97907b82941e6942f35971cba4a0e55ec4906)) + ## [1.70.0](https://github.com/open-sauced/insights/compare/v1.69.0...v1.70.0) (2023-10-11) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index dc93c7704b..7d5d4e2a78 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.70.0", + "version": "1.71.0-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.70.0", + "version": "1.71.0-beta.1", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index dc29e71e87..e7c866d491 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.70.0", + "version": "1.71.0-beta.1", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 397570d0c3c27be0d505f0c5820b48c74ac29bbf Mon Sep 17 00:00:00 2001 From: Shraddha Date: Thu, 12 Oct 2023 09:07:07 -0400 Subject: [PATCH 05/60] fix: reset input state of delete list dialog box after closing the dialog and deleting the list (#1877) --- pages/hub/lists/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/hub/lists/index.tsx b/pages/hub/lists/index.tsx index da159f6084..f5c2b3fa62 100644 --- a/pages/hub/lists/index.tsx +++ b/pages/hub/lists/index.tsx @@ -38,6 +38,7 @@ const ListsHub: WithPageLayout = () => { const handleOnClose = () => { setIsDeleteOpen(false); + setText(""); }; const handleOnConfirm = async () => { @@ -62,6 +63,7 @@ const ListsHub: WithPageLayout = () => { toast({ description: "An error occurred while deleting the list", variant: "danger" }); } finally { setDeleteLoading(false); + setText(""); } }; From ad08c167be1b980280d8d9b34bbdd770b30298fc Mon Sep 17 00:00:00 2001 From: Shraddha Date: Thu, 12 Oct 2023 09:07:47 -0400 Subject: [PATCH 06/60] fix: Fix CSS inconsistency in Contributor Highlights for "Home" and "Following" tabs for `/feed` route (#1783) --- .../contributor-highlight-card.tsx | 2 +- .../following-highlight-wrapper.tsx | 2 +- .../HomeHighlightsWrapper/home-highlights-wrapper.tsx | 2 +- pages/feed/index.tsx | 2 +- tailwind.config.js | 10 +++++++--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/components/molecules/ContributorHighlight/contributor-highlight-card.tsx b/components/molecules/ContributorHighlight/contributor-highlight-card.tsx index f97f5eac61..025da2aa56 100644 --- a/components/molecules/ContributorHighlight/contributor-highlight-card.tsx +++ b/components/molecules/ContributorHighlight/contributor-highlight-card.tsx @@ -435,7 +435,7 @@ const ContributorHighlightCard = ({ }, []); return ( -
+
{icon} diff --git a/components/organisms/FollowersHighlightWrapper/following-highlight-wrapper.tsx b/components/organisms/FollowersHighlightWrapper/following-highlight-wrapper.tsx index 30365bdb63..101215045e 100644 --- a/components/organisms/FollowersHighlightWrapper/following-highlight-wrapper.tsx +++ b/components/organisms/FollowersHighlightWrapper/following-highlight-wrapper.tsx @@ -58,7 +58,7 @@ const FollowingHighlightWrapper = ({ emojis, selectedFilter }: HighlightWrapperP
-
+
-
+
= (props: HighlightSSRProps) => { )} - + @media (min-width: 425px) { ... } + ...defaultTheme.screens, + }, extend: { gridTemplateColumns: { autodesktop: "repeat(auto-fit, minmax(410px, 1fr))", automobile: "repeat(auto-fit, minmax(300px, 1fr))", }, screens: { - xs: "425px", - // => @media (min-width: 425px) { ... } - "2xl": "1440px", // => @media (min-width: 1440px) { ... } }, From e41f092254215e77201c085d92e0e05722dda1b4 Mon Sep 17 00:00:00 2001 From: Shraddha Date: Thu, 12 Oct 2023 13:15:21 +0000 Subject: [PATCH 07/60] chore(patch): release 1.71.0-beta.2 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.71.0-beta.2](https://github.com/open-sauced/insights/compare/v1.71.0-beta.1...v1.71.0-beta.2) (2023-10-12) ### πŸ› Bug Fixes * Fix CSS inconsistency in Contributor Highlights for "Home" and "Following" tabs for `/feed` route ([#1783](https://github.com/open-sauced/insights/issues/1783)) ([ad08c16](https://github.com/open-sauced/insights/commit/ad08c167be1b980280d8d9b34bbdd770b30298fc)) * reset input state of delete list dialog box after closing the dialog and deleting the list ([#1877](https://github.com/open-sauced/insights/issues/1877)) ([397570d](https://github.com/open-sauced/insights/commit/397570d0c3c27be0d505f0c5820b48c74ac29bbf)) --- CHANGELOG.md | 8 ++++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83a9e2a533..605683a6b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ > All notable changes to this project will be documented in this file +## [1.71.0-beta.2](https://github.com/open-sauced/insights/compare/v1.71.0-beta.1...v1.71.0-beta.2) (2023-10-12) + + +### πŸ› Bug Fixes + +* Fix CSS inconsistency in Contributor Highlights for "Home" and "Following" tabs for `/feed` route ([#1783](https://github.com/open-sauced/insights/issues/1783)) ([ad08c16](https://github.com/open-sauced/insights/commit/ad08c167be1b980280d8d9b34bbdd770b30298fc)) +* reset input state of delete list dialog box after closing the dialog and deleting the list ([#1877](https://github.com/open-sauced/insights/issues/1877)) ([397570d](https://github.com/open-sauced/insights/commit/397570d0c3c27be0d505f0c5820b48c74ac29bbf)) + ## [1.71.0-beta.1](https://github.com/open-sauced/insights/compare/v1.70.0...v1.71.0-beta.1) (2023-10-11) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 7d5d4e2a78..945f2c35bd 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.71.0-beta.1", + "version": "1.71.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.71.0-beta.1", + "version": "1.71.0-beta.2", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index e7c866d491..9b9e8638ec 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.71.0-beta.1", + "version": "1.71.0-beta.2", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 9d97030467422601cad6905007b16ef5f8b04ec9 Mon Sep 17 00:00:00 2001 From: Rita Nkem Daniel Date: Thu, 12 Oct 2023 15:00:17 +0100 Subject: [PATCH 08/60] fix: adjust style for newsletter form so that it adjusts for smaller screens (#1782) --- components/atoms/TextInput/text-input.tsx | 2 +- .../molecules/NewsletterForm/newsletter-form.tsx | 9 +++++---- styles/globals.css | 13 +++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/components/atoms/TextInput/text-input.tsx b/components/atoms/TextInput/text-input.tsx index eba6999d3e..23a7ecb4a8 100644 --- a/components/atoms/TextInput/text-input.tsx +++ b/components/atoms/TextInput/text-input.tsx @@ -61,7 +61,7 @@ const TextInput = ({ id={id || name || ""} placeholder={placeholder || ""} className={clsx( - "flex-1 focus:outline-none placeholder:font-normal placeholder-slate-400", + "w-full focus:outline-none placeholder:font-normal placeholder-slate-400", disabled && "bg-light-slate-3 cursor-not-allowed text-light-slate-9" )} disabled={disabled} diff --git a/components/molecules/NewsletterForm/newsletter-form.tsx b/components/molecules/NewsletterForm/newsletter-form.tsx index e0fdb70613..c517e46a71 100644 --- a/components/molecules/NewsletterForm/newsletter-form.tsx +++ b/components/molecules/NewsletterForm/newsletter-form.tsx @@ -65,7 +65,7 @@ const NewsletterForm = () => {
) : ( -
+

Subscribe to our newsletter

@@ -86,12 +86,12 @@ const NewsletterForm = () => {

-
+
handleChange(value)} state={isValidEmail ? "valid" : "invalid"} value={email} - className="w-full text-sm focus:outline-none" + className="text-sm focus:outline-none" type="text" name="email" placeholder="Email" @@ -99,7 +99,7 @@ const NewsletterForm = () => {
+ {errorMsg && (

setErrorMsg("")} className="text-sm cursor-pointer" /> {errorMsg} diff --git a/styles/globals.css b/styles/globals.css index 68480a9ddf..4032ecd8a7 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -95,6 +95,19 @@ div[role="dialog"]::-webkit-scrollbar-thumb { --swiper-pagination-bullet-size: 8px; } +.newsletter-wrap { + container: newsletterWrap / inline-size; +} + +@container newsletterWrap (max-width: 240px) { + .form-wrap { + flex-wrap: wrap; + } + .form-wrap button { + width: 100%; + } +} + .loading { animation-duration: 1.25s; animation-fill-mode: forwards; From c8c5ffc889eb16e8f752f7f1fda097273a7b330d Mon Sep 17 00:00:00 2001 From: Rita Nkem Daniel Date: Thu, 12 Oct 2023 14:09:20 +0000 Subject: [PATCH 09/60] chore(patch): release 1.71.0-beta.3 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.71.0-beta.3](https://github.com/open-sauced/insights/compare/v1.71.0-beta.2...v1.71.0-beta.3) (2023-10-12) ### πŸ› Bug Fixes * adjust style for newsletter form so that it adjusts for smaller screens ([#1782](https://github.com/open-sauced/insights/issues/1782)) ([9d97030](https://github.com/open-sauced/insights/commit/9d97030467422601cad6905007b16ef5f8b04ec9)) --- 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 605683a6b3..cd09ae0534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [1.71.0-beta.3](https://github.com/open-sauced/insights/compare/v1.71.0-beta.2...v1.71.0-beta.3) (2023-10-12) + + +### πŸ› Bug Fixes + +* adjust style for newsletter form so that it adjusts for smaller screens ([#1782](https://github.com/open-sauced/insights/issues/1782)) ([9d97030](https://github.com/open-sauced/insights/commit/9d97030467422601cad6905007b16ef5f8b04ec9)) + ## [1.71.0-beta.2](https://github.com/open-sauced/insights/compare/v1.71.0-beta.1...v1.71.0-beta.2) (2023-10-12) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 945f2c35bd..87246f1f6c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.71.0-beta.2", + "version": "1.71.0-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.71.0-beta.2", + "version": "1.71.0-beta.3", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index 9b9e8638ec..3a359f684c 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.71.0-beta.2", + "version": "1.71.0-beta.3", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 00a77bebd5121a45cdcb4d890e0a57c4f727d7ba Mon Sep 17 00:00:00 2001 From: Aryan Singh Date: Sun, 15 Oct 2023 20:40:21 +0530 Subject: [PATCH 10/60] fix: can't update user profile bio passed 256 chars --- .../organisms/UserSettingsPage/user-settings-page.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/organisms/UserSettingsPage/user-settings-page.tsx b/components/organisms/UserSettingsPage/user-settings-page.tsx index 26d7fd8eac..9a02fe4503 100644 --- a/components/organisms/UserSettingsPage/user-settings-page.tsx +++ b/components/organisms/UserSettingsPage/user-settings-page.tsx @@ -51,6 +51,7 @@ const UserSettingsPage = ({ user }: userSettingsPageProps) => { const [timezone, setTimezone] = useState(""); const [userInfo, setUserInfo] = useState(); const [email, setEmail] = useState(""); + const [bio, setBio] = useState(""); const [emailPreference, setEmailPreference] = useState({ // eslint-disable-next-line camelcase display_email: false, @@ -71,7 +72,8 @@ const UserSettingsPage = ({ user }: userSettingsPageProps) => { setEmail(response.email); setDisplayLocalTime(response.display_local_time); setCoupon(response.coupon_code); - formRef.current!.bio.value = response.bio; + //formRef.current!.bio.value = response.bio; + setBio(response.bio); formRef.current!.url.value = response.url; formRef.current!.twitter_username.value = response.twitter_username; formRef.current!.company.value = response.company; @@ -162,7 +164,7 @@ const UserSettingsPage = ({ user }: userSettingsPageProps) => { const payload: UpdateUserPayload = { name: formRef.current!.nameInput.value, email, - bio: formRef.current!.bio.value, + bio: bio, // eslint-disable-next-line camelcase twitter_username: formRef.current!.twitter_username.value, company: formRef.current!.company.value, @@ -223,11 +225,15 @@ const UserSettingsPage = ({ user }: userSettingsPageProps) => {

+
{bio?.length}/255
Date: Mon, 16 Oct 2023 07:20:46 -0500 Subject: [PATCH 11/60] fix: Unnecesary X-Scrollbar in tablist (#1881) --- components/TabList/tab-list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/TabList/tab-list.tsx b/components/TabList/tab-list.tsx index 779b6b5a90..8ea94462be 100644 --- a/components/TabList/tab-list.tsx +++ b/components/TabList/tab-list.tsx @@ -20,7 +20,7 @@ const TabList: React.FC = ({ tabList, pageId, selectedTab }) => { aria-orientation="horizontal" aria-label="Browse the tools" tabIndex={0} - className="tool-list-nav flex w-full overflow-x-auto overflow-y-hidden gap-2 px-4 md:px-16 bg-light-slate-3 border-b pt-3" + className="tool-list-nav flex w-full overflow-x-auto overflow-y-hidden gap-2 px-4 bg-light-slate-3 border-b pt-3" > {tabList.map((tab, index) => (
Date: Mon, 16 Oct 2023 12:28:47 +0000 Subject: [PATCH 12/60] chore(patch): release 1.71.0-beta.4 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.71.0-beta.4](https://github.com/open-sauced/insights/compare/v1.71.0-beta.3...v1.71.0-beta.4) (2023-10-16) ### πŸ› Bug Fixes * Unnecesary X-Scrollbar in tablist ([#1881](https://github.com/open-sauced/insights/issues/1881)) ([9d72aeb](https://github.com/open-sauced/insights/commit/9d72aeb6fcbc37028fa4ace308b077724fb26417)) --- 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 cd09ae0534..63ebfab412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ > All notable changes to this project will be documented in this file +## [1.71.0-beta.4](https://github.com/open-sauced/insights/compare/v1.71.0-beta.3...v1.71.0-beta.4) (2023-10-16) + + +### πŸ› Bug Fixes + +* Unnecesary X-Scrollbar in tablist ([#1881](https://github.com/open-sauced/insights/issues/1881)) ([9d72aeb](https://github.com/open-sauced/insights/commit/9d72aeb6fcbc37028fa4ace308b077724fb26417)) + ## [1.71.0-beta.3](https://github.com/open-sauced/insights/compare/v1.71.0-beta.2...v1.71.0-beta.3) (2023-10-12) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 87246f1f6c..73dfda581b 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.71.0-beta.3", + "version": "1.71.0-beta.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.71.0-beta.3", + "version": "1.71.0-beta.4", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index 3a359f684c..f4e9eb41c5 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.71.0-beta.3", + "version": "1.71.0-beta.4", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From 346adff07d85b2c155c969e468ffb62cbe84ecbe Mon Sep 17 00:00:00 2001 From: Rita Nkem Daniel Date: Mon, 16 Oct 2023 14:11:46 +0100 Subject: [PATCH 13/60] feat: add keyboard binding for posting a highlight (#1894) --- .../molecules/HighlightInput/highlight-input-form.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/molecules/HighlightInput/highlight-input-form.tsx b/components/molecules/HighlightInput/highlight-input-form.tsx index 772457a7d3..8ce75e0692 100644 --- a/components/molecules/HighlightInput/highlight-input-form.tsx +++ b/components/molecules/HighlightInput/highlight-input-form.tsx @@ -385,7 +385,9 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E }; // Handle submit highlights - const handlePostHighlight = async (e: React.FormEvent) => { + const handlePostHighlight = async ( + e: React.FormEvent | React.KeyboardEvent + ) => { e.preventDefault(); const highlight = bodyText; @@ -520,6 +522,11 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E }`} defaultRow={4} value={bodyText} + onKeyUp={(e) => { + if (e.ctrlKey && e.key === "Enter") { + handlePostHighlight(e); + } + }} placeholder={`Tell us about your highlight and add a link `} typewrite={isTyping} From d89d94bd28845693eaee30c980a41bb9a72e3d60 Mon Sep 17 00:00:00 2001 From: Ashutosh Rath Date: Mon, 16 Oct 2023 18:44:03 +0530 Subject: [PATCH 14/60] fix: add target for the highlight link (#1897) --- .../ContributorHighlight/contributor-highlight-card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/molecules/ContributorHighlight/contributor-highlight-card.tsx b/components/molecules/ContributorHighlight/contributor-highlight-card.tsx index 025da2aa56..c478b1a67f 100644 --- a/components/molecules/ContributorHighlight/contributor-highlight-card.tsx +++ b/components/molecules/ContributorHighlight/contributor-highlight-card.tsx @@ -555,7 +555,7 @@ const ContributorHighlightCard = ({ {/* Highlight Link section */} From e641223467b3b71856aeb4282d9c87dfdd352ea8 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 16 Oct 2023 08:14:34 -0500 Subject: [PATCH 15/60] fix: attempt to clear any present service workers (#1889) --- pages/_app.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pages/_app.tsx b/pages/_app.tsx index 4a3827e9dd..a6cf64b939 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -26,6 +26,19 @@ import PrivateWrapper from "layouts/private-wrapper"; import type { AppProps } from "next/app"; +// Clear any service workers present +if (typeof window !== "undefined" && "serviceWorker" in navigator) { + navigator.serviceWorker.getRegistrations().then(function (registrations) { + for (let registration of registrations) { + if (registration.active) { + console.log(`Clearing service worker ${registration.scope}`); + registration.unregister(); + document.location.reload(); + } + } + }); +} + // Check that PostHog is client-side (used to handle Next.js SSR) if (typeof window !== "undefined") { posthog.init(process.env.NEXT_PUBLIC_POSTHOG_ID || "", { From 1de9e9cb167e8a01edf0ca89042fe43b5cb37cf1 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 16 Oct 2023 13:21:57 +0000 Subject: [PATCH 16/60] chore(minor): release 1.71.0-beta.5 on beta channel [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.71.0-beta.5](https://github.com/open-sauced/insights/compare/v1.71.0-beta.4...v1.71.0-beta.5) (2023-10-16) ### πŸ• Features * add keyboard binding for posting a highlight ([#1894](https://github.com/open-sauced/insights/issues/1894)) ([346adff](https://github.com/open-sauced/insights/commit/346adff07d85b2c155c969e468ffb62cbe84ecbe)) ### πŸ› Bug Fixes * add target for the highlight link ([#1897](https://github.com/open-sauced/insights/issues/1897)) ([d89d94b](https://github.com/open-sauced/insights/commit/d89d94bd28845693eaee30c980a41bb9a72e3d60)) * attempt to clear any present service workers ([#1889](https://github.com/open-sauced/insights/issues/1889)) ([e641223](https://github.com/open-sauced/insights/commit/e641223467b3b71856aeb4282d9c87dfdd352ea8)) --- CHANGELOG.md | 13 +++++++++++++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63ebfab412..64c5251efc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ > All notable changes to this project will be documented in this file +## [1.71.0-beta.5](https://github.com/open-sauced/insights/compare/v1.71.0-beta.4...v1.71.0-beta.5) (2023-10-16) + + +### πŸ• Features + +* add keyboard binding for posting a highlight ([#1894](https://github.com/open-sauced/insights/issues/1894)) ([346adff](https://github.com/open-sauced/insights/commit/346adff07d85b2c155c969e468ffb62cbe84ecbe)) + + +### πŸ› Bug Fixes + +* add target for the highlight link ([#1897](https://github.com/open-sauced/insights/issues/1897)) ([d89d94b](https://github.com/open-sauced/insights/commit/d89d94bd28845693eaee30c980a41bb9a72e3d60)) +* attempt to clear any present service workers ([#1889](https://github.com/open-sauced/insights/issues/1889)) ([e641223](https://github.com/open-sauced/insights/commit/e641223467b3b71856aeb4282d9c87dfdd352ea8)) + ## [1.71.0-beta.4](https://github.com/open-sauced/insights/compare/v1.71.0-beta.3...v1.71.0-beta.4) (2023-10-16) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 73dfda581b..d424400d81 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@open-sauced/insights", - "version": "1.71.0-beta.4", + "version": "1.71.0-beta.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@open-sauced/insights", - "version": "1.71.0-beta.4", + "version": "1.71.0-beta.5", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index f4e9eb41c5..ec541e7095 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.71.0-beta.4", + "version": "1.71.0-beta.5", "author": "Brian Douglas ", "private": true, "license": "Apache 2.0", From faf54bd609aac61a76dc3767aa65b14ece25cac0 Mon Sep 17 00:00:00 2001 From: Roland Joshua <289volts@gmail.com> Date: Mon, 16 Oct 2023 14:58:55 +0100 Subject: [PATCH 17/60] feat: show onboarding button on small screens (#1803) --- .eslintrc.json | 12 +--- .../molecules/AuthSection/auth-section.tsx | 13 +++- .../OnboardingButton/onboarding-button.tsx | 24 +++++-- components/organisms/TopNav/top-nav.tsx | 71 +++++++++++-------- 4 files changed, 73 insertions(+), 47 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8327af5ff1..2f1c5150dc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,21 +2,13 @@ "extends": ["next/core-web-vitals", "plugin:prettier/recommended", "plugin:storybook/recommended"], "plugins": ["unused-imports"], "rules": { + "prettier/prettier": ["error", { "endOfLine": "auto" }], "jsx-quotes": "error", "unused-imports/no-unused-imports": "error", "import/order": [ "error", { - "groups": [ - "builtin", - "external", - "internal", - "object", - "type", - "index", - "parent", - "sibling" - ] + "groups": ["builtin", "external", "internal", "object", "type", "index", "parent", "sibling"] } ] } diff --git a/components/molecules/AuthSection/auth-section.tsx b/components/molecules/AuthSection/auth-section.tsx index 21130ffb0a..a44a6f735b 100644 --- a/components/molecules/AuthSection/auth-section.tsx +++ b/components/molecules/AuthSection/auth-section.tsx @@ -2,7 +2,6 @@ import { useEffect, useState } from "react"; import Image from "next/image"; import { useRouter } from "next/router"; import Link from "next/link"; - import { IoNotifications } from "react-icons/io5"; import { FiLogOut, FiSettings } from "react-icons/fi"; import { BiLinkExternal } from "react-icons/bi"; @@ -19,6 +18,7 @@ import Text from "components/atoms/Typography/text"; import GitHubIcon from "img/icons/github-icon.svg"; import Icon from "components/atoms/Icon/icon"; import SearchDialog, { SearchDialogTrigger } from "components/organisms/SearchDialog/search-dialog"; +import Tooltip from "components/atoms/Tooltip/tooltip"; import DropdownList from "../DropdownList/dropdown-list"; import OnboardingButton from "../OnboardingButton/onboarding-button"; import userAvatar from "../../../img/ellipse-1.png"; @@ -104,7 +104,16 @@ const AuthSection: React.FC = ({}) => { <> {!onboarded && ( <> - +
+ + + +
+ + + Complete the onboarding + + )} diff --git a/components/molecules/OnboardingButton/onboarding-button.tsx b/components/molecules/OnboardingButton/onboarding-button.tsx index 192fd0d45a..a1d92bb0c5 100644 --- a/components/molecules/OnboardingButton/onboarding-button.tsx +++ b/components/molecules/OnboardingButton/onboarding-button.tsx @@ -1,15 +1,25 @@ import React from "react"; -import Link from "next/link"; -import Text from "components/atoms/Typography/text"; +import { useRouter } from "next/router"; import ProgressPie from "components/atoms/ProgressPie/progress-pie"; -const OnboardingButton: React.FC = () => { +interface OnboardingButtonProps { + className?: string; + children?: React.ReactNode; + aria?: string; + ariaLabel?: string; +} + +const OnboardingButton: React.FC = ({ className, children, aria, ariaLabel }) => { + const router = useRouter(); return ( - ); }; diff --git a/components/organisms/TopNav/top-nav.tsx b/components/organisms/TopNav/top-nav.tsx index 6e5a9dc14d..5bb32837c0 100644 --- a/components/organisms/TopNav/top-nav.tsx +++ b/components/organisms/TopNav/top-nav.tsx @@ -1,28 +1,50 @@ import Link from "next/link"; import { useRouter } from "next/router"; import React from "react"; - import AuthSection from "components/molecules/AuthSection/auth-section"; import HeaderLogo from "components/molecules/HeaderLogo/header-logo"; import useSession from "lib/hooks/useSession"; import useSupabaseAuth from "lib/hooks/useSupabaseAuth"; import { useFetchUser } from "lib/hooks/useFetchUser"; +import OnboardingButton from "components/molecules/OnboardingButton/onboarding-button"; +import Text from "components/atoms/Typography/text"; -const TopNav: React.FC = () => ( -
-
-
- -
-
-
-
-); +
+
+ + ); +}; const Nav = ({ className, name = "Main" }: { className?: string; name?: string }) => { const { user } = useSupabaseAuth(); @@ -34,20 +56,13 @@ const Nav = ({ className, name = "Main" }: { className?: string; name?: string } return (