Merge pull request #4257 from overleaf/ae-file-views-beta

Roll out new file view UI to beta users

GitOrigin-RevId: c8665c5043ad55dd530989fb3b9c51f21858fcac
This commit is contained in:
Alf Eaton 2021-07-05 11:39:38 +01:00 committed by Copybot
parent 3fb6ea4ea5
commit 2be1a44eda
3 changed files with 12 additions and 1 deletions

View file

@ -887,7 +887,7 @@ const ProjectController = {
),
showNewFileViewUI: shouldDisplayFeature(
'new_file_view',
user.alphaProgram
user.alphaProgram || user.betaProgram
),
showSymbolPalette: shouldDisplayFeature(
'symbol_palette',

View file

@ -9,6 +9,7 @@ import { useProjectContext } from '../../../shared/context/project-context'
import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
import useAbortController from '../../../shared/hooks/use-abort-controller'
import BetaBadge from '../../../shared/components/beta-badge'
const tprLinkedFileInfo = importOverleafModules('tprLinkedFileInfo')
const tprLinkedFileRefreshError = importOverleafModules(
'tprLinkedFileRefreshError'
@ -105,6 +106,12 @@ export default function FileViewHeader({ file, storeReferencesKeys }) {
return (
<div>
<BetaBadge
tooltip={{
id: 'file-view-beta-tooltip',
text: t('beta_badge_tooltip', { feature: 'file views' }),
}}
/>
{file.linkedFileData && fileInfo}
{file.linkedFileData &&
tprLinkedFileInfo.map(({ import: { LinkedFileInfo }, path }) => (

View file

@ -44,4 +44,8 @@
.linked-file-icon {
color: @blue;
}
.beta-badge {
float: left;
}
}