Merge pull request #35739 from overleaf/mfb-bring-main-bibliography-to-top-level

Bring main bibliography file to the top level settings

GitOrigin-RevId: 4c4d4927067995d947c6d0656425760ce56f9435
This commit is contained in:
Maria Florencia Besteiro Gonzalez
2026-09-17 11:36:48 +00:00
committed by Copybot
parent 6f8a1be171
commit 02d36687cd
22 changed files with 406 additions and 13 deletions
@@ -4,7 +4,11 @@ import { PermissionsLevel } from '@/features/ide-react/types/permissions'
export type JoinProjectPayloadProject = Pick<
Project,
Exclude<keyof Project, ['rootDocId', 'publicAccessLevel']>
> & { rootDoc_id?: string; publicAccesLevel?: string }
> & {
rootDoc_id?: string
mainBibliographyDoc_id?: string
publicAccesLevel?: string
}
export type JoinProjectPayload = {
permissionsLevel: PermissionsLevel
@@ -103,12 +103,18 @@ export const IdeReactProvider: FC<React.PropsWithChildren> = ({ children }) => {
function handleJoinProjectResponse({
project: {
rootDoc_id: rootDocId,
mainBibliographyDoc_id: mainBibliographyDocId,
publicAccesLevel: publicAccessLevel,
..._project
},
permissionsLevel,
}: JoinProjectPayload) {
const project = { ..._project, rootDocId, publicAccessLevel }
const project = {
..._project,
rootDocId,
mainBibliographyDocId,
publicAccessLevel,
}
// Cast the project from the payload as ProjectMetadata to ensure it has
// the correct type for the context. It must be close enough because the