Skip to content

Commit

Permalink
chore: release 1.72.0 (#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Oct 24, 2023
2 parents 933f9a0 + b3e564f commit 9c6ff5f
Show file tree
Hide file tree
Showing 41 changed files with 315 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
with:
issueCurrentlyAssignedMessage: Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor.
token: ${{ secrets.GITHUB_TOKEN }}
blockingLabels: needs triage,blocked,core team work,needs design,duplicate
blockingLabels: 👀 needs triage,blocked,core team work,needs design,duplicate
blockingLabelsMessage: The issue you are trying to assign yourself is blocked until it can be triaged or by another label on the issue.
81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,87 @@

> All notable changes to this project will be documented in this file
## [1.72.0-beta.6](https://github.com/open-sauced/insights/compare/v1.72.0-beta.5...v1.72.0-beta.6) (2023-10-24)


### 🐛 Bug Fixes

* add placeholder for 0 pending connection request ([#1989](https://github.com/open-sauced/insights/issues/1989)) ([70d6046](https://github.com/open-sauced/insights/commit/70d6046204b5d7e9890a2fc550e8540b658883a0))

## [1.72.0-beta.5](https://github.com/open-sauced/insights/compare/v1.72.0-beta.4...v1.72.0-beta.5) (2023-10-23)


### 🧑‍💻 Code Refactoring

* Rename the [filterName] query to more accurate naming in `/pages` routes ([#1753](https://github.com/open-sauced/insights/issues/1753)) ([87bd6a3](https://github.com/open-sauced/insights/commit/87bd6a39045876ac07a7f87467233d578904eba1))

## [1.72.0-beta.4](https://github.com/open-sauced/insights/compare/v1.72.0-beta.3...v1.72.0-beta.4) (2023-10-23)


### 🐛 Bug Fixes

* link user avatar on feeds page to their profile ([#1986](https://github.com/open-sauced/insights/issues/1986)) ([24ca123](https://github.com/open-sauced/insights/commit/24ca123ea4a318a2eebbfb21cc13cc63e86519a6))
* popover display issue of safari ([#1962](https://github.com/open-sauced/insights/issues/1962)) ([afe5ab2](https://github.com/open-sauced/insights/commit/afe5ab207fd619b0a16f39ee7a88fde1cfa88669))

## [1.72.0-beta.3](https://github.com/open-sauced/insights/compare/v1.72.0-beta.2...v1.72.0-beta.3) (2023-10-23)


### 🧑‍💻 Code Refactoring

* show tootip indication for disabled CTA when repo limit is reached ([#1915](https://github.com/open-sauced/insights/issues/1915)) ([4b675a0](https://github.com/open-sauced/insights/commit/4b675a0960e59d09a7482834acf90ba2857f5553))

## [1.72.0-beta.2](https://github.com/open-sauced/insights/compare/v1.72.0-beta.1...v1.72.0-beta.2) (2023-10-23)


### 🐛 Bug Fixes

* add build command to Netlify `.toml` configuration ([#1961](https://github.com/open-sauced/insights/issues/1961)) ([973be2f](https://github.com/open-sauced/insights/commit/973be2f97ad2b1f5416765808548de56406a5788))
* No more 404 errors in the browser console ([#1983](https://github.com/open-sauced/insights/issues/1983)) ([c6c73f7](https://github.com/open-sauced/insights/commit/c6c73f7ac4a8b9038d32c66c41ff01de7f52eec3))

## [1.72.0-beta.1](https://github.com/open-sauced/insights/compare/v1.71.2-beta.4...v1.72.0-beta.1) (2023-10-23)


### 🍕 Features

* add hovercards to list contributors page ([01ca13c](https://github.com/open-sauced/insights/commit/01ca13ccbbb76157f3ca0fadda0bd1b936faf83c))
* add hovercards to list contributors page ([#1980](https://github.com/open-sauced/insights/issues/1980)) ([7e5ab98](https://github.com/open-sauced/insights/commit/7e5ab98bba0418c41bbdad0fcf19afc5a9a36f9e))

### [1.71.2-beta.4](https://github.com/open-sauced/insights/compare/v1.71.2-beta.3...v1.71.2-beta.4) (2023-10-20)


### 🧑‍💻 Code Refactoring

* remove key ([b84d4b1](https://github.com/open-sauced/insights/commit/b84d4b19e10001e7346b0eb669f2413cefa74759))


### 🐛 Bug Fixes

* add responsiveness to profile detail ([294abd0](https://github.com/open-sauced/insights/commit/294abd04211408d7006b398bf44467585cdae4db))
* notification indicator ([#1955](https://github.com/open-sauced/insights/issues/1955)) ([fd78097](https://github.com/open-sauced/insights/commit/fd780974e24441affed9b6df50c58553159b61fe))
* remove orange notification indicator on button click ([574f575](https://github.com/open-sauced/insights/commit/574f575a98eca6a1c7e0e4e44e8836042068a50f))

### [1.71.2-beta.3](https://github.com/open-sauced/insights/compare/v1.71.2-beta.2...v1.71.2-beta.3) (2023-10-20)


### 🐛 Bug Fixes

* added missing is_maintainer info for Posthog ([b9c0c1e](https://github.com/open-sauced/insights/commit/b9c0c1ee141d4d86a1327ff1b875ca90c1255e69))
* added missing is_maintainer info for Posthog ([#1975](https://github.com/open-sauced/insights/issues/1975)) ([25d603b](https://github.com/open-sauced/insights/commit/25d603b28894c0637bef3d6718deb4835bc620ca))

### [1.71.2-beta.2](https://github.com/open-sauced/insights/compare/v1.71.2-beta.1...v1.71.2-beta.2) (2023-10-20)


### 🐛 Bug Fixes

* removed chatbot ([#1973](https://github.com/open-sauced/insights/issues/1973)) ([4c58e42](https://github.com/open-sauced/insights/commit/4c58e4222c3146ce2411bdcf5e688d3f36c40e28))

### [1.71.2-beta.1](https://github.com/open-sauced/insights/compare/v1.71.1...v1.71.2-beta.1) (2023-10-20)


### 🐛 Bug Fixes

* renamed needs triage label as it was breaking our issue creation workflow ([#1968](https://github.com/open-sauced/insights/issues/1968)) ([0b0ac4b](https://github.com/open-sauced/insights/commit/0b0ac4b938efc724d08d54cb79c4a08931e935a4))

### [1.71.1](https://github.com/open-sauced/insights/compare/v1.71.0...v1.71.1) (2023-10-19)


Expand Down
55 changes: 35 additions & 20 deletions components/atoms/Avatar/avatar-hover-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,42 @@ import { getAvatarByUsername } from "lib/utils/github";
declare interface AvatarProps {
contributor: string;
repositories: number[];
size?: "small" | "large";
}

const AvatarHoverCard = ({ contributor, repositories }: AvatarProps): JSX.Element => (
<HoverCard.Root>
<Link href={`/user/${contributor}`} as={`/user/${contributor}`}>
<HoverCard.Trigger asChild>
<Image
alt={contributor}
className="border rounded-full"
height={500}
src={getAvatarByUsername(contributor, 40)}
width={500}
/>
</HoverCard.Trigger>
</Link>
<HoverCard.Portal>
<HoverCard.Content sideOffset={5}>
<HoverCardWrapper username={contributor} repositories={repositories} />
</HoverCard.Content>
</HoverCard.Portal>
</HoverCard.Root>
);
const AvatarHoverCard = ({ contributor, repositories, size = "large" }: AvatarProps): JSX.Element => {
let width = 500;
let height = 500;

switch (size) {
case "small":
width = 35;
height = 35;
break;
default:
break;
}

return (
<HoverCard.Root>
<Link href={`/user/${contributor}`} as={`/user/${contributor}`}>
<HoverCard.Trigger asChild>
<Image
alt={contributor}
className="border rounded-full"
height={width}
src={getAvatarByUsername(contributor, 40)}
width={height}
/>
</HoverCard.Trigger>
</Link>
<HoverCard.Portal>
<HoverCard.Content sideOffset={5}>
<HoverCardWrapper username={contributor} repositories={repositories} />
</HoverCard.Content>
</HoverCard.Portal>
</HoverCard.Root>
);
};

export default AvatarHoverCard;
16 changes: 9 additions & 7 deletions components/atoms/UserCard/user-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const UserCard = ({ username, name, meta, loading }: UserCardProps) => {
) : (
<div className="flex flex-col items-center gap-6 px-9">
<div className="flex flex-col items-center gap-2 -mt-10">
<Image
className="border border-white rounded-full "
width={100}
height={100}
src={avatarUrl}
alt={`${username}'s avatar image`}
/>
<Link href={`/user/${username}`}>
<Image
className="border border-white rounded-full "
width={100}
height={100}
src={avatarUrl}
alt={`${username}'s avatar image`}
/>
</Link>
<div className="text-center">
<h3 className="text-lg ">{name}</h3>
<Link className="text-lg text-slate-700" href={`/user/${username}`}>{`@${username}`}</Link>
Expand Down
10 changes: 9 additions & 1 deletion components/molecules/AuthSection/auth-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ const AuthSection: React.FC = ({}) => {
<Divider type="vertical" className="!h-6 !bg-light-slate-6"></Divider>
</>
)}
<button className="relative cursor-pointer" onClick={() => router.push(`/user/notifications`)}>
<button
className="relative cursor-pointer"
onClick={() => {
if (userInfo && userInfo.notification_count > 0) {
setUserInfo({ ...userInfo, notification_count: 0 });
}
router.push(`/user/notifications`);
}}
>
{userInfo && userInfo.notification_count > 0 && (
<span className="absolute right-0 block w-2 h-2 bg-orange-300 rounded-full"></span>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ const ContributorHighlightCard = ({
const [tagRepoSearchLoading, setTagRepoSearchLoading] = useState<boolean>(false);
const [addTaggedRepoFormOpen, setAddTaggedRepoFormOpen] = useState(false);
const [host, setHost] = useState("");
const [dropdownOpen, setDropdownOpen] = useState(false);
const { follow, unFollow, isError } = useFollowUser(
loggedInUser && loggedInUser?.user_metadata.username !== user ? user : ""
dropdownOpen && loggedInUser && loggedInUser?.user_metadata.user_name !== user ? user : ""
);
const [popoverOpen, setPopoverOpen] = useState(false);
const popoverContentRef = React.useRef<HTMLDivElement>(null);

const [date, setDate] = useState<Date | undefined>(shipped_date ? new Date(shipped_date) : undefined);

Expand Down Expand Up @@ -166,6 +169,20 @@ const ContributorHighlightCard = ({
return !matches ? false : true;
};

const handleClickOutsidePopoverContent = (e: MouseEvent) => {
if (popoverContentRef.current && !popoverContentRef.current.contains(e.target as Node)) {
setPopoverOpen(false);
}
};

useEffect(() => {
// This closes the popover when user clicks outside of it's content
document.addEventListener("mousedown", handleClickOutsidePopoverContent);
return () => {
document.removeEventListener("mousedown", handleClickOutsidePopoverContent);
};
}, [popoverOpen]);

const getEmojiReactors = (reaction_users: string[]) => {
if (!Array.isArray(reaction_users)) return "";

Expand Down Expand Up @@ -441,7 +458,13 @@ const ContributorHighlightCard = ({
{icon}
<span className="text-sm text-light-slate-11">{getHighlightTypePreset(type).text}</span>
<div className="flex items-center gap-3 ml-auto lg:gap-3">
<DropdownMenu modal={false}>
<DropdownMenu
open={dropdownOpen}
onOpenChange={(value) => {
setDropdownOpen(value);
}}
modal={false}
>
<div className="flex items-center gap-3 w-max">
<Tooltip direction="top" content="share on twitter">
<a
Expand Down Expand Up @@ -652,20 +675,26 @@ const ContributorHighlightCard = ({
></Textarea>
<div className="flex items-center justify-between py-1 pl-3">
<Tooltip direction="top" content="Pick a date">
<Popover>
<Popover open={popoverOpen}>
<PopoverTrigger asChild>
<button className="flex items-center gap-2 text-base text-light-slate-9">
<button
onClick={() => setPopoverOpen(!popoverOpen)}
className="flex items-center gap-2 text-base text-light-slate-9"
>
<BsCalendar2Event className="text-light-slate-9" />
{date && <span className="text-xs">{format(date, "PPP")}</span>}
</button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0 bg-white pointer-events-auto">
<PopoverContent ref={popoverContentRef} className="w-auto p-0 bg-white pointer-events-auto">
<Calendar
// block user's from selecting a future date
toDate={new Date()}
mode="single"
selected={date}
onSelect={setDate}
onSelect={(date) => {
setDate(date);
setPopoverOpen(false);
}}
className="border rounded-md"
/>
</PopoverContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const ContributorHoverCard = ({
isMaintainer,
}: ContributorHoverCardProps) => {
const router = useRouter();
const { filterName } = router.query;
const topic = filterName as string;
const topic = router.query.pageId as string;

const calculatedDateFromToday = dateOfFirstPr
? calcDistanceFromToday(new Date(parseInt(dateOfFirstPr).toString()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import useContributorPullRequests from "lib/hooks/api/useContributorPullRequests
import useRepoList from "lib/hooks/useRepoList";
import { useFetchUser } from "lib/hooks/useFetchUser";
import Checkbox from "components/atoms/Checkbox/checkbox";
import AvatarHoverCard from "components/atoms/Avatar/avatar-hover-card";
import { getActivity } from "../RepoRow/repo-row";
import DevProfile from "../DevProfile/dev-profile";

Expand Down Expand Up @@ -155,14 +156,7 @@ const ContributorListTableRow = ({
)}

{/* Column: Contributors */}
<div className={clsx("flex-1 lg:min-w-[12.5rem] overflow-hidden")}>
<DevProfile
company={user?.company || getLastContributedRepo(data)}
username={login}
hasBorder={!contributor.author_login}
/>
</div>

<AvatarHoverCard contributor={contributor.username} repositories={[]} size="small" />
{/* Column: Act */}
<div className={clsx("flex-1 flex lg:max-w-[6.25rem] w-fit justify-center")}>
{contributor.author_login ? getActivity(totalPrs, false) : "-"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const ContributorProfileHeader = ({
{isPremium && isRecievingConnections && (
<DropdownMenuItem className="rounded-md">
<button onClick={() => setIsDialogOpen(true)} className="flex items-center gap-1 pl-3 pr-7">
Collaborate
Connect
</button>
</DropdownMenuItem>
)}
Expand All @@ -303,7 +303,7 @@ const ContributorProfileHeader = ({
}
className="flex items-center gap-1 pl-3 pr-7"
>
Collaborate
Connect
</button>
</DropdownMenuItem>
)}
Expand All @@ -319,7 +319,7 @@ const ContributorProfileHeader = ({
<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
<DialogContent className="w-full md:!w-2/3 px-4 py-8 md:space-y-4">
<DialogHeader>
<DialogTitle className="!text-3xl text-left">Collaborate with {username}!</DialogTitle>
<DialogTitle className="!text-3xl text-left">Connect with {username}!</DialogTitle>
</DialogHeader>

<form onSubmit={handleConnectionRequest} className="flex flex-col w-full gap-2 px-4 md:gap-8 md:px-14 ">
Expand Down
14 changes: 7 additions & 7 deletions components/molecules/FilterHeader/filter-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ const HeaderFilter = () => {
const topicOptions = getInterestOptions();

const { filterValues } = useFilterPrefetch();
const { filterName, toolName, selectedFilter } = router.query;
const { pageId, toolName, selectedFilter } = router.query;
const { user } = useSupabaseAuth();
const { data: userInfo } = useFetchUser(user?.user_metadata.user_name);

const filterBtnRouting = (filter: string) => {
captureAnalytics({ title: "Filters", property: "toolsFilter", value: `${filter} applied`, userInfo });
return router.push(`/${filterName}/${toolName}/filter/${filter.toLocaleLowerCase()}`);
return router.push(`/${pageId}/${toolName}/filter/${filter.toLocaleLowerCase()}`);
};

const cancelFilterRouting = () => {
return router.push(`/${filterName}/${toolName}`);
return router.push(`/${pageId}/${toolName}`);
};

const topicRouting = (topic: string) => {
Expand All @@ -44,19 +44,19 @@ const HeaderFilter = () => {
<div className="header-image mr-2 p-2 min-w-[130px] ">
<ContextThumbnail
size={120}
ContextThumbnailURL={getTopicThumbnail(filterName as interestsType)}
ContextThumbnailURL={getTopicThumbnail(pageId as interestsType)}
></ContextThumbnail>
</div>
<div className="header-info md:truncate flex flex-col grow justify-center p-2">
<Title level={1} className="!text-3xl font-semibold tracking-tight text-slate-900">
{topicNameFormatting(filterName as string)}
{topicNameFormatting(pageId as string)}
</Title>
<Text className="mt-1 !text-base text-slate-500">
{`Insights on GitHub repositories using the ${topicNameFormatting(filterName as string)} topic.`}
{`Insights on GitHub repositories using the ${topicNameFormatting(pageId as string)} topic.`}
</Text>
<div className="flex mt-4 items-center gap-2">
<FilterCardSelect
selected={filterName as string}
selected={pageId as string}
options={topicOptions as unknown as []}
icon="topic"
handleFilterClick={topicRouting}
Expand Down
Loading

0 comments on commit 9c6ff5f

Please sign in to comment.