mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge intermediate component wrappers into OL-prefixed components (#34996)
* Merge intermediate component wrappers into OL-prefixed components * Replace all intermediate wrapper consumers with OL-prefixed components directly * Fix jsx/js files still importing deleted shim components * Remove duplicate OLNotification imports left by first pass * Rename OLTagIcon to TagIcon, remove OL prefix * Rename OLDropdownMenuItem to DropdownMenuItem, remove OL prefix * Remove OLNotification, use Notification directly * Move Notification to the main shared component folder * Update tag-icon import path out of ol/ * Move TagIcon to the main shared component folder * Update dropdown-menu-item import path out of ol/ * Move DropdownMenuItem to the main shared component folder * Fix dropdown-menu-item import path to dropdown/ subfolder * Remove BS5 alias prefixes from shared components * Restore notification-list wrapper in Notification component * Add translation for loading button * Remove redundant import aliasing * Resolve conflicts * Restore notification container `notification-list` GitOrigin-RevId: 24a5af18599a3e02ac6fd61c09cf5a49ef6e0020
This commit is contained in:
+4
-2
@@ -11,7 +11,7 @@ import { FigureModalCurrentProjectSource } from './file-sources/figure-modal-pro
|
||||
import { FigureModalUploadFileSource } from './file-sources/figure-modal-upload-source'
|
||||
import { FigureModalUrlSource } from './file-sources/figure-modal-url-source'
|
||||
import { useCallback } from 'react'
|
||||
import OLNotification from '@/shared/components/ol/ol-notification'
|
||||
import Notification from '@/shared/components/notification'
|
||||
|
||||
const sourceModes = new Map([
|
||||
[FigureModalSource.FILE_TREE, FigureModalCurrentProjectSource],
|
||||
@@ -44,7 +44,9 @@ export default function FigureModalBody() {
|
||||
return (
|
||||
<>
|
||||
{error && (
|
||||
<OLNotification type="error" onDismiss={onDismiss} content={error} />
|
||||
<div className="notification-list">
|
||||
<Notification type="error" onDismiss={onDismiss} content={error} />
|
||||
</div>
|
||||
)}
|
||||
<Body />
|
||||
<FigureModalFigureOptions />
|
||||
|
||||
+10
-8
@@ -5,7 +5,7 @@ import { useCurrentProjectFolders } from '@/features/source-editor/hooks/use-cur
|
||||
import OLFormControl from '@/shared/components/ol/ol-form-control'
|
||||
import OLFormLabel from '@/shared/components/ol/ol-form-label'
|
||||
import OLFormGroup from '@/shared/components/ol/ol-form-group'
|
||||
import OLNotification from '@/shared/components/ol/ol-notification'
|
||||
import Notification from '@/shared/components/notification'
|
||||
|
||||
type FileNameInputProps = Omit<
|
||||
React.ComponentProps<typeof OLFormControl>,
|
||||
@@ -85,13 +85,15 @@ export const FileNameInput = ({
|
||||
<OLFormLabel>{label}</OLFormLabel>
|
||||
<OLFormControl onFocus={onFocus} {...props} />
|
||||
{overlap && (
|
||||
<OLNotification
|
||||
type="warning"
|
||||
content={t(
|
||||
'a_file_with_that_name_already_exists_and_will_be_overriden'
|
||||
)}
|
||||
className="mt-1 mb-0"
|
||||
/>
|
||||
<div className="notification-list">
|
||||
<Notification
|
||||
type="warning"
|
||||
content={t(
|
||||
'a_file_with_that_name_already_exists_and_will_be_overriden'
|
||||
)}
|
||||
className="mt-1 mb-0"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</OLFormGroup>
|
||||
</>
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
import { mathPreviewStateField } from '../extensions/math-preview'
|
||||
import { getTooltip } from '@codemirror/view'
|
||||
import ReactDOM from 'react-dom'
|
||||
import OLDropdownMenuItem from '@/shared/components/ol/ol-dropdown-menu-item'
|
||||
import DropdownMenuItem from '@/shared/components/dropdown/dropdown-menu-item'
|
||||
|
||||
const MathPreviewTooltipContainer: FC = () => {
|
||||
const state = useCodeMirrorStateContext()
|
||||
@@ -94,7 +94,7 @@ const MathPreviewTooltipMenu: FC = () => {
|
||||
/>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu flip={false}>
|
||||
<OLDropdownMenuItem
|
||||
<DropdownMenuItem
|
||||
onClick={onHide}
|
||||
description={t('temporarily_hides_the_preview')}
|
||||
trailingIcon={
|
||||
@@ -104,13 +104,13 @@ const MathPreviewTooltipMenu: FC = () => {
|
||||
}
|
||||
>
|
||||
{t('hide')}
|
||||
</OLDropdownMenuItem>
|
||||
<OLDropdownMenuItem
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onClick={openDisableModal}
|
||||
description={t('permanently_disables_the_preview')}
|
||||
>
|
||||
{t('disable')}
|
||||
</OLDropdownMenuItem>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user