Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump prettier version #9618

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
"pm2": "^5.3.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.0.2",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^2.3.4",
"prettier-plugin-tailwindcss": "^0.2.1",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-tailwindcss": "^0.5.13",
"raw-loader": "^4.0.2",
"relay-compiler": "^14.1.0",
"relay-config": "^12.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ const ActivityDetailsSidebar = (props: Props) => {
selectedTemplate.scope === 'PUBLIC'
? teams
: selectedTemplate.scope === 'ORGANIZATION'
? teams.filter((team) => team.orgId === selectedTemplate.orgId)
: // it is a team-scoped template, templateTeam must exist
[templateTeam!]
? teams.filter((team) => team.orgId === selectedTemplate.orgId)
: // it is a team-scoped template, templateTeam must exist
[templateTeam!]

const availableTeamsRef = useRef(availableTeams)

Expand Down Expand Up @@ -246,12 +246,12 @@ const ActivityDetailsSidebar = (props: Props) => {
type === 'retrospective'
? 'Retro'
: type === 'teamPrompt'
? 'Standup'
: type === 'poker'
? 'Poker'
: type === 'action'
? 'Check-in'
: 'Meeting'
? 'Standup'
: type === 'poker'
? 'Poker'
: type === 'action'
? 'Check-in'
: 'Meeting'
const withRecurrence =
type === 'teamPrompt' ||
(selectedTeam.organization.featureFlags.recurringRetros && type === 'retrospective')
Expand Down
31 changes: 17 additions & 14 deletions packages/client/components/ActivityLibrary/ActivityLibrary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,22 @@ const mapRetroSubCategories = (templates: readonly Template[]) => {
const mapTeamCategories = (templates: readonly Template[]) => {
// list public templates last
const publicTemplates = [] as Template[]
const mapped = templates.reduce((acc, template) => {
const {team, scope} = template
if (scope === 'PUBLIC') {
publicTemplates.push(template)
} else {
const {name} = team
if (!acc[name]) {
acc[name] = []
const mapped = templates.reduce(
(acc, template) => {
const {team, scope} = template
if (scope === 'PUBLIC') {
publicTemplates.push(template)
} else {
const {name} = team
if (!acc[name]) {
acc[name] = []
}
acc[name]!.push(template)
}
acc[name]!.push(template)
}
return acc
}, {} as Record<string, Template[]>)
return acc
},
{} as Record<string, Template[]>
)

mapped['Parabol'] = publicTemplates
return mapped
Expand Down Expand Up @@ -245,8 +248,8 @@ export const ActivityLibrary = (props: Props) => {
categoryId === QUICK_START_CATEGORY_ID
? template.isRecommended
: categoryId === CUSTOM_CATEGORY_ID
? template.scope !== 'PUBLIC'
: template.category === categoryId
? template.scope !== 'PUBLIC'
: template.category === categoryId
)
}, [searchQuery, filteredTemplates, categoryId])

Expand Down
8 changes: 4 additions & 4 deletions packages/client/components/AvatarListUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const StyledAvatar = styled(Avatar)<{
opacity: !isAnimated
? undefined
: status === TransitionStatus.EXITING || status === TransitionStatus.MOUNTED
? 0
: 1,
? 0
: 1,
transform: !isAnimated
? undefined
: status === TransitionStatus.EXITING || status === TransitionStatus.MOUNTED
? 'scale(0)'
: 'scale(1)',
? 'scale(0)'
: 'scale(1)',
transition: `all 300ms ${BezierCurve.DECELERATE}`
}))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const AzureDevOpsScopingSelectAllIssues = (props: Props) => {
service: 'azureDevOps',
serviceTaskId,
action
} as const)
}) as const
)

const variables = {
Expand Down
45 changes: 25 additions & 20 deletions packages/client/components/BaseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,33 @@ interface Root {
size: 'small' | 'medium' | 'large'
}

const ButtonRoot = styled(PlainButton)<Root>(
({disabled, elevationResting, elevationHovered, elevationPressed, pressedDown, size}) => {
return {
// size is easy to override, it adds: fontSize, lineHeight, padding
...(ui.buttonSizeStyles[size] as any),
alignItems: 'center',
border: '1px solid transparent',
boxShadow: disabled ? undefined : pressedDown ? elevationPressed : elevationResting,
display: 'flex',
flexShrink: 0,
justifyContent: 'center',
textAlign: 'center',
transition: `box-shadow 100ms ease-in`,
userSelect: 'none',
whiteSpace: 'nowrap',
':hover,:focus,:active': {
boxShadow: disabled ? undefined : pressedDown ? elevationPressed : elevationHovered,
outline: pressedDown && 0
}
const ButtonRoot = styled(PlainButton)<Root>(({
disabled,
elevationResting,
elevationHovered,
elevationPressed,
pressedDown,
size
}) => {
return {
// size is easy to override, it adds: fontSize, lineHeight, padding
...(ui.buttonSizeStyles[size] as any),
alignItems: 'center',
border: '1px solid transparent',
boxShadow: disabled ? undefined : pressedDown ? elevationPressed : elevationResting,
display: 'flex',
flexShrink: 0,
justifyContent: 'center',
textAlign: 'center',
transition: `box-shadow 100ms ease-in`,
userSelect: 'none',
whiteSpace: 'nowrap',
':hover,:focus,:active': {
boxShadow: disabled ? undefined : pressedDown ? elevationPressed : elevationHovered,
outline: pressedDown && 0
}
}
)
})

export interface BaseButtonProps extends PlainButtonProps {
'aria-label'?: string
Expand Down
4 changes: 2 additions & 2 deletions packages/client/components/BottomNavControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const BottomNavControl = styled(FlatButton)<Props>((props) => {
opacity: confirming
? 0.5
: status === TransitionStatus.MOUNTED || status === TransitionStatus.EXITING
? 0
: 1,
? 0
: 1,
padding: 0,
transformOrigin: 'center bottom',
transition: `all 300ms ${BezierCurve.DECELERATE}`,
Expand Down
4 changes: 2 additions & 2 deletions packages/client/components/DeckActivityAvatars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const PeekingAvatar = styled(AvatarListUser)<{status?: TransitionStatus}>(({stat
status === TransitionStatus.MOUNTED
? `translate(64px)`
: status === TransitionStatus.EXITING
? 'scale(0)'
: undefined
? 'scale(0)'
: undefined
}))

interface Props {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/components/EstimatePhaseArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const innerStyle = (isDesktop: boolean, hasSingleDimension: boolean): React.CSSP
? '12px 8px 0'
: '4px 4px 0'
: isDesktop
? '8px 40px 0'
: '8px 16px 0',
? '8px 40px 0'
: '8px 16px 0',
width: '100%',
overflow: 'visible'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const GitHubScopingSelectAllIssues = (props: Props) => {
service: 'github',
serviceTaskId,
action
} as const)
}) as const
)

const variables = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const GitLabScopingSelectAllIssues = (props: Props) => {
service: 'gitlab',
serviceTaskId,
action
} as const)
}) as const
)

const variables = {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/JiraScopingSelectAllIssues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const JiraScopingSelectAllIssues = (props: Props) => {
service: 'jira',
serviceTaskId,
action
} as const)
}) as const
)

const variables = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/components/MiniPokerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const MiniPokerCardPlaceholder = styled('div')<{
border: color
? 0
: isFinal
? `1px solid ${PALETTE.SLATE_400}`
: `1px dashed ${PALETTE.SLATE_600}`,
? `1px solid ${PALETTE.SLATE_400}`
: `1px dashed ${PALETTE.SLATE_600}`,
borderRadius: 2,
color: color ? '#fff' : PALETTE.SLATE_600,
cursor: onClick || canEdit ? 'pointer' : 'default',
Expand Down
8 changes: 4 additions & 4 deletions packages/client/components/OverflowAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ const OverflowCount = styled('div')<{
opacity: !isAnimated
? undefined
: status === TransitionStatus.EXITING || status === TransitionStatus.MOUNTED
? 0
: 1,
? 0
: 1,
overflow: 'hidden',
transform: !isAnimated
? undefined
: status === TransitionStatus.EXITING || status === TransitionStatus.MOUNTED
? 'scale(0)'
: 'scale(1)',
? 'scale(0)'
: 'scale(1)',
transition: `all 300ms ${BezierCurve.DECELERATE}`,
userSelect: 'none',
width
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ParabolScopingSelectAllTasks = (props: Props) => {
service: 'PARABOL',
serviceTaskId,
action
} as const)
}) as const
)
const variables = {
meetingId,
Expand Down
64 changes: 31 additions & 33 deletions packages/client/components/PokerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,39 @@ const getRotation = (
return `translate(${x}px, ${y + selectedOffset}px)rotate(${rotation}deg)`
}

const CardBase = styled('div')<CardBaseProps>(
({
color,
isCollapsed,
isDesktop,
isSelected,
leftEdge,
radius,
rotation,
yOffset,
showTransition
}) => {
const transform = getRotation(isSelected, isCollapsed, leftEdge, radius, rotation, yOffset)
const hoverTransform = `${transform} translateY(-8px)`
return {
background: getPokerCardBackground(color),
borderRadius: 6,
cursor: 'pointer',
display: 'flex',
height: PokerCards.HEIGHT,
justifyContent: 'center',
position: 'absolute',
transform,
transition: showTransition
? `transform ${isCollapsed ? COLLAPSE_DUR : EXPAND_DUR}ms ${BezierCurve.DECELERATE}`
: undefined,
userSelect: 'none',
width: PokerCards.WIDTH,
zIndex: isSelected && isCollapsed ? 1 : undefined,
'&:hover': {
transform: isCollapsed ? undefined : isDesktop ? hoverTransform : undefined
}
const CardBase = styled('div')<CardBaseProps>(({
color,
isCollapsed,
isDesktop,
isSelected,
leftEdge,
radius,
rotation,
yOffset,
showTransition
}) => {
const transform = getRotation(isSelected, isCollapsed, leftEdge, radius, rotation, yOffset)
const hoverTransform = `${transform} translateY(-8px)`
return {
background: getPokerCardBackground(color),
borderRadius: 6,
cursor: 'pointer',
display: 'flex',
height: PokerCards.HEIGHT,
justifyContent: 'center',
position: 'absolute',
transform,
transition: showTransition
? `transform ${isCollapsed ? COLLAPSE_DUR : EXPAND_DUR}ms ${BezierCurve.DECELERATE}`
: undefined,
userSelect: 'none',
width: PokerCards.WIDTH,
zIndex: isSelected && isCollapsed ? 1 : undefined,
'&:hover': {
transform: isCollapsed ? undefined : isDesktop ? hoverTransform : undefined
}
}
)
})

const UpperLeftCardValue = styled('div')({
color: '#fff',
Expand Down
24 changes: 12 additions & 12 deletions packages/client/components/RaisedButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ const paletteColors = {

const buttonLightThemes = ['white', 'gray']

const StyledBaseButton = styled(BaseButton)<{palette?: keyof typeof paletteColors}>(
({palette = 'gray'}) => {
const backgroundColor = paletteColors[palette]
const color = buttonLightThemes.includes(palette) ? PALETTE.SLATE_700 : '#FFFFFF'
return {
backgroundColor,
borderRadius: Radius.BUTTON_PILL,
color,
fontWeight: 600,
outline: 0
}
const StyledBaseButton = styled(BaseButton)<{palette?: keyof typeof paletteColors}>(({
palette = 'gray'
}) => {
const backgroundColor = paletteColors[palette]
const color = buttonLightThemes.includes(palette) ? PALETTE.SLATE_700 : '#FFFFFF'
return {
backgroundColor,
borderRadius: Radius.BUTTON_PILL,
color,
fontWeight: 600,
outline: 0
}
)
})

export interface RaisedButtonProps extends BaseButtonProps {
palette?: keyof typeof paletteColors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export const UpdateRecurrenceSettingsModal = (props: Props) => {
meetingType === 'teamPrompt'
? 'Standup'
: meetingType === 'retrospective'
? 'Retrospective'
: 'Meeting'
? 'Retrospective'
: 'Meeting'
const currentRecurrenceRule = meeting.meetingSeries?.recurrenceRule
const atmosphere = useAtmosphere()
const isMeetingSeriesActive = meeting.meetingSeries?.cancelledAt === null
Expand Down
Loading
Loading