-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): Test v7.32.0 (#9761)
Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Matt Krick <matt.krick@gmail.com> Co-authored-by: Rafa <101704572+rafaelromcar-parabol@users.noreply.github.com> Co-authored-by: Georg Bremer <github@dschoordsch.de> Co-authored-by: Nick O'Ferrall <nickoferrall@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com> Co-authored-by: Matt Krick <matt.krick@gmail.com> Co-authored-by: Jordan Husney <jordan.husney@gmail.com> Co-authored-by: adaniels-parabol <71724289+adaniels-parabol@users.noreply.github.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: Dale Bumblis <135627447+dbumblis-parabol@users.noreply.github.com> Co-authored-by: Bartosz Jarocki <jarocki.bartek@gmail.com> Co-authored-by: Marcus Wermuth <hello@marcuswermuth.com> Co-authored-by: Rafael Romero <rafael@parabol.co> Co-authored-by: Bruce Tian <tianrunhe@gmail.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Mohd Muneeb <mr.mohdmuneeb123@gmail.com> Co-authored-by: Muneeb-Ventures <mohd.muneeb@m0.ventures> Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
1 parent
12c0fdc
commit dd37d7a
Showing
54 changed files
with
859 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,4 @@ stats.json | |
storybook-static/ | ||
test-report.xml | ||
webpack-assets.json | ||
**/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "7.31.0" | ||
".": "7.32.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
packages/client/components/ActivityLibrary/ActivityCardFavorite.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import {Favorite} from '@mui/icons-material' | ||
import graphql from 'babel-plugin-relay/macro' | ||
import clsx from 'clsx' | ||
import React from 'react' | ||
import {useFragment} from 'react-relay' | ||
import {ActivityCardFavorite_user$key} from '../../__generated__/ActivityCardFavorite_user.graphql' | ||
import useAtmosphere from '../../hooks/useAtmosphere' | ||
import useMutationProps from '../../hooks/useMutationProps' | ||
import ToggleFavoriteTemplateMutation from '../../mutations/ToggleFavoriteTemplateMutation' | ||
import {Tooltip} from '../../ui/Tooltip/Tooltip' | ||
import {TooltipContent} from '../../ui/Tooltip/TooltipContent' | ||
import {TooltipTrigger} from '../../ui/Tooltip/TooltipTrigger' | ||
|
||
type Props = { | ||
className?: string | ||
templateId: string | ||
viewerRef: ActivityCardFavorite_user$key | ||
} | ||
|
||
const ActivityCardFavorite = (props: Props) => { | ||
const {className, templateId, viewerRef} = props | ||
const atmosphere = useAtmosphere() | ||
const {onError, onCompleted} = useMutationProps() | ||
|
||
const viewer = useFragment( | ||
graphql` | ||
fragment ActivityCardFavorite_user on User { | ||
favoriteTemplates { | ||
id | ||
} | ||
} | ||
`, | ||
viewerRef | ||
) | ||
const favoriteTemplateIds = viewer.favoriteTemplates.map((template) => template.id) | ||
const isFavorite = favoriteTemplateIds.includes(templateId) | ||
const tooltipCopy = isFavorite ? 'Remove from favorites' : 'Add to favorites' | ||
|
||
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => { | ||
e.preventDefault() | ||
ToggleFavoriteTemplateMutation(atmosphere, {templateId}, {onError, onCompleted}) | ||
} | ||
|
||
return ( | ||
<Tooltip> | ||
<div | ||
className={clsx( | ||
className, | ||
`z-10 flex h-10 w-10 items-center justify-center rounded-full bg-white` | ||
)} | ||
> | ||
<TooltipTrigger asChild> | ||
<button | ||
onClick={handleClick} | ||
className='flex h-full w-full cursor-pointer items-center justify-center bg-transparent' | ||
> | ||
<Favorite className={isFavorite ? 'text-rose-600' : 'text-slate-600'} /> | ||
</button> | ||
</TooltipTrigger> | ||
</div> | ||
<TooltipContent side='bottom' align='center' sideOffset={20}> | ||
{tooltipCopy} | ||
</TooltipContent> | ||
</Tooltip> | ||
) | ||
} | ||
|
||
export default ActivityCardFavorite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.