Skip to content

Commit

Permalink
post-review tidies
Browse files Browse the repository at this point in the history
  • Loading branch information
fredex42 committed Oct 23, 2024
1 parent 45377a0 commit 1ef79f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions fronts-client/src/components/feed/FeedItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ interface FeedItemProps {
) => void;
shouldObscureFeed?: boolean;
byline?: string;
noPinboard?: boolean;
showPinboard?: boolean;
}

export class FeedItem extends React.Component<FeedItemProps, {}> {
Expand All @@ -152,7 +152,7 @@ export class FeedItem extends React.Component<FeedItemProps, {}> {
hasVideo,
handleDragStart,
byline,
noPinboard,
showPinboard,
} = this.props;

const { preview, live, ophan } = getPaths(id);
Expand Down Expand Up @@ -231,7 +231,7 @@ export class FeedItem extends React.Component<FeedItemProps, {}> {
toolTipPosition={'top'}
toolTipAlign={'right'}
urlPath={liveUrl}
noPinboard={noPinboard}
showPinboard={showPinboard}
renderButtons={(props) => (
<>
<HoverViewButton hoverText="View" href={href} {...props} />
Expand Down
2 changes: 1 addition & 1 deletion fronts-client/src/components/feed/RecipeFeedItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const RecipeFeedItem = ({ id, showTimes }: ComponentProps) => {
handleDragStart={handleDragStartForCard(CardTypesMap.RECIPE, recipe)}
onAddToClipboard={onAddToClipboard}
shouldObscureFeed={shouldObscureFeed}
noPinboard={true}
showPinboard={false}
bodyContent={
<>
<FeedItemTitle>{recipe.title}</FeedItemTitle>
Expand Down
7 changes: 4 additions & 3 deletions fronts-client/src/components/feed/RecipeSearchContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => {

const getUpdateConfig = () => {
switch (orderingForce) {
case 'default':
return undefined;
case 'gentle':
return {
decay: 0.95,
Expand All @@ -123,6 +121,9 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => {
dropoffScaleDays: 180,
offsetDays: 14,
};
case 'default':
default:
return undefined;
}
};

Expand Down Expand Up @@ -212,7 +213,7 @@ export const RecipeSearchContainer = ({ rightHandContainer }: Props) => {
);
}}
>
<option value={'Relevance'}>
<option value={'relevance'}>
Most relevant, regardless of time
</option>
<option value={'publishedDate'}>Most recently published</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand All @@ -54,7 +54,7 @@ export const HoverActionsButtonWrapper = ({
size,
urlPath,
renderButtons,
noPinboard,
showPinboard,
}: WrapperProps) => {
const [toolTipText, setToolTipText] = useState<string | undefined>(undefined);

Expand All @@ -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
Expand Down

0 comments on commit 1ef79f2

Please sign in to comment.