Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into chore/mattermostPlu…
Browse files Browse the repository at this point in the history
…ginModuleFederation
  • Loading branch information
Dschoordsch committed Dec 16, 2024
2 parents 8d5f7a4 + a14a7ab commit aa93cbb
Show file tree
Hide file tree
Showing 107 changed files with 748 additions and 1,371 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "8.11.0"
".": "8.12.3"
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ This project adheres to [Semantic Versioning](http://semver.org/).

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

## [8.12.3](https://github.com/ParabolInc/parabol/compare/v8.12.2...v8.12.3) (2024-12-13)


### Fixed

* Refresh the SAML request URL for each login attempt ([#10593](https://github.com/ParabolInc/parabol/issues/10593)) ([22d89e5](https://github.com/ParabolInc/parabol/commit/22d89e50a5d97ff1ed8ccf8596e42aa066ad00de))

## [8.12.2](https://github.com/ParabolInc/parabol/compare/v8.12.1...v8.12.2) (2024-12-12)


### Fixed

* Discussion bugs ([#10596](https://github.com/ParabolInc/parabol/issues/10596)) ([5114948](https://github.com/ParabolInc/parabol/commit/511494880a06adc99f93c2b4f762f2082a29842b))

## [8.12.1](https://github.com/ParabolInc/parabol/compare/v8.12.0...v8.12.1) (2024-12-12)


### Fixed

* add useEventCallback on keyboard shortcuts ([#10585](https://github.com/ParabolInc/parabol/issues/10585)) ([39e7ad1](https://github.com/ParabolInc/parabol/commit/39e7ad1e6515b737cc3248b553ba64677d01de77))

## [8.12.0](https://github.com/ParabolInc/parabol/compare/v8.11.0...v8.12.0) (2024-12-11)


### Added

* move Comment to TipTap ([#10576](https://github.com/ParabolInc/parabol/issues/10576)) ([2fa20b1](https://github.com/ParabolInc/parabol/commit/2fa20b164907f3849fc10dff74de35f732791fb7))


### Changed

* Properly ignore supposedly ignored errors ([#10580](https://github.com/ParabolInc/parabol/issues/10580)) ([9572815](https://github.com/ParabolInc/parabol/commit/9572815497b2e6f9c74cf0f7d4dd6502153c6fe3))

## [8.11.0](https://github.com/ParabolInc/parabol/compare/v8.10.0...v8.11.0) (2024-12-10)


Expand Down
2 changes: 1 addition & 1 deletion codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"CreateStripeSubscriptionSuccess": "./types/CreateStripeSubscriptionSuccess#CreateStripeSubscriptionSuccessSource",
"CreateTaskPayload": "./types/CreateTaskPayload#CreateTaskPayloadSource",
"DeleteCommentSuccess": "./types/DeleteCommentSuccess#DeleteCommentSuccessSource",
"Discussion": "../../postgres/queries/generated/getDiscussionsByIdsQuery#IGetDiscussionsByIdsQueryResult",
"Discussion": "../../postgres/types/index#Discussion",
"DomainJoinRequest": "../../database/types/DomainJoinRequest#default as DomainJoinRequestDB",
"EndTeamPromptSuccess": "./types/EndTeamPromptSuccess#EndTeamPromptSuccessSource",
"File": "./types/File#TFile",
Expand Down
2 changes: 1 addition & 1 deletion 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": "8.11.0",
"version": "8.12.3",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
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": "8.11.0",
"version": "8.12.3",
"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": "8.11.0"
"parabol-server": "8.12.3"
}
}
26 changes: 20 additions & 6 deletions packages/client/Atmosphere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ConcreteRequest,
Environment,
FetchFunction,
FetchQueryFetchPolicy,
GraphQLResponse,
GraphQLTaggedNode,
Network,
Expand Down Expand Up @@ -217,7 +218,9 @@ export default class Atmosphere extends Environment {
: value
_next(nextObj)
}
this.handleSubscribePromise(operation, variables, _cacheConfig, sink).catch()
this.handleSubscribePromise(operation, variables, _cacheConfig, sink).catch(() => {
/*ignore*/
})
})
}

Expand Down Expand Up @@ -297,7 +300,9 @@ export default class Atmosphere extends Environment {
let data = request.id
if (!__PRODUCTION__) {
try {
const queryMap = await import('../../queryMap.json').catch()
const queryMap = await import('../../queryMap.json').catch(() => {
/*ignore*/
})
data = queryMap[request.id as keyof typeof queryMap] as string
} catch (e) {
return
Expand Down Expand Up @@ -336,13 +341,22 @@ export default class Atmosphere extends Environment {

fetchQuery = async <T extends OperationType>(
taggedNode: GraphQLTaggedNode,
variables: Variables = {}
variables: Variables = {},
cacheConfig?: {
networkCacheConfig?: CacheConfig
fetchPolicy?: FetchQueryFetchPolicy
}
) => {
let res: T['response']
try {
res = await fetchQuery<T>(this, taggedNode, variables, {
fetchPolicy: 'store-or-network'
}).toPromise()
res = await fetchQuery<T>(
this,
taggedNode,
variables,
cacheConfig ?? {
fetchPolicy: 'store-or-network'
}
).toPromise()
} catch (e) {
return null
}
Expand Down
4 changes: 3 additions & 1 deletion packages/client/components/ActionMeetingSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ const ActionMeetingSidebar = (props: Props) => {
} = itemStage || {}
const canNavigate = isViewerFacilitator ? isNavigableByFacilitator : isNavigable
const handleClick = () => {
gotoStageId(itemStageId).catch()
gotoStageId(itemStageId).catch(() => {
/*ignore*/
})
handleMenuClick()
}
const phaseCount =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const ActionSidebarAgendaItemsSection = (props: Props) => {
)
const {team} = meeting
const handleClick = async (stageId: string) => {
gotoStageId(stageId).catch()
gotoStageId(stageId).catch(() => {
/*ignore*/
})
handleMenuClick()
}
// show agenda (no blur) at all times if the updates phase isNavigable
Expand Down
5 changes: 2 additions & 3 deletions packages/client/components/AddPollButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ const AddPollLabel = styled('div')({

interface Props {
onClick: () => void
dataCy: string
disabled?: boolean
}

const AddPollButton = (props: Props) => {
const {onClick, dataCy, disabled} = props
const {onClick, disabled} = props

return (
<StyledPlainButton data-cy={`${dataCy}-add`} onClick={onClick} disabled={disabled}>
<StyledPlainButton onClick={onClick} disabled={disabled}>
<AddPollIcon />
<AddPollLabel>Add a poll</AddPollLabel>
</StyledPlainButton>
Expand Down
5 changes: 2 additions & 3 deletions packages/client/components/AddTaskButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ const AddTaskLabel = styled('div')({

interface Props {
onClick: () => void
dataCy: string
disabled?: boolean
}

const AddTaskButton = (props: Props) => {
const {onClick, dataCy, disabled} = props
const {onClick, disabled} = props

return (
<StyledPlainButton data-cy={`${dataCy}-add`} onClick={onClick} disabled={disabled}>
<StyledPlainButton onClick={onClick} disabled={disabled}>
<AddTaskIcon />
<AddTaskLabel>Add a task</AddTaskLabel>
</StyledPlainButton>
Expand Down
4 changes: 3 additions & 1 deletion packages/client/components/AnalyticsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ const AnalyticsPage = () => {
window.localStorage.setItem(LocalStorageKey.EMAIL, email)
safeIdentify(atmosphere.viewerId, email)
}
cacheEmail().catch()
cacheEmail().catch(() => {
/*ignore*/
})
}, [])

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ class AtmosphereProvider extends Component<Props> {
constructor(props: Props) {
super(props)
if (props.getLocalAtmosphere) {
this.loadDemo().catch()
this.loadDemo().catch(() => {
/*ignore*/
})
} else {
this.atmosphere = new Atmosphere()
this.atmosphere.getAuthToken(window)
}
}

async loadDemo() {
const LocalAtmosphere = await this.props.getLocalAtmosphere!()
.then((mod) => mod.default)
.catch()
const LocalAtmosphere = await this.props.getLocalAtmosphere!().then((mod) => mod.default)
this.atmosphere = new LocalAtmosphere()
this.forceUpdate()
}
Expand Down
4 changes: 3 additions & 1 deletion packages/client/components/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const AuthProvider = () => {
setError('Error logging in')
}
}
callOpener().catch()
callOpener().catch(() => {
/*ignore*/
})
}, [])

if (!error) return null
Expand Down
4 changes: 1 addition & 3 deletions packages/client/components/CommentAuthorOptionsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ const StyledIcon = styled(MoreVert)({
interface Props {
commentId: string
editComment: () => void
dataCy: string
meetingId: string
}

const CommentAuthorOptionsButton = (props: Props) => {
const {commentId, editComment, dataCy, meetingId} = props
const {commentId, editComment, meetingId} = props
const {togglePortal, originRef, menuPortal, menuProps} = useMenu(MenuPosition.UPPER_RIGHT)
return (
<StyledButton
data-cy={`${dataCy}-dropdown-menu`}
onMouseEnter={CommentAuthorOptionsDropdown.preload}
ref={originRef}
onClick={togglePortal}
Expand Down
34 changes: 9 additions & 25 deletions packages/client/components/DiscussionMentioned.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import {Editor} from 'draft-js'
import {useFragment} from 'react-relay'
import NotificationAction from '~/components/NotificationAction'
import {DiscussionMentioned_notification$key} from '../__generated__/DiscussionMentioned_notification.graphql'
import useEditorState from '../hooks/useEditorState'
import useRouter from '../hooks/useRouter'
import {cardShadow} from '../styles/elevation'
import {useTipTapCommentEditor} from '../hooks/useTipTapCommentEditor'
import anonymousAvatar from '../styles/theme/images/anonymous-avatar.svg'
import fromStageIdToUrl from '../utils/meetings/fromStageIdToUrl'
import NotificationTemplate from './NotificationTemplate'

const EditorWrapper = styled('div')({
backgroundColor: '#fff',
borderRadius: 4,
boxShadow: cardShadow,
fontSize: 14,
lineHeight: '20px',
margin: '4px 0 0',
padding: 8
})
import {TipTapEditor} from './promptResponse/TipTapEditor'

interface Props {
notification: DiscussionMentioned_notification$key
Expand Down Expand Up @@ -74,24 +62,20 @@ const DiscussionMentioned = (props: Props) => {
)
}

const [editorState] = useEditorState(comment.content)

const {editor} = useTipTapCommentEditor(comment.content, {
readOnly: true
})
if (!editor) return null
return (
<NotificationTemplate
avatar={authorPicture}
message={`${authorName} mentioned you in a discussion in ${meetingName}.`}
notification={notification}
action={<NotificationAction label={'See the discussion'} onClick={goThere} />}
>
<EditorWrapper>
<Editor
readOnly
editorState={editorState}
onChange={() => {
/*noop*/
}}
/>
</EditorWrapper>
<div className='my-1 rounded bg-white p-2 text-sm leading-5 shadow-card'>
<TipTapEditor editor={editor} />
</div>
</NotificationTemplate>
)
}
Expand Down
15 changes: 5 additions & 10 deletions packages/client/components/DiscussionThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ const DiscussionThread = (props: Props) => {
} = props
const {viewerId} = useAtmosphere()
const isDrawer = !!width // hack to say this is in a poker meeting
const listRef = useRef<HTMLDivElement>(null)
const editorRef = useRef<HTMLTextAreaElement>(null)
const ref = useRef<HTMLDivElement>(null)
const data = usePreloadedQuery<DiscussionThreadQuery>(
graphql`
Expand All @@ -66,7 +64,9 @@ const DiscussionThread = (props: Props) => {
...DiscussionThreadInput_discussion
...DiscussionThreadList_discussion
id
replyingToCommentId
replyingTo {
id
}
commentors {
id
preferredName
Expand Down Expand Up @@ -108,7 +108,7 @@ const DiscussionThread = (props: Props) => {
return <div>No discussion found!</div>
}

const {replyingToCommentId, thread} = discussion
const {replyingTo, thread} = discussion
const edges = thread?.edges ?? [] // should never happen, but Terry reported it in demo. likely relay error
const threadables = edges.map(({node}) => node)
const getMaxSortOrder = () => {
Expand All @@ -119,13 +119,10 @@ const DiscussionThread = (props: Props) => {
return (
<Wrapper isExpanded={isExpanded} width={width} ref={ref}>
<DiscussionThreadList
dataCy='discuss-thread-list'
discussion={discussion}
allowedThreadables={allowedThreadables}
preferredNames={preferredNames}
threadables={threadables}
ref={listRef}
editorRef={editorRef}
viewer={viewer}
header={header}
emptyState={emptyState}
Expand All @@ -135,9 +132,7 @@ const DiscussionThread = (props: Props) => {
{!showTranscription && (
<DiscussionThreadInput
allowedThreadables={allowedThreadables}
dataCy='discuss-input'
editorRef={editorRef}
isDisabled={!!replyingToCommentId}
isDisabled={!!replyingTo?.id}
getMaxSortOrder={getMaxSortOrder}
discussion={discussion}
viewer={viewer}
Expand Down
Loading

0 comments on commit aa93cbb

Please sign in to comment.