Files
overleaf-cep/services/web/frontend/js/features/source-editor/extensions/breadcrumbs-panel.ts
T
David d7ad742ba3 Merge pull request #23747 from overleaf/dp-breadcrumbs
Add file breadcrumbs to new editor

GitOrigin-RevId: 54bde446ad632976503a2c4aff915c862bad710e
2025-03-11 09:05:08 +00:00

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)]
}