Merge pull request #16893 from overleaf/jpa-download-pdf-dashboard-for-all

[web] enable button for downloading PDFs from dashboard for all users

GitOrigin-RevId: bd46675bc75a7772824081e3e5e3043f282594a1
This commit is contained in:
Jakob Ackermann 2024-02-05 10:43:48 +00:00 committed by Copybot
parent 8bd917242b
commit 621301618f
5 changed files with 5 additions and 27 deletions

View file

@ -327,13 +327,6 @@ async function projectListPage(req, res, next) {
}
}
// The assignment will be picked up via 'ol-splitTestVariants' in react.
await SplitTestHandler.promises.getAssignment(
req,
res,
'download-pdf-dashboard'
)
const hasPaidAffiliation = userAffiliations.some(
affiliation => affiliation.licence && affiliation.licence !== 'free'
)

View file

@ -12,7 +12,6 @@ import LeaveProjectButton from '../table/cells/action-buttons/leave-project-butt
import DeleteProjectButton from '../table/cells/action-buttons/delete-project-button'
import { Project } from '../../../../../../types/project/dashboard/api'
import CompileAndDownloadProjectPDFButton from '../table/cells/action-buttons/compile-and-download-project-pdf-button'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
type ActionButtonProps = {
project: Project
@ -219,12 +218,10 @@ function ActionsDropdown({ project }: ActionDropdownProps) {
project={project}
onClick={handleClose}
/>
{isSplitTestEnabled('download-pdf-dashboard') && (
<CompileAndDownloadProjectPDFButtonMenuItem
project={project}
onClick={handleClose}
/>
)}
<ArchiveProjectButtonMenuItem project={project} onClick={handleClose} />
<TrashProjectButtonMenuItem project={project} onClick={handleClose} />
<UnarchiveProjectButtonMenuItem

View file

@ -8,7 +8,6 @@ import { DownloadProjectButtonTooltip } from './action-buttons/download-project-
import { LeaveProjectButtonTooltip } from './action-buttons/leave-project-button'
import { DeleteProjectButtonTooltip } from './action-buttons/delete-project-button'
import { CompileAndDownloadProjectPDFButtonTooltip } from './action-buttons/compile-and-download-project-pdf-button'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
type ActionsCellProps = {
project: Project
@ -19,9 +18,7 @@ export default function ActionsCell({ project }: ActionsCellProps) {
<>
<CopyProjectButtonTooltip project={project} />
<DownloadProjectButtonTooltip project={project} />
{isSplitTestEnabled('download-pdf-dashboard') && (
<CompileAndDownloadProjectPDFButtonTooltip project={project} />
)}
<ArchiveProjectButtonTooltip project={project} />
<TrashProjectButtonTooltip project={project} />
<UnarchiveProjectButtonTooltip project={project} />

View file

@ -5,9 +5,6 @@ import { projectsData } from '../../../test/frontend/features/project-list/fixtu
export const Successful = (args: any) => {
window.user_id = '624333f147cfd8002622a1d3'
window.metaAttributesCache.set('ol-splitTestVariants', {
'download-pdf-dashboard': 'enabled',
})
useFetchMock(fetchMock => {
fetchMock.post(/\/api\/project/, {
projects: projectsData,
@ -36,9 +33,6 @@ export const Successful = (args: any) => {
export const Failure = (args: any) => {
window.user_id = '624333f147cfd8002622a1d3'
window.metaAttributesCache.set('ol-splitTestVariants', {
'download-pdf-dashboard': 'enabled',
})
useFetchMock(fetchMock => {
fetchMock.post(/\/api\/project/, {
projects: projectsData,

View file

@ -11,9 +11,6 @@ describe('<ProjectListTable />', function () {
beforeEach(function () {
window.metaAttributesCache = new Map()
window.metaAttributesCache.set('ol-tags', [])
window.metaAttributesCache.set('ol-splitTestVariants', {
'download-pdf-dashboard': 'enabled',
})
window.user_id = userId
fetchMock.reset()
})