From 1ef79f2797bd080214d2020f66d402dbd82ddccd Mon Sep 17 00:00:00 2001 From: Andy Gallagher Date: Wed, 23 Oct 2024 14:02:28 +0100 Subject: [PATCH] post-review tidies --- fronts-client/src/components/feed/FeedItem.tsx | 6 +++--- fronts-client/src/components/feed/RecipeFeedItem.tsx | 2 +- .../src/components/feed/RecipeSearchContainer.tsx | 7 ++++--- .../src/components/inputs/HoverActionButtonWrapper.tsx | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fronts-client/src/components/feed/FeedItem.tsx b/fronts-client/src/components/feed/FeedItem.tsx index 3371851bf5..6c18e605c2 100644 --- a/fronts-client/src/components/feed/FeedItem.tsx +++ b/fronts-client/src/components/feed/FeedItem.tsx @@ -126,7 +126,7 @@ interface FeedItemProps { ) => void; shouldObscureFeed?: boolean; byline?: string; - noPinboard?: boolean; + showPinboard?: boolean; } export class FeedItem extends React.Component { @@ -152,7 +152,7 @@ export class FeedItem extends React.Component { hasVideo, handleDragStart, byline, - noPinboard, + showPinboard, } = this.props; const { preview, live, ophan } = getPaths(id); @@ -231,7 +231,7 @@ export class FeedItem extends React.Component { toolTipPosition={'top'} toolTipAlign={'right'} urlPath={liveUrl} - noPinboard={noPinboard} + showPinboard={showPinboard} renderButtons={(props) => ( <> diff --git a/fronts-client/src/components/feed/RecipeFeedItem.tsx b/fronts-client/src/components/feed/RecipeFeedItem.tsx index 6a925f3e24..17c68c3619 100644 --- a/fronts-client/src/components/feed/RecipeFeedItem.tsx +++ b/fronts-client/src/components/feed/RecipeFeedItem.tsx @@ -57,7 +57,7 @@ export const RecipeFeedItem = ({ id, showTimes }: ComponentProps) => { handleDragStart={handleDragStartForCard(CardTypesMap.RECIPE, recipe)} onAddToClipboard={onAddToClipboard} shouldObscureFeed={shouldObscureFeed} - noPinboard={true} + showPinboard={false} bodyContent={ <> {recipe.title} diff --git a/fronts-client/src/components/feed/RecipeSearchContainer.tsx b/fronts-client/src/components/feed/RecipeSearchContainer.tsx index 731c56827b..bacb1c1aaa 100644 --- a/fronts-client/src/components/feed/RecipeSearchContainer.tsx +++ b/fronts-client/src/components/feed/RecipeSearchContainer.tsx @@ -109,8 +109,6 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => { const getUpdateConfig = () => { switch (orderingForce) { - case 'default': - return undefined; case 'gentle': return { decay: 0.95, @@ -123,6 +121,9 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => { dropoffScaleDays: 180, offsetDays: 14, }; + case 'default': + default: + return undefined; } }; @@ -212,7 +213,7 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => { ); }} > - diff --git a/fronts-client/src/components/inputs/HoverActionButtonWrapper.tsx b/fronts-client/src/components/inputs/HoverActionButtonWrapper.tsx index a3b02a60a7..4bb57a306d 100644 --- a/fronts-client/src/components/inputs/HoverActionButtonWrapper.tsx +++ b/fronts-client/src/components/inputs/HoverActionButtonWrapper.tsx @@ -45,7 +45,7 @@ interface WrapperProps { toolTipAlign: 'left' | 'center' | 'right'; urlPath: string | undefined; renderButtons: (renderProps: ButtonProps) => JSX.Element; - noPinboard?: boolean; + showPinboard?: boolean; //Note- defaults to `true` } export const HoverActionsButtonWrapper = ({ @@ -54,7 +54,7 @@ export const HoverActionsButtonWrapper = ({ size, urlPath, renderButtons, - noPinboard, + showPinboard, }: WrapperProps) => { const [toolTipText, setToolTipText] = useState(undefined); @@ -81,7 +81,7 @@ export const HoverActionsButtonWrapper = ({ hideToolTip, size, })} - {urlPath && !noPinboard && ( + {urlPath && (showPinboard || showPinboard === undefined) && ( // the below tag is empty and meaningless to the fronts tool itself, but serves as a handle for // Pinboard to attach itself via, identified/distinguished by the urlPath data attribute // @ts-ignore