Skip to content

Commit

Permalink
Merge branch 'master' into chore/ReflectPrompt-phase2
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkrick committed Sep 11, 2024
2 parents d18a710 + 2952c3d commit 5843139
Show file tree
Hide file tree
Showing 89 changed files with 1,705 additions and 971 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:

- name: Store Artifacts from Failed Tests
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results
path: packages/integration-tests/test-results/
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.46.2"
".": "7.47.0"
}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows conventions [outlined here](http://keepachangelog.com/).

## [7.47.0](https://github.com/ParabolInc/parabol/compare/v7.46.3...v7.47.0) (2024-09-10)


### Added

* Enable connecting to different GitLab integration providers ([#10025](https://github.com/ParabolInc/parabol/issues/10025)) ([8806839](https://github.com/ParabolInc/parabol/commit/880683996e4afb117ed21918a2c91574b649d4d9))


### Fixed

* Anonymous comments ([#10206](https://github.com/ParabolInc/parabol/issues/10206)) ([45501a3](https://github.com/ParabolInc/parabol/commit/45501a3950f1d511bfc428c80bbb8e537cae8837))
* **orgAdmin:** user should be able to remove themselves from the org ([#10201](https://github.com/ParabolInc/parabol/issues/10201)) ([4368c0b](https://github.com/ParabolInc/parabol/commit/4368c0bc6af2310f62133ae07c331912bb048628))


### Changed

* **deps-dev:** bump webpack from 5.89.0 to 5.94.0 ([#10168](https://github.com/ParabolInc/parabol/issues/10168)) ([e7d25ea](https://github.com/ParabolInc/parabol/commit/e7d25ea4048a0f2c4716968be072ca139ee09485))
* **deps:** bump fast-xml-parser from 4.3.2 to 4.4.1 ([#10047](https://github.com/ParabolInc/parabol/issues/10047)) ([e3b528f](https://github.com/ParabolInc/parabol/commit/e3b528ff2eda697797c0731df9041df34e77afd5))
* **Snyk:** Upgrade openapi-fetch from 0.9.8 to 0.10.0 ([#9955](https://github.com/ParabolInc/parabol/issues/9955)) ([06f0b0b](https://github.com/ParabolInc/parabol/commit/06f0b0b5491db2d4049d06758ea7afb35298e4a2))

## [7.46.3](https://github.com/ParabolInc/parabol/compare/v7.46.2...v7.46.3) (2024-09-09)


### Changed

* **metrics:** Only track 'Loaded a Page' event to Amplitude when userId is known ([#9193](https://github.com/ParabolInc/parabol/issues/9193)) ([be5d28a](https://github.com/ParabolInc/parabol/commit/be5d28a05d3d839ead0924fe79b736bd49abbce8))
* **rethinkdb:** Comment: Phase 3 ([#10172](https://github.com/ParabolInc/parabol/issues/10172)) ([22c3b5b](https://github.com/ParabolInc/parabol/commit/22c3b5bfa392d0bcaeed997ce7698a72edf9b23c))

## [7.46.2](https://github.com/ParabolInc/parabol/compare/v7.46.1...v7.46.2) (2024-09-06)


Expand Down
6 changes: 4 additions & 2 deletions codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defaultScalarType": "string",
"enumsAsTypes": true,
"optionalResolveType": true,
"scalars": {"DateTime": "Date", "File": "TFile", "RRule": "RRule"}
"scalars": {"DateTime": "Date", "File": "TFile", "RRule": "RRuleSet"}
},
"generates": {
"packages/server/graphql/private/resolverTypes.ts": {
Expand Down Expand Up @@ -55,6 +55,7 @@
"SetSlackNotificationPayload": "./types/SetSlackNotificationPayload#SetSlackNotificationPayloadSource",
"SetDefaultSlackChannelSuccess": "./types/SetDefaultSlackChannelSuccess#SetDefaultSlackChannelSuccessSource",
"AddCommentSuccess": "./types/AddCommentSuccess#AddCommentSuccessSource",
"AddIntegrationProviderSuccess": "./types/AddIntegrationProviderSuccess#AddIntegrationProviderSuccessSource",
"DeleteCommentSuccess": "./types/DeleteCommentSuccess#DeleteCommentSuccessSource",
"UpdateCommentContentSuccess": "./types/UpdateCommentContentSuccess#UpdateCommentContentSuccessSource",
"AddSlackAuthPayload": "./types/AddSlackAuthPayload#AddSlackAuthPayloadSource",
Expand Down Expand Up @@ -140,11 +141,12 @@
"TemplateScale": "../../postgres/types/index#TemplateScale as TemplateScaleDB",
"TemplateScaleRef": "../../postgres/types/index#TemplateScaleRef as TemplateScaleRefDB",
"Threadable": "./types/Threadable#ThreadableSource",
"OrgIntegrationProviders": "./types/OrgIntegrationProviders#OrgIntegrationProvidersSource",
"OrganizationUser": "../../postgres/types/index#OrganizationUser as OrganizationUserDB",
"PokerMeeting": "../../database/types/MeetingPoker#default as MeetingPoker",
"PokerMeetingMember": "../../database/types/MeetingPokerMeetingMember#default as PokerMeetingMemberDB",
"PokerTemplate": "../../database/types/PokerTemplate#default as PokerTemplateDB",
"RRule": "rrule#RRule",
"RRule": "rrule-rust#RRuleSet",
"Reactable": "../../database/types/Reactable#Reactable",
"Reactji": "../types/Reactji#ReactjiSource",
"ReflectPrompt": "../../database/types/RetrospectivePrompt#default",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.46.2",
"version": "7.47.0",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down Expand Up @@ -87,7 +87,8 @@
"@graphql-codegen/typescript-resolvers": "^4.0.1",
"@graphql-tools/merge": "^9.0.0",
"@sucrase/webpack-loader": "^2.0.0",
"@swc/core": "^1.3.96",
"@swc/core": "^1.7.22",
"@swc/jest": "^0.2.36",
"@tailwindcss/container-queries": "^0.1.0",
"@tailwindcss/forms": "^0.5.3",
"@types/dotenv": "^6.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/chronos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chronos",
"version": "7.46.2",
"version": "7.47.0",
"description": "A cron job scheduler",
"author": "Matt Krick <matt.krick@gmail.com>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/chronos#readme",
Expand All @@ -25,6 +25,6 @@
},
"dependencies": {
"cron": "^2.3.1",
"parabol-server": "7.46.2"
"parabol-server": "7.47.0"
}
}
22 changes: 12 additions & 10 deletions packages/client/components/AnalyticsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,18 @@ if (datadogEnabled) {
datadogRum.startSessionReplayRecording()
}

amplitude.init(window.__ACTION__.AMPLITUDE_WRITE_KEY, {
defaultTracking: {
attribution: false,
pageViews: false,
sessions: false,
formInteractions: false,
fileDownloads: false
},
logLevel: __PRODUCTION__ ? amplitude.Types.LogLevel.None : amplitude.Types.LogLevel.Debug
})
if (window.__ACTION__.AMPLITUDE_WRITE_KEY) {
amplitude.init(window.__ACTION__.AMPLITUDE_WRITE_KEY, {
defaultTracking: {
attribution: false,
pageViews: false,
sessions: false,
formInteractions: false,
fileDownloads: false
},
logLevel: __PRODUCTION__ ? amplitude.Types.LogLevel.None : amplitude.Types.LogLevel.Debug
})
}

const AnalyticsPage = () => {
const atmosphere = useAtmosphere()
Expand Down
6 changes: 6 additions & 0 deletions packages/client/components/Dashboard/DashSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
AUTHENTICATION_PAGE,
BILLING_PAGE,
MEMBERS_PAGE,
ORG_INTEGRATIONS_PAGE,
ORG_SETTINGS_PAGE,
TEAMS_PAGE
} from '../../utils/constants'
Expand Down Expand Up @@ -123,6 +124,11 @@ const DashSidebar = (props: Props) => {
href={`/me/organizations/${orgId}/${ORG_SETTINGS_PAGE}`}
label={'Organization Settings'}
/>
<NavItem
icon={'appRegistration'}
href={`/me/organizations/${orgId}/${ORG_INTEGRATIONS_PAGE}`}
label={'Integration Settings'}
/>
<NavItem
icon={'key'}
href={`/me/organizations/${orgId}/${AUTHENTICATION_PAGE}`}
Expand Down
2 changes: 2 additions & 0 deletions packages/client/components/Dashboard/LeftDashNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from '@emotion/styled'
import {
AccountBox,
Add,
AppRegistration,
ArrowBack,
AutoAwesome,
CreditScore,
Expand Down Expand Up @@ -72,6 +73,7 @@ const iconLookup = {
groups: <Groups fontSize='inherit' />,
warning: <Warning fontSize='inherit' />,
work: <WorkOutline fontSize='inherit' />,
appRegistration: <AppRegistration fontSize='inherit' />,
timeline: <Timeline fontSize='inherit' />,
key: <Key fontSize='inherit' />
}
Expand Down
7 changes: 7 additions & 0 deletions packages/client/components/Dashboard/MobileDashSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
AUTHENTICATION_PAGE,
BILLING_PAGE,
MEMBERS_PAGE,
ORG_INTEGRATIONS_PAGE,
ORG_SETTINGS_PAGE,
TEAMS_PAGE
} from '../../utils/constants'
Expand Down Expand Up @@ -169,6 +170,12 @@ const MobileDashSidebar = (props: Props) => {
href={`/me/organizations/${orgId}/${ORG_SETTINGS_PAGE}`}
label={'Organization Settings'}
/>
<NavItem
onClick={handleMenuClick}
icon={'appRegistration'}
href={`/me/organizations/${orgId}/${ORG_INTEGRATIONS_PAGE}`}
label={'Integration Settings'}
/>
<NavItem
onClick={handleMenuClick}
icon={'key'}
Expand Down
4 changes: 2 additions & 2 deletions packages/client/components/OrgAdminActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ export const OrgAdminActionMenu = (props: Props) => {
const {viewerId} = atmosphere
const {role, user} = organizationUser
const {id: userId} = user
const isSelf = viewerId === userId
const orgAdminCount = billingLeaders.filter(
(billingLeader) => billingLeader.role === 'ORG_ADMIN'
).length
const canEdit = isViewerOrgAdmin || (isViewerBillingLeaderPlus && role !== 'ORG_ADMIN')
const canEdit = isSelf || isViewerOrgAdmin || (isViewerBillingLeaderPlus && role !== 'ORG_ADMIN')
const isViewerLastOrgAdmin = isViewerOrgAdmin && orgAdminCount === 1
const isViewerLastRole = isViewerBillingLeaderPlus && billingLeaders.length === 1

Expand All @@ -80,7 +81,6 @@ export const OrgAdminActionMenu = (props: Props) => {

const isOrgAdmin = role === 'ORG_ADMIN'
const isBillingLeader = role === 'BILLING_LEADER'
const isSelf = viewerId === userId
const roleName = role === 'ORG_ADMIN' ? 'Org Admin' : 'Billing Leader'
const canRemoveRole =
role &&
Expand Down
25 changes: 10 additions & 15 deletions packages/client/components/Recurrence/RecurrenceSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import clsx from 'clsx'
import dayjs from 'dayjs'
import dayjs, {Dayjs} from 'dayjs'
import timezonePlugin from 'dayjs/plugin/timezone'
import utcPlugin from 'dayjs/plugin/utc'
import React, {PropsWithChildren, useEffect} from 'react'
import {Frequency, RRule} from 'rrule'
import {MenuPosition} from '../../hooks/useCoords'
import useMenu from '../../hooks/useMenu'
import {getJSDateFromRRuleDate, getRRuleDateFromJSDate} from '../../shared/rruleUtil'
import {fromRRuleDateTime, toRRuleDateTime} from '../../shared/rruleUtil'
import plural from '../../utils/plural'
import DropdownMenuToggle from '../DropdownMenuToggle'
import {toHumanReadable} from './HumanReadableRecurrenceRule'
import {Day, RecurrenceDayCheckbox} from './RecurrenceDayCheckbox'
import {RecurrenceTimePicker} from './RecurrenceTimePicker'
dayjs.extend(utcPlugin)

dayjs.extend(utcPlugin)
dayjs.extend(timezonePlugin)
export const ALL_DAYS: Day[] = [
{
name: 'Monday',
Expand Down Expand Up @@ -174,16 +176,10 @@ export const RecurrenceSettings = (props: Props) => {
? rrule.options.byweekday.map((weekday) => ALL_DAYS.find((day) => day.intVal === weekday)!)
: []
)
const [recurrenceStartTime, setRecurrenceStartTime] = React.useState<Date>(
const [recurrenceStartTime, setRecurrenceStartTime] = React.useState<Dayjs>(
rrule
? getJSDateFromRRuleDate(rrule.options.dtstart)
: dayjs()
.add(1, 'day')
.set('hour', 6)
.set('minute', 0)
.set('second', 0)
.set('millisecond', 0)
.toDate() // suggest 6:00 AM tomorrow
? fromRRuleDateTime(rrule)
: dayjs().add(1, 'day').set('hour', 6).set('minute', 0).set('second', 0).set('millisecond', 0) // suggest 6:00 AM tomorrow
)

const {timeZone} = Intl.DateTimeFormat().resolvedOptions()
Expand Down Expand Up @@ -222,14 +218,13 @@ export const RecurrenceSettings = (props: Props) => {
freq: Frequency.WEEKLY,
interval: recurrenceInterval,
byweekday: recurrenceDays.map((day) => day.rruleVal),
dtstart: getRRuleDateFromJSDate(recurrenceStartTime),
dtstart: toRRuleDateTime(recurrenceStartTime),
tzid: timeZone
})
: null

onRruleUpdated(rrule)
}, [recurrenceDays, recurrenceInterval, recurrenceStartTime])

return (
<div className='space-y-4 p-4'>
<div className='space-y-1'>
Expand Down Expand Up @@ -292,7 +287,7 @@ export const RecurrenceSettings = (props: Props) => {
<Label>Each instance starts at</Label>
<DropdownMenuToggle
className='w-full text-sm'
defaultText={`${dayjs(recurrenceStartTime).format('h:mm A')} (${timeZone})`}
defaultText={`${recurrenceStartTime.local().format('h:mm A')} (${timeZone})`}
onClick={togglePortal}
ref={originRef}
size='small'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dayjs from 'dayjs'
import dayjs, {Dayjs} from 'dayjs'
import ms from 'ms'
import React from 'react'
import {MenuProps} from '../../hooks/useMenu'
Expand All @@ -7,7 +7,7 @@ import MenuItem from '../MenuItem'

interface Props {
menuProps: MenuProps
onClick: (n: Date) => void
onClick: (n: Dayjs) => void
}

const OPTIONS = [...Array(96).keys()].map((n) => n * ms('15m'))
Expand All @@ -16,20 +16,19 @@ const DEFAULT_MEETING_START_TIME_IDX = OPTIONS.findIndex((n) => n === ms('6h'))

export const RecurrenceTimePicker = (props: Props) => {
const {menuProps, onClick} = props
const startOfToday = new Date().setHours(0, 0, 0, 0)
return (
<Menu
{...menuProps}
ariaLabel={'Select the time when a recurring meeting will be created'}
defaultActiveIdx={DEFAULT_MEETING_START_TIME_IDX}
>
{OPTIONS.map((n, idx) => {
const proposedTime = dayjs(startOfToday + n).add(1, 'day')
const proposedTime = dayjs().add(1, 'day').startOf('day').add(n, 'ms')
return (
<MenuItem
key={idx}
label={proposedTime.format('h:mm A')}
onClick={() => onClick(proposedTime.toDate())}
onClick={() => onClick(proposedTime)}
/>
)
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const UpdateRecurrenceSettingsModal = (props: Props) => {
return (
<UpdateRecurrenceSettingsModalRoot>
<input
className='form-input rounded border border-solid border-slate-500 p-2 font-sans text-base hover:border-slate-600 focus:border-slate-600 focus:outline-none focus:ring-1 focus:ring-slate-600'
className='form-input border-none p-4 font-sans text-base outline-none focus:outline-none focus:ring-1 focus:ring-slate-600'
type='text'
name='title'
placeholder={placeholder}
Expand Down
3 changes: 2 additions & 1 deletion packages/client/components/Settings/SettingsWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import styled from '@emotion/styled'
import {Layout} from '../../types/constEnums'

const SettingsWrapper = styled('div')<{narrow?: boolean}>(({narrow}) => ({
display: 'flex',
flexDirection: 'column',
margin: '0 auto',
maxWidth: narrow ? 644 : 768,
maxWidth: narrow ? Layout.SETTINGS_NARROW_MAX_WIDTH : Layout.SETTINGS_MAX_WIDTH,
width: '100%'
}))

Expand Down
7 changes: 1 addition & 6 deletions packages/client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ module.exports = {
testEnvironment: 'node',
transform: {
'\\.(gql|graphql)$': '../server/__tests__/jest-transform-graphql-shim.js',
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: false
}
]
'^.+\\.(t|j)sx?$': ['@swc/jest']
},
modulePaths: ['<rootDir>/packages/'],
moduleNameMapper: {
Expand Down
Loading

0 comments on commit 5843139

Please sign in to comment.