mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 16:50:44 +02:00
d7ad742ba3
Add file breadcrumbs to new editor GitOrigin-RevId: 54bde446ad632976503a2c4aff915c862bad710e
20 lines
485 B
TypeScript
20 lines
485 B
TypeScript
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
|
|
import { showPanel } from '@codemirror/view'
|
|
|
|
export function createBreadcrumbsPanel() {
|
|
const dom = document.createElement('div')
|
|
dom.classList.add('ol-cm-breadcrumbs-portal')
|
|
return { dom, top: true }
|
|
}
|
|
|
|
/**
|
|
* A panel which contains the editor breadcrumbs
|
|
*/
|
|
export const breadcrumbPanel = () => {
|
|
if (!isSplitTestEnabled('editor-redesign')) {
|
|
return []
|
|
}
|
|
|
|
return [showPanel.of(createBreadcrumbsPanel)]
|
|
}
|