From a12e2001c3387abc69f277b263658d1a3302bd32 Mon Sep 17 00:00:00 2001
From: Alf Eaton
Date: Thu, 6 Mar 2025 10:54:40 +0000
Subject: [PATCH] Remove Bootstrap 3 code from IDE page components (#23061)
GitOrigin-RevId: b41aff10672bf96e892de0be396a69eb25e2443b
---
services/web/.storybook/preview.tsx | 8 +-
.../utils/with-bootstrap-switcher.tsx | 4 +-
services/web/cypress/support/component.ts | 1 +
services/web/cypress/support/ct/window.ts | 1 +
.../support/shared/commands/compile.ts | 9 +-
.../web/frontend/extracted-translations.json | 4 -
.../js/features/chat/components/chat-pane.tsx | 16 +-
.../chat/components/message-input.tsx | 6 +-
.../components/clone-project-tag.tsx | 53 +-
.../components/dictionary-modal-content.tsx | 9 +-
.../components/download-pdf.tsx | 12 +-
.../components/download-source.tsx | 7 +-
.../components/editor-left-menu.tsx | 64 +-
.../components/left-menu-button.tsx | 9 +-
.../settings/settings-dictionary.tsx | 1 -
.../settings/settings-menu-select.tsx | 26 +-
.../components/back-to-projects-button.tsx | 21 +-
.../components/chat-toggle-button.jsx | 23 +-
.../components/history-toggle-button.jsx | 7 +-
.../components/layout-dropdown-button.tsx | 376 +++-------
.../components/menu-button.jsx | 12 +-
.../components/online-users-widget.jsx | 82 +--
.../project-name-editable-label.tsx | 7 +-
.../components/share-project-button.jsx | 7 +-
.../components/toolbar-header.jsx | 23 +-
.../track-changes-toggle-button.jsx | 6 +-
.../components/upgrade-prompt.jsx | 7 +-
.../components/file-tree-context-menu.tsx | 67 +-
.../file-tree-modal-create-file-body.jsx | 5 +-
.../file-tree-modal-create-file-footer.jsx | 1 -
.../file-tree-modal-create-file-mode.jsx | 7 +-
.../modes/file-tree-import-from-project.tsx | 47 +-
.../components/file-tree-folder-icons.tsx | 55 +-
.../file-tree/components/file-tree-icon.tsx | 39 +-
.../file-tree-item-menu-items.tsx | 117 ++-
.../file-tree-item/file-tree-item-menu.tsx | 7 +-
.../components/file-tree-toolbar.tsx | 43 +-
.../modals/file-tree-modal-create-folder.jsx | 7 +-
.../modals/file-tree-modal-delete.jsx | 7 +-
.../file-tree/util/icon-type-from-name.ts | 9 +-
.../file-view/components/file-view-header.tsx | 7 +-
.../file-view/components/file-view-icons.jsx | 24 +-
.../components/file-view-refresh-button.tsx | 10 +-
.../change-list/add-label-modal.tsx | 5 -
.../change-list/all-history-list.tsx | 4 -
.../change-list/dropdown/actions-dropdown.tsx | 77 +-
.../change-list/dropdown/history-dropdown.tsx | 14 +-
.../dropdown/menu-item/compare.tsx | 5 +-
.../dropdown/menu-item/download.tsx | 9 +-
.../dropdown/menu-item/restore-project.tsx | 9 +-
.../change-list/history-version.tsx | 6 +-
.../change-list/label-list-item.tsx | 6 +-
.../components/change-list/tag-tooltip.tsx | 5 -
.../diff-view/document-diff-viewer.tsx | 5 +-
.../modals/restore-project-modal.tsx | 1 -
.../toolbar/toolbar-restore-file-button.tsx | 4 -
...toolbar-restore-file-to-version-button.tsx | 4 -
.../file-tree/history-file-tree-doc.tsx | 19 +-
.../file-tree/history-file-tree-folder.tsx | 58 +-
.../ide-react/components/alerts/alerts.tsx | 1 -
.../alerts/lost-connection-alert.tsx | 1 -
.../components/detach-compile-button.tsx | 33 +-
.../components/pdf-clear-cache-button.tsx | 15 +-
.../pdf-code-check-failed-notice.tsx | 18 +-
.../components/pdf-compile-button.tsx | 362 +++-------
.../components/pdf-download-files-button.tsx | 52 +-
.../pdf-preview/components/pdf-file-list.tsx | 112 +--
.../pdf-hybrid-code-check-button.tsx | 15 +-
.../components/pdf-hybrid-download-button.tsx | 7 +-
.../components/pdf-hybrid-logs-button.tsx | 7 +-
.../components/pdf-log-entry-raw-content.tsx | 4 -
.../components/pdf-preview-error.tsx | 2 -
.../components/pdf-preview-hybrid-toolbar.tsx | 17 +-
.../components/pdf-synctex-controls.tsx | 63 +-
.../components/pdf-zoom-dropdown.tsx | 315 +++-----
.../components/stop-on-first-error-prompt.tsx | 7 +-
.../components/switch-to-editor-button.tsx | 17 +-
.../components/timeout-upgrade-prompt-new.tsx | 1 -
.../components/preview-log-entry-header.tsx | 12 +-
.../preview-logs-pane-max-entries.jsx | 15 +-
.../review-panel-comment-options.tsx | 90 +--
.../review-panel-more-comments-button.tsx | 11 +-
.../review-panel-resolved-threads-button.tsx | 7 +-
...review-panel-track-changes-menu-button.tsx | 11 +-
.../components/add-collaborators.jsx | 3 -
.../components/edit-member.tsx | 51 +-
.../share-project-modal/components/invite.jsx | 14 +-
.../components/link-sharing.jsx | 16 +-
.../components/owner-info.jsx | 7 +-
.../components/select-collaborators.jsx | 117 +--
.../share-project-modal-content.tsx | 20 +-
.../components/transfer-ownership-modal.jsx | 20 +-
.../components/view-member.jsx | 7 +-
.../components/codemirror-search-form.tsx | 41 +-
.../command-tooltip/href-tooltip.tsx | 12 +-
.../command-tooltip/include-tooltip.tsx | 7 +-
.../command-tooltip/input-tooltip.tsx | 7 +-
.../command-tooltip/ref-tooltip.tsx | 7 +-
.../command-tooltip/url-tooltip.tsx | 7 +-
.../figure-modal/figure-modal-footer.tsx | 40 +-
.../figure-modal/figure-modal-options.tsx | 35 +-
.../figure-modal-source-picker.tsx | 28 +-
.../figure-modal-upload-source.tsx | 21 +-
.../components/math-preview-tooltip.tsx | 121 +---
.../paste-html/pasted-content-menu.tsx | 17 +-
.../editor-widgets/editor-widgets.tsx | 17 +-
.../entries/add-comment-entry.tsx | 17 +-
.../entries/aggregate-change-entry.tsx | 22 +-
.../bulk-actions-entry/bulk-actions-entry.tsx | 12 +-
.../review-panel/entries/change-entry.tsx | 22 +-
.../review-panel/entries/comment-entry.tsx | 17 +-
.../components/review-panel/nav.tsx | 12 +-
.../components/review-panel/overview-file.tsx | 7 +-
.../components/review-panel/toggler.tsx | 7 +-
.../toolbar/resolved-comments-dropdown.tsx | 7 +-
.../review-panel/toolbar/toggle-menu.tsx | 7 +-
.../upgrade-track-changes-modal.tsx | 12 +-
.../components/switch-to-pdf-button.jsx | 17 +-
.../toolbar/column-width-modal/modal.tsx | 12 +-
.../toolbar/toolbar-button-menu.tsx | 3 +-
.../toolbar/insert-figure-dropdown.tsx | 29 +-
.../components/toolbar/overflow.tsx | 9 +-
.../components/toolbar/toolbar-button.tsx | 21 +-
.../components/toolbar/toolbar-items.tsx | 37 +-
.../spelling-suggestions-language.tsx | 21 +-
.../spelling/spelling-suggestions.tsx | 116 +--
.../extensions/toolbar/toolbar-panel.ts | 5 +-
.../extensions/visual/table-generator.ts | 9 +-
.../components/word-count-modal-content.jsx | 17 +-
.../web/frontend/stories/chat.stories.jsx | 2 -
.../stories/clone-project-modal.stories.jsx | 2 -
.../editor-left-menu/actions-menu.stories.tsx | 4 -
.../editor-navigation-toolbar.stories.jsx | 2 -
.../stories/editor-switch.stories.jsx | 4 -
.../editor/layout-dropdown-button.stories.tsx | 2 -
.../editor/pdf-compile-button.stories.tsx | 2 -
.../frontend/stories/file-tree.stories.jsx | 2 -
.../stories/file-view/file-view.stories.jsx | 2 -
.../history/document-diff-viewer.stories.tsx | 2 -
.../history/history-version.stories.tsx | 2 -
.../stories/history/label-version.stories.tsx | 2 -
.../stories/history/toggle-switch.stories.tsx | 2 -
.../stories/hotkeys-modal.stories.jsx | 2 -
.../create-file-modal-footer.stories.jsx | 2 -
.../create-file/create-file-modal.stories.jsx | 4 -
.../create-file-name-input.stories.jsx | 4 -
.../create-file/error-message.stories.jsx | 4 -
.../web/frontend/stories/outline.stories.jsx | 2 -
.../stories/pdf-log-entry.stories.tsx | 2 -
.../pdf-preview-error-boundary.stories.jsx | 4 -
.../stories/pdf-preview-messages.stories.jsx | 4 -
.../stories/pdf-preview-messages.stories.tsx | 4 -
.../frontend/stories/pdf-preview.stories.jsx | 26 +-
.../frontend/stories/pdf-viewer.stories.jsx | 4 -
.../stories/share-project-modal.stories.jsx | 2 -
.../source-editor/source-editor.stories.tsx | 4 -
.../stories/word-count-modal.stories.jsx | 2 -
services/web/locales/en.json | 2 -
.../editor-left-menu.spec.tsx | 1 -
.../detach-compile-button.spec.tsx | 1 -
.../pdf-preview/pdf-js-viewer.spec.tsx | 1 -
.../pdf-preview/pdf-logs-entries.spec.tsx | 1 -
.../pdf-preview-detached-root.spec.tsx | 1 -
.../pdf-preview-hybrid-toolbar.spec.tsx | 1 -
.../pdf-preview/pdf-preview.spec.tsx | 49 +-
.../pdf-preview/pdf-synctex-controls.spec.tsx | 5 +-
.../notifications/group-invitation.spec.tsx | 1 -
.../shared/accessible-modal.spec.tsx | 1 -
.../components/shared/beta-badge.spec.tsx | 1 -
.../components/shared/material-icon.spec.tsx | 1 -
.../components/shared/select.spec.tsx | 108 +--
.../shared/split-test-badge.spec.tsx | 5 +-
.../shared/start-free-trial-button.spec.tsx | 1 -
.../components/shared/tooltip.spec.tsx | 1 -
.../token-access/token-access-page.spec.tsx | 1 -
.../layout-dropdown-button.test.jsx | 166 +++--
.../file-tree-create-name-input.spec.tsx | 1 -
.../file-tree-modal-create-file.spec.tsx | 1 -
.../components/file-tree-doc.spec.tsx | 5 +-
.../components/file-tree-folder-list.spec.tsx | 1 -
.../components/file-tree-folder.spec.tsx | 1 -
.../file-tree-item-inner.spec.tsx | 1 -
.../file-tree-item-name.spec.tsx | 1 -
.../components/file-tree-root.spec.tsx | 1 -
.../components/file-tree-toolbar.spec.tsx | 1 -
.../file-tree/flows/context-menu.spec.tsx | 1 -
.../file-tree/flows/create-folder.spec.tsx | 1 -
.../file-tree/flows/delete-entity.spec.tsx | 33 +-
.../file-tree/flows/rename-entity.spec.tsx | 1 -
.../util/icon-type-from-name.test.js | 12 +-
.../components/file-view-header.test.jsx | 2 +-
.../file-view-refresh-button.test.jsx | 13 +-
.../members-table/unlink-user-modal.test.tsx | 1 +
.../components/change-list-bs5.spec.tsx | 681 ------------------
.../history/components/change-list.spec.tsx | 6 +-
.../components/document-diff-viewer.spec.tsx | 1 -
.../history/components/toolbar.spec.tsx | 1 -
.../switch-to-editor-button.spec.tsx | 1 -
.../components/switch-to-pdf-button.spec.tsx | 1 -
.../outline/components/outline-item.spec.tsx | 1 -
.../outline/components/outline-list.spec.tsx | 1 -
.../outline/components/outline-pane.spec.tsx | 1 -
.../outline/components/outline-root.spec.tsx | 1 -
.../upload-project-modal.spec.tsx | 1 -
.../review-panel/review-panel.spec.tsx | 1 -
.../codemirror-editor-autocomplete.spec.tsx | 1 -
.../codemirror-editor-close-brackets.spec.tsx | 1 -
.../codemirror-editor-cursor.spec.tsx | 1 -
.../codemirror-editor-figure-modal.spec.tsx | 107 +--
.../codemirror-editor-fundamentals.spec.tsx | 1 -
.../codemirror-editor-shortcuts.spec.tsx | 1 -
...mirror-editor-spellchecker-client.spec.tsx | 1 -
...codemirror-editor-table-generator.spec.tsx | 11 +-
...ror-editor-visual-command-tooltip.spec.tsx | 1 -
.../codemirror-editor-visual-floats.spec.tsx | 1 -
.../codemirror-editor-visual-list.spec.tsx | 1 -
...demirror-editor-visual-paste-html.spec.tsx | 92 ++-
...codemirror-editor-visual-readonly.spec.tsx | 1 -
.../codemirror-editor-visual-toolbar.spec.tsx | 9 +-
...codemirror-editor-visual-tooltips.spec.tsx | 1 -
.../codemirror-editor-visual.spec.tsx | 1 -
.../components/codemirror-editor.spec.tsx | 1 -
.../frontend/infrastructure/i18n.spec.tsx | 1 -
.../shared/hooks/use-detach-action.spec.tsx | 1 -
.../shared/hooks/use-detach-layout.spec.tsx | 1 -
.../shared/hooks/use-detach-state.spec.tsx | 1 -
.../shared/hooks/use-recaptcha.spec.tsx | 1 -
.../frontend/shared/hooks/use-resize.spec.tsx | 1 -
228 files changed, 1253 insertions(+), 3939 deletions(-)
delete mode 100644 services/web/test/frontend/features/history/components/change-list-bs5.spec.tsx
diff --git a/services/web/.storybook/preview.tsx b/services/web/.storybook/preview.tsx
index 0ed624e087..ed67abc3c4 100644
--- a/services/web/.storybook/preview.tsx
+++ b/services/web/.storybook/preview.tsx
@@ -126,8 +126,8 @@ const preview: Preview = {
// render stories in iframes, to isolate modals
inlineStories: false,
},
- // Default to Bootstrap 3 styles
- bootstrap5: false,
+ // Default to Bootstrap 5 styles
+ bootstrap5: true,
},
globalTypes: {
theme: {
@@ -166,10 +166,10 @@ const preview: Preview = {
const { bootstrap3Style, bootstrap5Style } = context.loaded
const bootstrapVersion = Number(
context.args[bootstrapVersionArg] ||
- (context.parameters.bootstrap5 ? 5 : 3)
+ (context.parameters.bootstrap5 === false ? 3 : 5)
) as 3 | 5
const activeStyle =
- bootstrapVersion === 5 ? bootstrap5Style : bootstrap3Style
+ bootstrapVersion === 3 ? bootstrap3Style : bootstrap5Style
resetMeta(bootstrapVersion)
diff --git a/services/web/.storybook/utils/with-bootstrap-switcher.tsx b/services/web/.storybook/utils/with-bootstrap-switcher.tsx
index 2d6b6a5609..640338dbb0 100644
--- a/services/web/.storybook/utils/with-bootstrap-switcher.tsx
+++ b/services/web/.storybook/utils/with-bootstrap-switcher.tsx
@@ -10,11 +10,11 @@ export const bsVersionDecorator: Meta = {
control: { type: 'inline-radio' },
options: ['3', '5'],
table: {
- defaultValue: { summary: '3' },
+ defaultValue: { summary: '5' },
},
},
},
args: {
- [bootstrapVersionArg]: '3',
+ [bootstrapVersionArg]: '5',
},
}
diff --git a/services/web/cypress/support/component.ts b/services/web/cypress/support/component.ts
index f658b7d2e9..00e359b4ff 100644
--- a/services/web/cypress/support/component.ts
+++ b/services/web/cypress/support/component.ts
@@ -5,6 +5,7 @@ import './shared/commands'
import './shared/exceptions'
import './ct/commands'
import './ct/codemirror'
+import '../../test/frontend/helpers/bootstrap-5'
beforeEach(function () {
resetMeta()
diff --git a/services/web/cypress/support/ct/window.ts b/services/web/cypress/support/ct/window.ts
index ae2a194bc1..3f415cf3c5 100644
--- a/services/web/cypress/support/ct/window.ts
+++ b/services/web/cypress/support/ct/window.ts
@@ -10,6 +10,7 @@ export function resetMeta() {
hasLinkedProjectOutputFileFeature: true,
hasLinkUrlFeature: true,
})
+ window.metaAttributesCache.set('ol-bootstrapVersion', 5)
}
// Populate meta for top-level access in modules on import
diff --git a/services/web/cypress/support/shared/commands/compile.ts b/services/web/cypress/support/shared/commands/compile.ts
index cbd9972414..90567d8e74 100644
--- a/services/web/cypress/support/shared/commands/compile.ts
+++ b/services/web/cypress/support/shared/commands/compile.ts
@@ -84,11 +84,7 @@ export const waitForCompile = ({ prefix = 'compile', pdf = false } = {}) => {
}
export const interceptDeferredCompile = (beforeResponse?: () => void) => {
- let resolveDeferredCompile: (value?: unknown) => void
-
- const promise = new Promise(resolve => {
- resolveDeferredCompile = resolve
- })
+ const { promise, resolve } = Promise.withResolvers()
cy.intercept(
{ method: 'POST', url: '/project/*/compile*', times: 1 },
@@ -148,6 +144,5 @@ export const interceptDeferredCompile = (beforeResponse?: () => void) => {
{ fixture: 'build/output.blg' }
).as(`compile-blg`)
- // @ts-ignore
- return cy.wrap(resolveDeferredCompile)
+ return cy.wrap(resolve)
}
diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json
index b901131642..469f3a796c 100644
--- a/services/web/frontend/extracted-translations.json
+++ b/services/web/frontend/extracted-translations.json
@@ -342,7 +342,6 @@
"create_project_in_github": "",
"created": "",
"created_at": "",
- "creating": "",
"current_file": "",
"current_password": "",
"currently_seeing_only_24_hrs_history": "",
@@ -699,12 +698,10 @@
"hide_outline": "",
"history": "",
"history_add_label": "",
- "history_adding_label": "",
"history_are_you_sure_delete_label": "",
"history_compare_from_this_version": "",
"history_compare_up_to_this_version": "",
"history_delete_label": "",
- "history_deleting_label": "",
"history_download_this_version": "",
"history_entry_origin_dropbox": "",
"history_entry_origin_git": "",
@@ -1384,7 +1381,6 @@
"restore_file_version": "",
"restore_project_to_this_version": "",
"restore_this_version": "",
- "restoring": "",
"resync_completed": "",
"resync_message": "",
"resync_project_history": "",
diff --git a/services/web/frontend/js/features/chat/components/chat-pane.tsx b/services/web/frontend/js/features/chat/components/chat-pane.tsx
index ff928fb769..d51037762e 100644
--- a/services/web/frontend/js/features/chat/components/chat-pane.tsx
+++ b/services/web/frontend/js/features/chat/components/chat-pane.tsx
@@ -4,22 +4,17 @@ import { useTranslation } from 'react-i18next'
import MessageInput from './message-input'
import InfiniteScroll from './infinite-scroll'
import ChatFallbackError from './chat-fallback-error'
-import Icon from '../../../shared/components/icon'
import { useLayoutContext } from '../../../shared/context/layout-context'
import { useUserContext } from '../../../shared/context/user-context'
import withErrorBoundary from '../../../infrastructure/error-boundary'
import { FetchError } from '../../../infrastructure/fetch-json'
import { useChatContext } from '../context/chat-context'
import { FullSizeLoadingSpinner } from '../../../shared/components/loading-spinner'
-import { bsVersion } from '@/features/utils/bootstrap-5'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
const MessageList = lazy(() => import('./message-list'))
-const Loading = () => (
-
-)
+const Loading = () =>
const ChatPane = React.memo(function ChatPane() {
const { t } = useTranslation()
@@ -86,9 +81,7 @@ const ChatPane = React.memo(function ChatPane() {
itemCount={messageContentCount}
>
-
- {t('chat')}
-
+
{t('chat')}
}>
{status === 'pending' &&
}
{shouldDisplayPlaceholder &&
}
@@ -115,10 +108,7 @@ function Placeholder() {
{t('send_first_message')}
- }
- bs5={}
- />
+
>
)
diff --git a/services/web/frontend/js/features/chat/components/message-input.tsx b/services/web/frontend/js/features/chat/components/message-input.tsx
index 30373886f9..b0c2312af9 100644
--- a/services/web/frontend/js/features/chat/components/message-input.tsx
+++ b/services/web/frontend/js/features/chat/components/message-input.tsx
@@ -1,5 +1,4 @@
import { useTranslation } from 'react-i18next'
-import { bsVersion } from '@/features/utils/bootstrap-5'
type MessageInputProps = {
resetUnreadMessages: () => void
@@ -27,10 +26,7 @@ function MessageInput({ resetUnreadMessages, sendMessage }: MessageInputProps) {
return (
+
}
- bs5={
-
- }
- closeBtnProps={{
- onClick: () => removeTag(tag),
- }}
- className="ms-2 mb-2"
- >
- {tag.name}
-
- }
- />
+ closeBtnProps={{
+ onClick: () => removeTag(tag),
+ }}
+ className="ms-2 mb-2"
+ >
+ {tag.name}
+
)
}
diff --git a/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx b/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx
index a83308c98f..e38bbc18ae 100644
--- a/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx
+++ b/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx
@@ -13,7 +13,6 @@ import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import OLNotification from '@/features/ui/components/ol/ol-notification'
import OLButton from '@/features/ui/components/ol/ol-button'
import OLIconButton from '@/features/ui/components/ol/ol-icon-button'
-import { bsVersion } from '@/features/utils/bootstrap-5'
import { learnedWords as initialLearnedWords } from '@/features/source-editor/extensions/spelling/learned-words'
type DictionaryModalContentProps = {
@@ -79,13 +78,7 @@ export default function DictionaryModalContent({
variant="danger"
size="sm"
onClick={() => handleRemove(learnedWord)}
- bs3Props={{ bsSize: 'xsmall' }}
- icon={
- bsVersion({
- bs5: 'delete',
- bs3: 'trash-o',
- }) as string
- }
+ icon="delete"
accessibilityLabel={t('edit_dictionary_remove')}
/>
diff --git a/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx b/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx
index 3059c2eacb..31e9073743 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx
@@ -1,10 +1,8 @@
import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useProjectContext } from '../../../shared/context/project-context'
-import Icon from '../../../shared/components/icon'
import * as eventTracking from '../../../infrastructure/event-tracking'
import { isSmallDevice } from '../../../infrastructure/event-tracking'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
@@ -29,10 +27,7 @@ export default function DownloadPDF() {
rel="noreferrer"
onClick={sendDownloadEvent}
>
- }
- bs5={}
- />
+
PDF
@@ -45,10 +40,7 @@ export default function DownloadPDF() {
overlayProps={{ placement: 'bottom' }}
>
- }
- bs5={}
- />
+
PDF
diff --git a/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx b/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx
index e2db75024b..6b25b2a28d 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx
@@ -1,9 +1,7 @@
import { useTranslation } from 'react-i18next'
import { useProjectContext } from '../../../shared/context/project-context'
-import Icon from '../../../shared/components/icon'
import * as eventTracking from '../../../infrastructure/event-tracking'
import { isSmallDevice } from '../../../infrastructure/event-tracking'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
export default function DownloadSource() {
@@ -25,10 +23,7 @@ export default function DownloadSource() {
rel="noreferrer"
onClick={sendDownloadEvent}
>
- }
- bs5={}
- />
+
{t('source')}
diff --git a/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx b/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx
index 494a6e67df..392793ec9c 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx
@@ -1,11 +1,8 @@
import { useLayoutContext } from '../../../shared/context/layout-context'
import LeftMenuMask from './left-menu-mask'
-import AccessibleModal from '../../../shared/components/accessible-modal'
-import { Modal } from 'react-bootstrap'
import classNames from 'classnames'
import { lazy, memo, Suspense } from 'react'
import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import { Offcanvas } from 'react-bootstrap-5'
import { EditorLeftMenuProvider } from './editor-left-menu-context'
import withErrorBoundary from '@/infrastructure/error-boundary'
@@ -34,49 +31,24 @@ function EditorLeftMenu() {
}
return (
-
-
- {leftMenuShown && }
-
- }
- bs5={
-
-
- {leftMenuShown && }
-
- }
- />
+
+
+ {leftMenuShown && }
+
)
}
diff --git a/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx b/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx
index 5508120505..ca395dd88a 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx
@@ -1,6 +1,4 @@
import { PropsWithChildren } from 'react'
-import Icon from '../../../shared/components/icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
type Props = {
@@ -26,12 +24,7 @@ function LeftMenuButtonIcon({
if (svgIcon) {
return {svgIcon}
} else if (icon) {
- return (
- }
- bs5={}
- />
- )
+ return
} else return null
}
diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx
index de0e34b8c9..5659f7b50e 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx
@@ -17,7 +17,6 @@ export default function SettingsDictionary() {
variant="secondary"
size="sm"
onClick={() => setShowModal(true)}
- bs3Props={{ bsSize: 'xsmall' }}
>
{t('edit')}
diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx
index 1cffe06fe9..a6a68cd5f9 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx
+++ b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx
@@ -1,4 +1,3 @@
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import OLFormGroup from '@/features/ui/components/ol/ol-form-group'
import OLFormLabel from '@/features/ui/components/ol/ol-form-label'
import OLFormSelect from '@/features/ui/components/ol/ol-form-select'
@@ -81,23 +80,14 @@ export default function SettingsMenuSelect({
>
{label}
{loading ? (
-
-
-
- }
- bs5={
-
-
-
- }
- />
+
+
+
) : (
-
- }
- bs5={
-
- }
+
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.jsx
index 1ebcdbe496..78afcdde42 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.jsx
@@ -1,8 +1,6 @@
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import OLBadge from '@/features/ui/components/ol/ol-badge'
@@ -15,22 +13,11 @@ function ChatToggleButton({ chatIsOpen, unreadMessageCount, onClick }) {
return (
)}
- {
- eventTracking.sendMB('navigation-clicked-layout')
- }}
- className="toolbar-item layout-dropdown"
- pullRight
+
+
+ {processing ? (
+
+ ) : (
+
+ )}
+ {t('layout')}
+
+
+ handleChangeLayout('sideBySide')}
+ active={isActiveDropdownItem({
+ iconFor: 'sideBySide',
+ pdfLayout,
+ view,
+ detachRole,
+ })}
+ leadingIcon="dock_to_right"
>
- {/* bsStyle is required for Dropdown.Toggle, but we will override style */}
-
- {processing ? : }
- {t('layout')}
-
-
- handleChangeLayout('sideBySide')}
- checkmark={
-
- }
- icon={}
- text={t('editor_and_pdf')}
- />
+ {t('editor_and_pdf')}
+
- handleChangeLayout('flat', 'editor')}
- checkmark={
-
- }
- icon={}
- text={
- ,
- ]}
- />
- }
+ handleChangeLayout('flat', 'editor')}
+ active={isActiveDropdownItem({
+ iconFor: 'editorOnly',
+ pdfLayout,
+ view,
+ detachRole,
+ })}
+ leadingIcon="code"
+ >
+
+ ,
+ ]}
/>
+
+
- handleChangeLayout('flat', 'pdf')}
- checkmark={
-
- }
- icon={}
- text={
- ,
- ]}
- />
- }
+ handleChangeLayout('flat', 'pdf')}
+ active={isActiveDropdownItem({
+ iconFor: 'pdfOnly',
+ pdfLayout,
+ view,
+ detachRole,
+ })}
+ leadingIcon="picture_as_pdf"
+ >
+
+ ,
+ ]}
/>
+
+
- {detachable ? (
- handleDetach()}
- checkmark={
- detachRole === 'detacher' ? (
- detachIsLinked ? (
-
- ) : (
-
- )
- ) : (
-
- )
- }
- icon={}
- text={t('pdf_in_separate_tab')}
- />
- ) : (
-
- )}
-
-
- }
- bs5={
-
- handleDetach()}
+ active={detachRole === 'detacher' && detachIsLinked}
+ trailingIcon={
+ detachRole === 'detacher' ? (
+ detachIsLinked ? (
+ 'check'
+ ) : (
+
+
+ {t('loading')}
+
+ )
+ ) : null
+ }
+ leadingIcon="select_window"
>
- {processing ? (
-
- ) : (
-
- )}
- {t('layout')}
-
-
- handleChangeLayout('sideBySide')}
- active={isActiveDropdownItem({
- iconFor: 'sideBySide',
- pdfLayout,
- view,
- detachRole,
- })}
- leadingIcon="dock_to_right"
- >
- {t('editor_and_pdf')}
-
-
- handleChangeLayout('flat', 'editor')}
- active={isActiveDropdownItem({
- iconFor: 'editorOnly',
- pdfLayout,
- view,
- detachRole,
- })}
- leadingIcon="code"
- >
-
- ,
- ]}
- />
-
-
-
- handleChangeLayout('flat', 'pdf')}
- active={isActiveDropdownItem({
- iconFor: 'pdfOnly',
- pdfLayout,
- view,
- detachRole,
- })}
- leadingIcon="picture_as_pdf"
- >
-
- ,
- ]}
- />
-
-
-
- {detachable ? (
- handleDetach()}
- active={detachRole === 'detacher' && detachIsLinked}
- trailingIcon={
- detachRole === 'detacher' ? (
- detachIsLinked ? (
- 'check'
- ) : (
-
-
-
- {t('loading')}
-
-
- )
- ) : null
- }
- leadingIcon="select_window"
- >
- {t('pdf_in_separate_tab')}
-
- ) : (
-
- )}
-
-
- }
- />
+ {t('pdf_in_separate_tab')}
+
+ ) : (
+
+ )}
+
+
>
)
}
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.jsx
index a4d431dea5..fa3d8fa46c 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.jsx
@@ -1,8 +1,6 @@
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function MenuButton({ onClick }) {
const { t } = useTranslation()
@@ -10,15 +8,7 @@ function MenuButton({ onClick }) {
return (
- }
- bs5={
-
- }
- />
+
{t('menu')}
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.jsx
index 75d0f99bb9..700bc5eb05 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.jsx
@@ -1,7 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
-import { Dropdown as BS3Dropdown, MenuItem } from 'react-bootstrap'
import {
Dropdown,
DropdownHeader,
@@ -9,11 +8,8 @@ import {
DropdownMenu,
DropdownToggle,
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
-import Icon from '../../../shared/components/icon'
import { getBackgroundColorForUserId } from '@/shared/utils/colors'
-import ControlledDropdown from '../../../shared/components/controlled-dropdown'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
function OnlineUsersWidget({ onlineUsers, goToUser }) {
@@ -23,57 +19,28 @@ function OnlineUsersWidget({ onlineUsers, goToUser }) {
if (shouldDisplayDropdown) {
return (
-
-
-
-
- {onlineUsers.map((user, index) => (
-
- ))}
-
-
- }
- bs5={
-
-
-
-
- {t('connected_users')}
-
- {onlineUsers.map((user, index) => (
-
- goToUser(user)}
- >
-
-
-
- ))}
-
-
- }
- />
+
+
+
+
+ {t('connected_users')}
+
+ {onlineUsers.map((user, index) => (
+
+ goToUser(user)}
+ >
+
+
+
+ ))}
+
+
)
} else {
return (
@@ -150,10 +117,7 @@ const DropDownToggleButton = React.forwardRef((props, ref) => {
ref={ref}
>
{props.onlineUserCount}
- }
- bs5={}
- />
+
)
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.tsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.tsx
index 3d15cfad8a..87d00402d0 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.tsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.tsx
@@ -1,11 +1,9 @@
import { useEffect, useState, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import classNames from 'classnames'
-import Icon from '../../../shared/components/icon'
import OLFormControl from '@/features/ui/components/ol/ol-form-control'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
type ProjectNameEditableLabelProps = {
projectName: string
@@ -90,10 +88,7 @@ function ProjectNameEditableLabel({
>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus */}
- }
- bs5={}
- />
+
)}
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.jsx
index e5a8fa8709..f0aed3674d 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.jsx
@@ -1,8 +1,6 @@
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function ShareProjectButton({ onClick }) {
const { t } = useTranslation()
@@ -10,10 +8,7 @@ function ShareProjectButton({ onClick }) {
return (
- }
- bs5={}
- />
+
{t('share')}
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.jsx
index 4779c14a11..d7947f1894 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.jsx
@@ -16,7 +16,6 @@ import importOverleafModules from '../../../../macros/import-overleaf-module.mac
import BackToEditorButton from './back-to-editor-button'
import getMeta from '@/utils/meta'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
const [publishModalModules] = importOverleafModules('publishModal')
const PublishButton = publishModalModules?.import.default
@@ -76,14 +75,9 @@ const ToolbarHeader = React.memo(function ToolbarHeader({
)}
{getMeta('ol-showUpgradePrompt') && (
- }
- bs5={
-
-
-
- }
- />
+
+
+
)}
{historyIsOpen ? (
- }
- bs5={
-
-
-
- }
- />
+
+
+
) : (
<>
{trackChangesVisible && (
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.jsx
index 797327ac7d..5b74c71e84 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.jsx
@@ -1,7 +1,6 @@
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
function TrackChangesToggleButton({
@@ -23,10 +22,7 @@ function TrackChangesToggleButton({
className={classes}
onMouseDown={onMouseDown}
>
- }
- bs5={}
- />
+
{t('review')}
diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.jsx b/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.jsx
index 45ed7d76be..594dd9feec 100644
--- a/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.jsx
+++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.jsx
@@ -1,8 +1,6 @@
import { useTranslation } from 'react-i18next'
import * as eventTracking from '../../../infrastructure/event-tracking'
import OLButton from '@/features/ui/components/ol/ol-button'
-import { bsVersion } from '@/features/utils/bootstrap-5'
-import classnames from 'classnames'
function UpgradePrompt() {
const { t } = useTranslation()
@@ -16,10 +14,7 @@ function UpgradePrompt() {
) {
@@ -60,51 +55,27 @@ function FileTreeContextMenu() {
}
return ReactDOM.createPortal(
-
+
+
+
+ ,
document.body
)
}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.jsx b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.jsx
index 00d1a0aaf2..75c5754b5d 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.jsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.jsx
@@ -11,7 +11,6 @@ import importOverleafModules from '../../../../../macros/import-overleaf-module.
import { lazy, Suspense } from 'react'
import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
import getMeta from '@/utils/meta'
-import { bsVersion } from '@/features/utils/bootstrap-5'
const createFileModeModules = importOverleafModules('createFileModes')
@@ -40,7 +39,7 @@ export default function FileTreeModalCreateFileBody() {
@@ -54,7 +53,7 @@ export default function FileTreeModalCreateFileBody() {
hasLinkedProjectOutputFileFeature) && (
)}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.jsx b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.jsx
index 09bf3b82ec..3432d7b1b8 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.jsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.jsx
@@ -66,7 +66,6 @@ export function FileTreeModalCreateFileFooterContent({
form="create-file"
disabled={inFlight || !valid}
isLoading={inFlight}
- bs3Props={{ loading: inFlight ? `${t('creating')}…` : t('create') }}
>
{t('create')}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.jsx b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.jsx
index 9f5904f0e2..259dac3144 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.jsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.jsx
@@ -1,10 +1,8 @@
import classnames from 'classnames'
import PropTypes from 'prop-types'
-import Icon from '../../../../shared/components/icon'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
import * as eventTracking from '../../../../infrastructure/event-tracking'
import OLButton from '@/features/ui/components/ol/ol-button'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
export default function FileTreeModalCreateFileMode({ mode, icon, label }) {
@@ -22,10 +20,7 @@ export default function FileTreeModalCreateFileMode({ mode, icon, label }) {
onClick={handleClick}
className="modal-new-file-mode"
>
- }
- bs5={}
- />
+
{label}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.tsx
index 2ab9486e92..f8be632986 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.tsx
@@ -5,7 +5,6 @@ import {
useMemo,
FormEventHandler,
} from 'react'
-import Icon from '../../../../../shared/components/icon'
import FileTreeCreateNameInput from '../file-tree-create-name-input'
import { useTranslation } from 'react-i18next'
import { useUserProjects } from '../../../hooks/use-user-projects'
@@ -25,7 +24,6 @@ import OLFormGroup from '@/features/ui/components/ol/ol-form-group'
import OLFormLabel from '@/features/ui/components/ol/ol-form-label'
import OLForm from '@/features/ui/components/ol/ol-form'
import OLFormSelect from '@/features/ui/components/ol/ol-form-select'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import { Spinner } from 'react-bootstrap-5'
export default function FileTreeImportFromProject() {
@@ -216,16 +214,11 @@ function SelectProject({
{loading && (
- }
- bs5={
-
- }
+
)}
@@ -287,16 +280,11 @@ function SelectProjectOutputFile({
{loading && (
- }
- bs5={
-
- }
+
)}
@@ -351,16 +339,11 @@ function SelectProjectEntity({
{loading && (
- }
- bs5={
-
- }
+
)}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-folder-icons.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-folder-icons.tsx
index 9ee8f7229f..0248a3fe85 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-folder-icons.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-folder-icons.tsx
@@ -1,6 +1,4 @@
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import { useFeatureFlag } from '@/shared/context/split-test-context'
@@ -33,44 +31,21 @@ function FileTreeFolderIcons({
}
return (
-
-
-
-
-
- >
- }
- bs5={
- <>
-
-
-
-
- >
- }
- />
+ <>
+
+
+
+
+ >
)
}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-icon.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-icon.tsx
index d9e78e6675..483c84301d 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-icon.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-icon.tsx
@@ -1,10 +1,8 @@
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import iconTypeFromName, {
newEditorIconTypeFromName,
} from '../util/icon-type-from-name'
import classnames from 'classnames'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import { useFeatureFlag } from '@/shared/context/split-test-context'
@@ -46,34 +44,15 @@ function FileTreeIcon({
return (
<>
-
-
- {isLinkedFile && (
-
- )}
- >
- }
- bs5={
- <>
-
- {isLinkedFile && (
-
- )}
- >
- }
- />
+
+ {isLinkedFile && (
+
+ )}
>
)
}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.tsx
index 1ef3b31a2a..28f4a47c9b 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.tsx
@@ -3,13 +3,11 @@ import { useTranslation } from 'react-i18next'
import * as eventTracking from '../../../../infrastructure/event-tracking'
import { useProjectContext } from '@/shared/context/project-context'
-import { MenuItem } from 'react-bootstrap'
import {
DropdownDivider,
DropdownItem,
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function FileTreeItemMenuItems() {
const { t } = useTranslation()
@@ -47,82 +45,49 @@ function FileTreeItemMenuItems() {
}, [startUploadingDocOrFile])
return (
-
+ {canRename ? (
+
+ {t('rename')}
+
+ ) : null}
+ {downloadPath ? (
+
+
+ {t('download')}
+
+
+ ) : null}
+ {canDelete ? (
+
+ {t('delete')}
+
+ ) : null}
+ {canCreate ? (
<>
- {canRename ? (
-
- ) : null}
- {downloadPath ? (
-
- ) : null}
- {canDelete ? (
-
- ) : null}
- {canCreate ? (
- <>
-
-
-
-
- >
- ) : null}
+
+
+
+ {t('new_file')}
+
+
+
+
+ {t('new_folder')}
+
+
+
+
+ {t('upload')}
+
+
>
- }
- bs5={
- <>
- {canRename ? (
-
- {t('rename')}
-
- ) : null}
- {downloadPath ? (
-
-
- {t('download')}
-
-
- ) : null}
- {canDelete ? (
-
- {t('delete')}
-
- ) : null}
- {canCreate ? (
- <>
-
-
-
- {t('new_file')}
-
-
-
-
- {t('new_folder')}
-
-
-
-
- {t('upload')}
-
-
- >
- ) : null}
- >
- }
- />
+ ) : null}
+ >
)
}
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.tsx
index f8cdc4ef94..36b54b8e69 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.tsx
@@ -1,8 +1,6 @@
import { useRef } from 'react'
import { useTranslation } from 'react-i18next'
-import Icon from '../../../../shared/components/icon'
import { useFileTreeMainContext } from '../../contexts/file-tree-main'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
function FileTreeItemMenu({ id, name }: { id: string; name: string }) {
@@ -36,10 +34,7 @@ function FileTreeItemMenu({ id, name }: { id: string; name: string }) {
aria-expanded={isMenuOpen}
aria-label={t('open_action_menu', { name })}
>
- }
- bs5={}
- />
+
)
diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.tsx
index 0f82a232da..d25d1f36c8 100644
--- a/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.tsx
+++ b/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.tsx
@@ -1,10 +1,8 @@
import { useTranslation } from 'react-i18next'
import * as eventTracking from '../../../infrastructure/event-tracking'
-import Icon from '../../../shared/components/icon'
import { useFileTreeActionable } from '../contexts/file-tree-actionable'
import { useFileTreeData } from '@/shared/context/file-tree-data-context'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import OLButtonToolbar from '@/features/ui/components/ol/ol-button-toolbar'
import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
@@ -60,15 +58,7 @@ function FileTreeToolbarLeft() {
overlayProps={{ placement: 'bottom' }}
>
-
- }
- bs3={}
- />
+
-
- }
- bs3={}
- />
+
-
- }
- bs3={}
- />
+
@@ -126,12 +103,7 @@ function FileTreeToolbarRight() {
overlayProps={{ placement: 'bottom' }}
>
- }
- bs5={
-
- }
- />
+
) : null}
@@ -143,12 +115,7 @@ function FileTreeToolbarRight() {
overlayProps={{ placement: 'bottom' }}
>
- }
- bs5={
-
- }
- />
+
) : null}
diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.jsx b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.jsx
index bf726c8902..850b603229 100644
--- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.jsx
+++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.jsx
@@ -83,12 +83,7 @@ function FileTreeModalCreateFolder() {
{inFlight ? (
-
+
) : (
<>
diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.jsx b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.jsx
index 1ad8cb9a09..ba80a9ffee 100644
--- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.jsx
+++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.jsx
@@ -55,12 +55,7 @@ function FileTreeModalDelete() {
{inFlight ? (
-
+
) : (
<>
diff --git a/services/web/frontend/js/features/file-tree/util/icon-type-from-name.ts b/services/web/frontend/js/features/file-tree/util/icon-type-from-name.ts
index 1df52b8f70..3994494345 100644
--- a/services/web/frontend/js/features/file-tree/util/icon-type-from-name.ts
+++ b/services/web/frontend/js/features/file-tree/util/icon-type-from-name.ts
@@ -1,4 +1,3 @@
-import { isBootstrap5 } from '@/features/utils/bootstrap-5'
import { AvailableUnfilledIcon } from '@/shared/components/material-icon'
// TODO ide-redesign-cleanup: Make this the default export and remove the legacy version
@@ -27,12 +26,12 @@ export default function iconTypeFromName(name: string): string {
if (ext && ['png', 'pdf', 'jpg', 'jpeg', 'gif'].includes(ext)) {
return 'image'
} else if (ext && ['csv', 'xls', 'xlsx'].includes(ext)) {
- return isBootstrap5() ? 'table_chart' : 'table'
+ return 'table_chart'
} else if (ext && ['py', 'r'].includes(ext)) {
- return isBootstrap5() ? 'code' : 'file-text'
+ return 'code'
} else if (ext && ['bib'].includes(ext)) {
- return isBootstrap5() ? 'menu_book' : 'book'
+ return 'menu_book'
} else {
- return isBootstrap5() ? 'description' : 'file'
+ return 'description'
}
}
diff --git a/services/web/frontend/js/features/file-view/components/file-view-header.tsx b/services/web/frontend/js/features/file-view/components/file-view-header.tsx
index 1d78aac843..ca228a9304 100644
--- a/services/web/frontend/js/features/file-view/components/file-view-header.tsx
+++ b/services/web/frontend/js/features/file-view/components/file-view-header.tsx
@@ -1,7 +1,6 @@
import { useState, type ElementType } from 'react'
import { Trans, useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import { formatTime, relativeDate } from '../../utils/format-date'
import { fileUrl } from '../../utils/fileUrl'
import { useFileTreeData } from '@/shared/context/file-tree-data-context'
@@ -14,7 +13,6 @@ import { BinaryFile, hasProvider, LinkedFile } from '../types/binary-file'
import FileViewRefreshButton from './file-view-refresh-button'
import FileViewRefreshError from './file-view-refresh-error'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import OLButton from '@/features/ui/components/ol/ol-button'
const tprFileViewInfo = importOverleafModules('tprFileViewInfo') as {
@@ -87,10 +85,7 @@ export default function FileViewHeader({ file }: FileViewHeaderProps) {
download={file.name}
href={fileUrl(projectId, file.id, file.hash)}
>
- }
- bs5={}
- />{' '}
+ {' '}
{t('download')}
diff --git a/services/web/frontend/js/features/file-view/components/file-view-icons.jsx b/services/web/frontend/js/features/file-view/components/file-view-icons.jsx
index 145f140c69..8016d098cb 100644
--- a/services/web/frontend/js/features/file-view/components/file-view-icons.jsx
+++ b/services/web/frontend/js/features/file-view/components/file-view-icons.jsx
@@ -1,26 +1,12 @@
-import Icon from '../../../shared/components/icon'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
export const LinkedFileIcon = props => {
return (
-
- }
- bs5={
-
- }
+
)
}
diff --git a/services/web/frontend/js/features/file-view/components/file-view-refresh-button.tsx b/services/web/frontend/js/features/file-view/components/file-view-refresh-button.tsx
index d04bf803cc..622e101ae6 100644
--- a/services/web/frontend/js/features/file-view/components/file-view-refresh-button.tsx
+++ b/services/web/frontend/js/features/file-view/components/file-view-refresh-button.tsx
@@ -6,7 +6,6 @@ import {
useState,
} from 'react'
import { useTranslation } from 'react-i18next'
-import Icon from '@/shared/components/icon'
import { postJSON } from '@/infrastructure/fetch-json'
import { useProjectContext } from '@/shared/context/project-context'
import type { BinaryFile } from '../types/binary-file'
@@ -103,14 +102,7 @@ function FileViewRefreshButtonDefault({
onClick={() => refreshFile(null)}
disabled={refreshing}
isLoading={refreshing}
- bs3Props={{
- loading: (
- <>
- {' '}
- {refreshing ? `${t('refreshing')}…` : t('refresh')}
- >
- ),
- }}
+ loadingLabel={t('refreshing')}
>
{t('refresh')}
diff --git a/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx b/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx
index 8658dae246..0bf6a71f2c 100644
--- a/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/add-label-modal.tsx
@@ -117,11 +117,6 @@ function AddLabelModal({ show, setShow, version }: AddLabelModalProps) {
variant="primary"
disabled={isLoading || !comment.length}
isLoading={isLoading}
- bs3Props={{
- loading: isLoading
- ? t('history_adding_label')
- : t('history_add_label'),
- }}
>
{t('history_add_label')}
diff --git a/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx b/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx
index 2442b0206c..118389732f 100644
--- a/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx
@@ -192,11 +192,9 @@ function AllHistoryList() {
},
],
}}
- bs3Props={{ shouldUpdatePosition: true }}
>
{t('react_history_tutorial_title')}{' '}
@@ -236,11 +234,9 @@ function AllHistoryList() {
onHide={hidePopover}
// using scrollerRef to position the popover in the middle of the viewport
target={scrollerRef.current}
- bs3Props={{ shouldUpdatePosition: true }}
>
{t('history_restore_promo_title')}
diff --git a/services/web/frontend/js/features/history/components/change-list/dropdown/actions-dropdown.tsx b/services/web/frontend/js/features/history/components/change-list/dropdown/actions-dropdown.tsx
index 3bbab1479d..90f23cf746 100644
--- a/services/web/frontend/js/features/history/components/change-list/dropdown/actions-dropdown.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/dropdown/actions-dropdown.tsx
@@ -1,13 +1,9 @@
-import React, { useRef, useEffect, ReactNode } from 'react'
-import { Dropdown as BS3Dropdown } from 'react-bootstrap'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
+import React, { ReactNode } from 'react'
import {
Dropdown,
DropdownMenu,
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
-import BS3DropdownToggleWithTooltip from '../../../../ui/components/bootstrap-3/dropdown-toggle-with-tooltip'
import BS5DropdownToggleWithTooltip from '@/features/ui/components/bootstrap-5/dropdown-toggle-with-tooltip'
-import DropdownMenuWithRef from '../../../../ui/components/bootstrap-3/dropdown-menu-with-ref'
type ActionDropdownProps = {
id: string
@@ -19,70 +15,6 @@ type ActionDropdownProps = {
setIsOpened: (isOpened: boolean) => void
}
-function BS3ActionsDropdown({
- id,
- children,
- parentSelector,
- isOpened,
- iconTag,
- setIsOpened,
- toolTipDescription,
-}: ActionDropdownProps) {
- const menuRef = useRef()
-
- // handle the placement of the dropdown above or below the toggle button
- useEffect(() => {
- if (menuRef.current && parentSelector) {
- const parent = menuRef.current.closest(parentSelector)
-
- if (!parent) {
- return
- }
-
- const parentBottom = parent.getBoundingClientRect().bottom
- const { top, height } = menuRef.current.getBoundingClientRect()
-
- if (top + height > parentBottom) {
- menuRef.current.style.bottom = '100%'
- menuRef.current.style.top = 'auto'
- } else {
- menuRef.current.style.bottom = 'auto'
- menuRef.current.style.top = '100%'
- }
- }
- })
-
- return (
- setIsOpened(open)}
- className="pull-right"
- >
-
- {iconTag}
-
-
- {children}
-
-
- )
-}
-
function BS5ActionsDropdown({
id,
children,
@@ -116,12 +48,7 @@ function BS5ActionsDropdown({
}
function ActionsDropdown(props: ActionDropdownProps) {
- return (
- }
- bs5={}
- />
- )
+ return
}
export default ActionsDropdown
diff --git a/services/web/frontend/js/features/history/components/change-list/dropdown/history-dropdown.tsx b/services/web/frontend/js/features/history/components/change-list/dropdown/history-dropdown.tsx
index 8b6fde8bef..a0c20671d2 100644
--- a/services/web/frontend/js/features/history/components/change-list/dropdown/history-dropdown.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/dropdown/history-dropdown.tsx
@@ -1,8 +1,6 @@
import ActionsDropdown from './actions-dropdown'
-import Icon from '../../../../../shared/components/icon'
import { useTranslation } from 'react-i18next'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
type HistoryDropdownProps = {
children: React.ReactNode
@@ -25,17 +23,7 @@ function HistoryDropdown({
toolTipDescription={t('more_actions')}
setIsOpened={setIsOpened}
iconTag={
-
- }
- bs5={
-
- }
- />
+
}
parentSelector="[data-history-version-list-container]"
>
diff --git a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/compare.tsx b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/compare.tsx
index bcbf515ec2..90b02d1ea5 100644
--- a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/compare.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/compare.tsx
@@ -2,7 +2,6 @@ import { useHistoryContext } from '../../../../context/history-context'
import { UpdateRange } from '../../../../services/types/update'
import { ReactNode } from 'react'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
-import { bsVersion } from '@/features/utils/bootstrap-5'
type CompareProps = {
comparisonRange: UpdateRange
@@ -38,9 +37,7 @@ function Compare({
overlayProps={{ placement: 'left' }}
>
-
- {toolTipDescription}
-
+ {toolTipDescription}
{icon}
diff --git a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/download.tsx b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/download.tsx
index fc3e1a2d5f..305d77efda 100644
--- a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/download.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/download.tsx
@@ -1,8 +1,6 @@
import { useTranslation } from 'react-i18next'
import OLDropdownMenuItem from '@/features/ui/components/ol/ol-dropdown-menu-item'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
-import Icon from '../../../../../../shared/components/icon'
type DownloadProps = {
projectId: string
@@ -24,12 +22,7 @@ function Download({
download={`${projectId}_v${version}.zip`}
rel="noreferrer"
onClick={closeDropdown}
- leadingIcon={
- }
- bs5={}
- />
- }
+ leadingIcon={}
{...props}
>
{t('history_download_this_version')}
diff --git a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/restore-project.tsx b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/restore-project.tsx
index dad0f47cd0..d6399ddf30 100644
--- a/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/restore-project.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/dropdown/menu-item/restore-project.tsx
@@ -1,4 +1,3 @@
-import Icon from '@/shared/components/icon'
import { useCallback, useState } from 'react'
import OLDropdownMenuItem from '@/features/ui/components/ol/ol-dropdown-menu-item'
import { useTranslation } from 'react-i18next'
@@ -8,7 +7,6 @@ import { useRestoreProject } from '@/features/history/context/hooks/use-restore-
import withErrorBoundary from '@/infrastructure/error-boundary'
import { RestoreProjectErrorModal } from '../../../diff-view/modals/restore-project-error-modal'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
type RestoreProjectProps = {
projectId: string
@@ -48,12 +46,7 @@ const RestoreProject = ({
<>
}
- bs5={}
- />
- }
+ leadingIcon={}
onClick={handleClick}
>
{t('restore_project_to_this_version')}
diff --git a/services/web/frontend/js/features/history/components/change-list/history-version.tsx b/services/web/frontend/js/features/history/components/change-list/history-version.tsx
index 9f6041a4b9..e2cec84baf 100644
--- a/services/web/frontend/js/features/history/components/change-list/history-version.tsx
+++ b/services/web/frontend/js/features/history/components/change-list/history-version.tsx
@@ -22,7 +22,6 @@ import { CompareVersionDropdownContentAllHistory } from './dropdown/compare-vers
import FileRestoreChange from './file-restore-change'
import HistoryResyncChange from './history-resync-change'
import ProjectRestoreChange from './project-restore-change'
-import { bsVersion } from '@/features/utils/bootstrap-5'
type HistoryVersionProps = {
update: LoadedUpdate
@@ -124,10 +123,7 @@ function HistoryVersion({
)}
{selectionState !== 'selected' && !faded ? (
-
+
{selectionState !== 'withinSelected' ? (
{selectionState !== 'selected' ? (
-
+
{selectionState !== 'withinSelected' ? (
(
disabled={isLoading}
isLoading={isLoading}
onClick={localDeleteHandler}
- bs3Props={{
- loading: isLoading
- ? t('history_deleting_label')
- : t('history_delete_label'),
- }}
>
{t('history_delete_label')}
diff --git a/services/web/frontend/js/features/history/components/diff-view/document-diff-viewer.tsx b/services/web/frontend/js/features/history/components/diff-view/document-diff-viewer.tsx
index 30b9c9da8d..d99f9521ec 100644
--- a/services/web/frontend/js/features/history/components/diff-view/document-diff-viewer.tsx
+++ b/services/web/frontend/js/features/history/components/diff-view/document-diff-viewer.tsx
@@ -21,7 +21,6 @@ import {
import { useTranslation } from 'react-i18next'
import { inlineBackground } from '../../../source-editor/extensions/inline-background'
import OLButton from '@/features/ui/components/ol/ol-button'
-import { bsVersion } from '@/features/utils/bootstrap-5'
function extensions(themeOptions: Options): Extension[] {
return [
@@ -134,7 +133,7 @@ function DocumentDiffViewer({
{before > 0 ? (
@@ -144,7 +143,7 @@ function DocumentDiffViewer({
{after > 0 ? (
diff --git a/services/web/frontend/js/features/history/components/diff-view/modals/restore-project-modal.tsx b/services/web/frontend/js/features/history/components/diff-view/modals/restore-project-modal.tsx
index b9eb1ea088..b6012cc174 100644
--- a/services/web/frontend/js/features/history/components/diff-view/modals/restore-project-modal.tsx
+++ b/services/web/frontend/js/features/history/components/diff-view/modals/restore-project-modal.tsx
@@ -51,7 +51,6 @@ export const RestoreProjectModal = ({
onClick={onRestore}
disabled={isRestoring}
isLoading={isRestoring}
- bs3Props={{ loading: isRestoring ? t('restoring') : t('restore') }}
>
{t('restore')}
diff --git a/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-button.tsx b/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-button.tsx
index ff998d5202..559b09a3d0 100644
--- a/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-button.tsx
+++ b/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-button.tsx
@@ -21,10 +21,6 @@ export default function ToolbarRestoreFileButton({
className="history-react-toolbar-restore-file-button"
isLoading={isLoading}
onClick={() => restoreDeletedFile(selection)}
- bs3Props={{
- bsSize: 'xsmall',
- loading: isLoading ? `${t('restoring')}…` : t('restore_file'),
- }}
>
{t('restore_file')}
diff --git a/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-to-version-button.tsx b/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-to-version-button.tsx
index 99cbccbcb0..7f8ad694ce 100644
--- a/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-to-version-button.tsx
+++ b/services/web/frontend/js/features/history/components/diff-view/toolbar/toolbar-restore-file-to-version-button.tsx
@@ -38,10 +38,6 @@ function ToolbarRestoreFileToVersionButton({
size="sm"
isLoading={isLoading}
onClick={() => setShowConfirmModal(true)}
- bs3Props={{
- bsSize: 'xsmall',
- loading: isLoading ? `${t('restoring')}…` : t('restore_file_version'),
- }}
>
{t('restore_file_version')}
diff --git a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-doc.tsx b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-doc.tsx
index 6313e06b5e..3b788eb046 100644
--- a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-doc.tsx
+++ b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-doc.tsx
@@ -2,9 +2,7 @@ import { memo } from 'react'
import classNames from 'classnames'
import HistoryFileTreeItem from './history-file-tree-item'
import iconTypeFromName from '../../../file-tree/util/icon-type-from-name'
-import Icon from '../../../../shared/components/icon'
import type { FileDiff } from '../../services/types/file'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
type HistoryFileTreeDocProps = {
@@ -36,20 +34,9 @@ function HistoryFileTreeDoc({
name={name}
operation={'operation' in file ? file.operation : undefined}
icons={
-
- }
- bs5={
-
- }
+
}
/>
diff --git a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-folder.tsx b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-folder.tsx
index b7a87a354b..6c2c912f8c 100644
--- a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-folder.tsx
+++ b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-folder.tsx
@@ -4,9 +4,7 @@ import { useTranslation } from 'react-i18next'
import HistoryFileTreeItem from './history-file-tree-item'
import HistoryFileTreeFolderList from './history-file-tree-folder-list'
-import Icon from '../../../../shared/components/icon'
import type { HistoryDoc, HistoryFileTree } from '../../utils/file-tree'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
type HistoryFileTreeFolderProps = {
@@ -43,46 +41,22 @@ function HistoryFileTreeFolder({
})
const icons = (
-
- setExpanded(!expanded)}
- aria-label={expanded ? t('collapse') : t('expand')}
- className="history-file-tree-folder-button"
- >
-
-
-
- >
- }
- bs5={
- <>
- setExpanded(!expanded)}
- aria-label={expanded ? t('collapse') : t('expand')}
- className="history-file-tree-folder-button"
- >
-
-
-
- >
- }
- />
+ <>
+ setExpanded(!expanded)}
+ aria-label={expanded ? t('collapse') : t('expand')}
+ className="history-file-tree-folder-button"
+ >
+
+
+
+ >
)
return (
diff --git a/services/web/frontend/js/features/ide-react/components/alerts/alerts.tsx b/services/web/frontend/js/features/ide-react/components/alerts/alerts.tsx
index 3e7bd02e74..98f23d8f2a 100644
--- a/services/web/frontend/js/features/ide-react/components/alerts/alerts.tsx
+++ b/services/web/frontend/js/features/ide-react/components/alerts/alerts.tsx
@@ -61,7 +61,6 @@ export function Alerts() {
id="synctex-more-info-button"
variant="secondary"
size="sm"
- bs3Props={{ className: 'alert-link-as-btn pull-right' }}
>
{t('more_info')}
diff --git a/services/web/frontend/js/features/ide-react/components/alerts/lost-connection-alert.tsx b/services/web/frontend/js/features/ide-react/components/alerts/lost-connection-alert.tsx
index 5bafd16fb0..a4780f8021 100644
--- a/services/web/frontend/js/features/ide-react/components/alerts/lost-connection-alert.tsx
+++ b/services/web/frontend/js/features/ide-react/components/alerts/lost-connection-alert.tsx
@@ -40,7 +40,6 @@ export function LostConnectionAlert({
onClick={() => tryReconnectNow()}
size="sm"
variant="secondary"
- bs3Props={{ className: 'pull-right' }}
>
{t('try_now')}
diff --git a/services/web/frontend/js/features/pdf-preview/components/detach-compile-button.tsx b/services/web/frontend/js/features/pdf-preview/components/detach-compile-button.tsx
index fa7f8d0f60..accfcc40b0 100644
--- a/services/web/frontend/js/features/pdf-preview/components/detach-compile-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/detach-compile-button.tsx
@@ -1,12 +1,9 @@
import { useTranslation } from 'react-i18next'
import { memo } from 'react'
import classnames from 'classnames'
-import Icon from '../../../shared/components/icon'
import { useDetachCompileContext } from '../../../shared/context/detach-compile-context'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import OLButton from '@/features/ui/components/ol/ol-button'
-import { bsVersion } from '@/features/utils/bootstrap-5'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
const modifierKey = /Mac/i.test(navigator.platform) ? 'Cmd' : 'Ctrl'
@@ -14,7 +11,6 @@ function DetachCompileButton() {
const { t } = useTranslation()
const { compiling, startCompile, hasChanges } = useDetachCompileContext()
- const compileButtonLabel = compiling ? `${t('compiling')}…` : t('recompile')
const tooltipElement = (
<>
{t('recompile_pdf')}{' '}
@@ -23,12 +19,7 @@ function DetachCompileButton() {
)
return (
-
+
-
-
- {compileButtonLabel}
-
- >
- ),
- }}
>
-
-
-
- {compileButtonLabel}
-
- >
- }
- bs5={t('recompile')}
- />
+ {t('recompile')}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-clear-cache-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-clear-cache-button.tsx
index dfaef0548e..51a96f6da4 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-clear-cache-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-clear-cache-button.tsx
@@ -1,9 +1,7 @@
-import Icon from '../../../shared/components/icon'
import OLButton from '@/features/ui/components/ol/ol-button'
import { useTranslation } from 'react-i18next'
import { memo } from 'react'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PdfClearCacheButton() {
const { compiling, clearCache, clearingCache } = useCompileContext()
@@ -19,19 +17,8 @@ function PdfClearCacheButton() {
isLoading={clearingCache}
disabled={clearingCache || compiling}
leadingIcon="delete"
+ loadingLabel={t('clear_cached_files')}
>
-
- {clearingCache ? (
-
- ) : (
-
- )}
-
- >
- }
- />
{t('clear_cached_files')}
)
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-code-check-failed-notice.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-code-check-failed-notice.tsx
index 555116ea24..3be04b5221 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-code-check-failed-notice.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-code-check-failed-notice.tsx
@@ -1,28 +1,14 @@
import { memo } from 'react'
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import OLNotification from '@/features/ui/components/ol/ol-notification'
-import { bsVersion } from '@/features/utils/bootstrap-5'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PdfCodeCheckFailedNotice() {
const { t } = useTranslation()
return (
-
- {' '}
- >
- }
- />
- {t('code_check_failed_explanation')}
- >
- }
- className={bsVersion({ bs5: 'm-0', bs3: 'mb-2' })}
+ content={t('code_check_failed_explanation')}
+ className="m-0"
/>
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-compile-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-compile-button.tsx
index 2f417620cf..b2b78d9e19 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-compile-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-compile-button.tsx
@@ -3,10 +3,7 @@ import { memo } from 'react'
import classNames from 'classnames'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error'
-import SplitMenu from '../../../shared/components/split-menu'
-import Icon from '../../../shared/components/icon'
import * as eventTracking from '../../../infrastructure/event-tracking'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import {
DropdownToggleCustom,
@@ -19,7 +16,6 @@ import {
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
import OLButton from '@/features/ui/components/ol/ol-button'
import OLButtonGroup from '@/features/ui/components/ol/ol-button-group'
-import { bsVersion, isBootstrap5 } from '@/features/utils/bootstrap-5'
import { useLayoutContext } from '@/shared/context/layout-context'
const modifierKey = /Mac/i.test(navigator.platform) ? 'Cmd' : 'Ctrl'
@@ -43,7 +39,6 @@ function PdfCompileButton() {
compiling,
draft,
hasChanges,
- setAnimateCompileDropdownArrow,
setAutoCompile,
setDraft,
setStopOnValidationError,
@@ -67,7 +62,6 @@ function PdfCompileButton() {
recompileFromScratch()
}
- const compileButtonLabel = compiling ? `${t('compiling')}…` : t('recompile')
const tooltipElement = (
<>
{t('recompile_pdf')}{' '}
@@ -81,288 +75,160 @@ function PdfCompileButton() {
'btn-striped-animated': hasChanges,
},
'no-left-border',
- bsVersion({ bs5: 'dropdown-button-toggle' })
+ 'dropdown-button-toggle'
)
const buttonClassName = classNames(
+ 'align-items-center py-0 no-left-radius px-3',
{
'btn-striped-animated': hasChanges,
- 'align-items-center py-0': isBootstrap5(),
- },
- 'no-left-radius px-3'
+ }
)
return (
-
+
+ startCompile(),
- text: compileButtonLabel,
- className: buttonClassName,
- }}
- dropdownToggle={{
- 'aria-label': t('toggle_compile_options_menu'),
- handleAnimationEnd: () => setAnimateCompileDropdownArrow(false),
- className: dropdownToggleClassName,
- }}
- dropdown={{
- id: 'pdf-recompile-dropdown',
- }}
+ isLoading={compiling}
+ onClick={() => startCompile()}
+ className={buttonClassName}
+ loadingLabel={`${t('compiling')}…`}
>
- {t('auto_compile')}
+ {t('recompile')}
+
+
-
+
+
+
+ {t('auto_compile')}
+
+
sendEventAndSet(true, setAutoCompile, 'auto-compile')
}
+ trailingIcon={autoCompile ? 'check' : null}
>
-
{t('on')}
-
-
-
+
+
+
+
sendEventAndSet(false, setAutoCompile, 'auto-compile')
}
+ trailingIcon={!autoCompile ? 'check' : null}
>
-
{t('off')}
-
-
- {t('compile_mode')}
-
- sendEventAndSet(false, setDraft, 'compile-mode')}
+
+
+
+ {t('compile_mode')}
+
+ sendEventAndSet(false, setDraft, 'compile-mode')}
+ trailingIcon={!draft ? 'check' : null}
>
-
{t('normal')}
-
-
- sendEventAndSet(true, setDraft, 'compile-mode')}
+
+
+
+ sendEventAndSet(true, setDraft, 'compile-mode')}
+ trailingIcon={draft ? 'check' : null}
>
-
- {t('fast')} [draft]
-
-
- Syntax Checks
-
-
+ {t('fast')} [draft]
+
+
+
+ Syntax Checks
+
+
sendEventAndSet(true, setStopOnValidationError, 'syntax-check')
}
+ trailingIcon={stopOnValidationError ? 'check' : null}
>
-
{t('stop_on_validation_error')}
-
-
-
+
+
+
+
sendEventAndSet(false, setStopOnValidationError, 'syntax-check')
}
+ trailingIcon={!stopOnValidationError ? 'check' : null}
>
-
{t('ignore_validation_errors')}
-
-
- {t('compile_error_handling')}
-
-
-
+
+
+
+ {t('compile_error_handling')}
+
+
{t('stop_on_first_error')}
-
-
-
-
+
+
+
+
{t('try_to_compile_despite_errors')}
-
-
-
-
- stopCompile()}
+
+
+
+
+ stopCompile()}
disabled={!compiling}
aria-disabled={!compiling}
>
{t('stop_compile')}
-
-
-
+
+
+
{t('recompile_from_scratch')}
-
-
- }
- bs5={
-
-
- startCompile()}
- className={buttonClassName}
- >
- {t('recompile')}
-
-
-
-
-
-
- {t('auto_compile')}
-
-
- sendEventAndSet(true, setAutoCompile, 'auto-compile')
- }
- trailingIcon={autoCompile ? 'check' : null}
- >
- {t('on')}
-
-
-
-
- sendEventAndSet(false, setAutoCompile, 'auto-compile')
- }
- trailingIcon={!autoCompile ? 'check' : null}
- >
- {t('off')}
-
-
-
- {t('compile_mode')}
-
- sendEventAndSet(false, setDraft, 'compile-mode')}
- trailingIcon={!draft ? 'check' : null}
- >
- {t('normal')}
-
-
-
- sendEventAndSet(true, setDraft, 'compile-mode')}
- trailingIcon={draft ? 'check' : null}
- >
- {t('fast')} [draft]
-
-
-
- Syntax Checks
-
-
- sendEventAndSet(
- true,
- setStopOnValidationError,
- 'syntax-check'
- )
- }
- trailingIcon={stopOnValidationError ? 'check' : null}
- >
- {t('stop_on_validation_error')}
-
-
-
-
- sendEventAndSet(
- false,
- setStopOnValidationError,
- 'syntax-check'
- )
- }
- trailingIcon={!stopOnValidationError ? 'check' : null}
- >
- {t('ignore_validation_errors')}
-
-
-
- {t('compile_error_handling')}
-
-
- {t('stop_on_first_error')}
-
-
-
-
- {t('try_to_compile_despite_errors')}
-
-
-
-
- stopCompile()}
- disabled={!compiling}
- aria-disabled={!compiling}
- >
- {t('stop_compile')}
-
-
-
-
- {t('recompile_from_scratch')}
-
-
-
-
- }
- />
+
+
+
+
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-download-files-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-download-files-button.tsx
index a231d5b182..8cea50c369 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-download-files-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-download-files-button.tsx
@@ -1,16 +1,12 @@
-import { Dropdown as BS3Dropdown } from 'react-bootstrap'
-
import {
Dropdown,
DropdownMenu,
DropdownToggle,
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
import PdfFileList from './pdf-file-list'
-import ControlledDropdown from '../../../shared/components/controlled-dropdown'
import { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PdfDownloadFilesButton() {
const { compiling, fileList } = useCompileContext()
@@ -22,41 +18,19 @@ function PdfDownloadFilesButton() {
}
return (
-
-
-
-
-
-
- }
- bs5={
-
-
- {t('other_logs_and_files')}
-
-
-
-
-
- }
- />
+
+
+ {t('other_logs_and_files')}
+
+
+
+
+
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-file-list.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-file-list.tsx
index 0a635fac79..8ed0b86d9b 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-file-list.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-file-list.tsx
@@ -1,7 +1,5 @@
-import { MenuItem as BS3MenuItem } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { memo } from 'react'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import {
DropdownDivider,
DropdownHeader,
@@ -21,94 +19,42 @@ function PdfFileList({ fileList }: { fileList: PdfFileDataList }) {
}
return (
-
- {t('other_output_files')}
+ <>
+ {t('other_output_files')}
- {fileList.top.map(file => (
-
- {file.path}
-
- ))}
+ {fileList.top.map(file => (
+
+
+ {file.path}
+
+
+ ))}
- {fileList.other.length > 0 && fileList.top.length > 0 && (
-
- )}
+ {fileList.other.length > 0 && fileList.top.length > 0 && (
+
+ )}
- {fileList.other.map(file => (
-
- {file.path}
-
- ))}
+ {fileList.other.map(file => (
+
+
+ {file.path}
+
+
+ ))}
- {fileList.archive?.fileCount && fileList.archive?.fileCount > 0 && (
- 0 && (
+
+
-
- {t('download_all')} ({fileList.archive.fileCount})
-
-
- )}
- >
- }
- bs5={
- <>
- {t('other_output_files')}
-
- {fileList.top.map(file => (
-
-
- {file.path}
-
-
- ))}
-
- {fileList.other.length > 0 && fileList.top.length > 0 && (
-
- )}
-
- {fileList.other.map(file => (
-
-
- {file.path}
-
-
- ))}
-
- {fileList.archive?.fileCount !== undefined &&
- fileList.archive?.fileCount > 0 && (
-
-
- {t('download_all')} ({fileList.archive.fileCount})
-
-
- )}
- >
- }
- />
+ {t('download_all')} ({fileList.archive.fileCount})
+
+
+ )}
+ >
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-code-check-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-code-check-button.tsx
index 8f83f54c26..701fcccfb6 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-code-check-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-code-check-button.tsx
@@ -1,11 +1,8 @@
import { memo, useCallback } from 'react'
-import Icon from '../../../shared/components/icon'
import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import OLButton from '@/features/ui/components/ol/ol-button'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
-import { bsVersion } from '@/features/utils/bootstrap-5'
function PdfHybridCodeCheckButton() {
const { codeCheckFailed, error, toggleLogs } = useCompileContext()
@@ -27,17 +24,9 @@ function PdfHybridCodeCheckButton() {
disabled={Boolean(error)}
className="btn-toggle-logs toolbar-item"
onClick={handleClick}
- bs3Props={{
- bsSize: 'xsmall',
- }}
>
- }
- bs5={}
- />
-
- {t('code_check_failed')}
-
+
+ {t('code_check_failed')}
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-download-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-download-button.tsx
index c32ad063da..bf0b0378d2 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-download-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-download-button.tsx
@@ -2,11 +2,9 @@ import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useProjectContext } from '@/shared/context/project-context'
import { sendMB, isSmallDevice } from '@/infrastructure/event-tracking'
-import Icon from '@/shared/components/icon'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import OLButton from '@/features/ui/components/ol/ol-button'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PdfHybridDownloadButton() {
const { pdfDownloadUrl } = useCompileContext()
@@ -51,10 +49,7 @@ function PdfHybridDownloadButton() {
style={{ pointerEvents: 'auto' }}
aria-label={t('download_pdf')}
>
- }
- bs5={}
- />
+
)
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-logs-button.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-logs-button.tsx
index 854c526105..4d979f643b 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-logs-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-hybrid-logs-button.tsx
@@ -1,13 +1,11 @@
import { memo, useCallback } from 'react'
import { useTranslation } from 'react-i18next'
-import Icon from '@/shared/components/icon'
import MaterialIcon from '@/shared/components/material-icon'
import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
import * as eventTracking from '@/infrastructure/event-tracking'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import OLButton from '@/features/ui/components/ol/ol-button'
import OLBadge from '@/features/ui/components/ol/ol-badge'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PdfHybridLogsButton() {
const { error, logEntries, toggleLogs, showLogs, stoppedOnFirstError } =
@@ -42,10 +40,7 @@ function PdfHybridLogsButton() {
style={{ position: 'relative' }}
aria-label={showLogs ? t('view_pdf') : t('view_logs')}
>
- }
- bs5={}
- />
+
{!showLogs && totalCount > 0 && (
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry-raw-content.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry-raw-content.tsx
index 42e89215b9..ab0957b331 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry-raw-content.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry-raw-content.tsx
@@ -49,10 +49,6 @@ export default function PdfLogEntryRawContent({
setExpanded(value => !value)}
>
{expanded ? (
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-preview-error.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-preview-error.tsx
index 87ccba2314..89387c232e 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-preview-error.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-preview-error.tsx
@@ -25,7 +25,6 @@ function PdfPreviewError({ error }: { error: string }) {
startCompile()}
/>,
]}
@@ -284,7 +283,6 @@ function TimedOutLogEntry() {
,
]}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-preview-hybrid-toolbar.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-preview-hybrid-toolbar.tsx
index b91778d63a..4a000e9a41 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-preview-hybrid-toolbar.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-preview-hybrid-toolbar.tsx
@@ -9,8 +9,6 @@ import PdfHybridDownloadButton from './pdf-hybrid-download-button'
import PdfHybridCodeCheckButton from './pdf-hybrid-code-check-button'
import PdfOrphanRefreshButton from './pdf-orphan-refresh-button'
import { DetachedSynctexControl } from './detach-synctex-control'
-import Icon from '../../../shared/components/icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import { Spinner } from 'react-bootstrap-5'
const ORPHAN_UI_TIMEOUT_MS = 5000
@@ -90,16 +88,11 @@ function PdfPreviewHybridToolbarConnectingInner() {
return (
<>
-
}
- bs5={
-
- }
+
{t('tab_connecting')}…
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx
index fcb8bf27c4..78e288dcb0 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx
@@ -5,7 +5,6 @@ import { getJSON } from '../../../infrastructure/fetch-json'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useLayoutContext } from '../../../shared/context/layout-context'
import useScopeValue from '../../../shared/hooks/use-scope-value'
-import Icon from '../../../shared/components/icon'
import { useTranslation } from 'react-i18next'
import useIsMounted from '../../../shared/hooks/use-is-mounted'
import useAbortController from '../../../shared/hooks/use-abort-controller'
@@ -19,10 +18,8 @@ import { debugConsole } from '@/utils/debugging'
import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import OLButton from '@/features/ui/components/ol/ol-button'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import { Spinner } from 'react-bootstrap-5'
-import { bsVersion } from '@/features/utils/bootstrap-5'
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
import useEventListener from '@/shared/hooks/use-event-listener'
import { PdfScrollPosition } from '@/shared/hooks/use-pdf-scroll-position'
@@ -49,29 +46,11 @@ function GoToCodeButton({
let buttonIcon = null
if (syncToCodeInFlight) {
buttonIcon = (
-
}
- bs5={
-
- }
- />
+
)
} else if (!isDetachLayout) {
buttonIcon = (
-
}
- bs5={
-
- }
- />
+
)
}
@@ -96,9 +75,6 @@ function GoToCodeButton({
disabled={syncToCodeInFlight}
className={buttonClasses}
aria-label={t('go_to_pdf_location_in_code')}
- bs3Props={{
- bsSize: 'xsmall',
- }}
>
{buttonIcon}
{isDetachLayout ?
{t('show_in_code')} : ''}
@@ -122,40 +98,18 @@ function GoToPdfButton({
}) {
const { t } = useTranslation()
const tooltipPlacement = isDetachLayout ? 'bottom' : 'right'
- const buttonClasses = classNames(
- 'synctex-control',
- bsVersion({ bs3: 'toolbar-btn-secondary' }),
- {
- 'detach-synctex-control': !!isDetachLayout,
- }
- )
+ const buttonClasses = classNames('synctex-control', {
+ 'detach-synctex-control': !!isDetachLayout,
+ })
let buttonIcon = null
if (syncToPdfInFlight) {
buttonIcon = (
-
}
- bs5={
-
- }
- />
+
)
} else if (!isDetachLayout) {
buttonIcon = (
-
}
- bs5={
-
- }
- />
+
)
}
@@ -172,9 +126,6 @@ function GoToPdfButton({
disabled={syncToPdfInFlight || !canSyncToPdf}
className={buttonClasses}
aria-label={t('go_to_code_location_in_pdf')}
- bs3Props={{
- bsSize: 'xsmall',
- }}
>
{buttonIcon}
{isDetachLayout ?
{t('show_in_pdf')} : ''}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-zoom-dropdown.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-zoom-dropdown.tsx
index 8b3f1f4a76..75d0663c80 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-zoom-dropdown.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-zoom-dropdown.tsx
@@ -1,9 +1,6 @@
-import { Dropdown as BS3Dropdown, MenuItem } from 'react-bootstrap'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
-import ControlledDropdown from '@/shared/components/controlled-dropdown'
import classNames from 'classnames'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import {
Dropdown,
DropdownDivider,
@@ -59,215 +56,117 @@ function PdfZoomDropdown({
const showPresentOption = document.fullscreenEnabled
return (
-
{
- if (eventKey === 'custom-zoom') {
- return
- }
+ {
+ if (eventKey === 'custom-zoom') {
+ return
+ }
- if (eventKey === 'present') {
- requestPresentationMode()
- return
- }
+ if (eventKey === 'present') {
+ requestPresentationMode()
+ return
+ }
- setZoom(eventKey)
- }}
- pullRight
- >
-
-
-
-
-
-
-
-
- {showPresentOption && }
- {showPresentOption && (
-
- )}
-
-
- {zoomValues.map(value => (
-
- ))}
-
-
- }
- bs5={
- {
- if (eventKey === 'custom-zoom') {
- return
- }
-
- if (eventKey === 'present') {
- requestPresentationMode()
- return
- }
-
- setZoom(eventKey)
- }}
- align="end"
- >
-
+
+ {rawScaleToPercentage(rawScale)}
+
+
+
+
- {rawScaleToPercentage(rawScale)}
-
-
-
-
- event.target.select()}
- value={customZoomValue}
- onKeyDown={event => {
- if (event.key === 'Enter') {
- const zoom =
- Number(customZoomValue.replace('%', '')) / 100
+ event.target.select()}
+ value={customZoomValue}
+ onKeyDown={event => {
+ if (event.key === 'Enter') {
+ const zoom = Number(customZoomValue.replace('%', '')) / 100
- // Only allow zoom values between 10% and 999%
- if (zoom < 0.1) {
- setZoom('0.1')
- } else if (zoom > 9.99) {
- setZoom('9.99')
- } else {
- setZoom(`${zoom}`)
- }
- }
- }}
- onChange={event => {
- const rawValue = event.target.value
- const parsedValue = rawValue.replace(/[^0-9%]/g, '')
- setCustomZoomValue(parsedValue)
- }}
- />
-
-
-
-
- }
- >
- {t('zoom_in')}
-
-
-
- }
- >
- {t('zoom_out')}
-
-
-
- }
- >
- {t('fit_to_width')}
-
-
-
- }
- >
- {t('fit_to_height')}
-
-
- {showPresentOption && }
- {showPresentOption && (
-
-
- {t('presentation_mode')}
-
-
- )}
-
- {t('zoom_to')}
- {zoomValues.map(value => (
-
-
- {rawScaleToPercentage(Number(value))}
-
-
- ))}
-
-
- }
- />
+ // Only allow zoom values between 10% and 999%
+ if (zoom < 0.1) {
+ setZoom('0.1')
+ } else if (zoom > 9.99) {
+ setZoom('9.99')
+ } else {
+ setZoom(`${zoom}`)
+ }
+ }
+ }}
+ onChange={event => {
+ const rawValue = event.target.value
+ const parsedValue = rawValue.replace(/[^0-9%]/g, '')
+ setCustomZoomValue(parsedValue)
+ }}
+ />
+
+
+
+
+ }
+ >
+ {t('zoom_in')}
+
+
+
+ }
+ >
+ {t('zoom_out')}
+
+
+
+ }
+ >
+ {t('fit_to_width')}
+
+
+
+ }
+ >
+ {t('fit_to_height')}
+
+
+ {showPresentOption && }
+ {showPresentOption && (
+
+
+ {t('presentation_mode')}
+
+
+ )}
+
+ {t('zoom_to')}
+ {zoomValues.map(value => (
+
+
+ {rawScaleToPercentage(Number(value))}
+
+
+ ))}
+
+
)
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/stop-on-first-error-prompt.tsx b/services/web/frontend/js/features/pdf-preview/components/stop-on-first-error-prompt.tsx
index d1b222261b..a693d57e70 100644
--- a/services/web/frontend/js/features/pdf-preview/components/stop-on-first-error-prompt.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/stop-on-first-error-prompt.tsx
@@ -28,12 +28,7 @@ export default function StopOnFirstErrorPrompt() {
// eslint-disable-next-line react/jsx-key
components={[]}
/>{' '}
-
+
{t('disable_stop_on_first_error')}
>
diff --git a/services/web/frontend/js/features/pdf-preview/components/switch-to-editor-button.tsx b/services/web/frontend/js/features/pdf-preview/components/switch-to-editor-button.tsx
index dab10e8e80..4b94825e04 100644
--- a/services/web/frontend/js/features/pdf-preview/components/switch-to-editor-button.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/switch-to-editor-button.tsx
@@ -1,8 +1,6 @@
import { useTranslation } from 'react-i18next'
-import Icon from '../../../shared/components/icon'
import MaterialIcon from '@/shared/components/material-icon'
import OLButton from '@/features/ui/components/ol/ol-button'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import { useLayoutContext } from '../../../shared/context/layout-context'
function SwitchToEditorButton() {
@@ -26,19 +24,8 @@ function SwitchToEditorButton() {
}
return (
-
- }
- bs5={}
- />
+
+
{t('switch_to_editor')}
)
diff --git a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx
index 1572eb95a0..e8ae9a9b84 100644
--- a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx
@@ -177,7 +177,6 @@ const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
className="btn-inline-link fw-bold"
size="sm"
onClick={handleEnableStopOnFirstErrorClick}
- bs3Props={{ bsSize: 'xsmall' }}
/>,
// eslint-disable-next-line react/jsx-key
,
diff --git a/services/web/frontend/js/features/preview/components/preview-log-entry-header.tsx b/services/web/frontend/js/features/preview/components/preview-log-entry-header.tsx
index 8a6842f4ff..28f163a753 100644
--- a/services/web/frontend/js/features/preview/components/preview-log-entry-header.tsx
+++ b/services/web/frontend/js/features/preview/components/preview-log-entry-header.tsx
@@ -3,9 +3,7 @@ import { useState, useRef, MouseEventHandler } from 'react'
import { useTranslation } from 'react-i18next'
import useResizeObserver from '../hooks/use-resize-observer'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
-import Icon from '../../../shared/components/icon'
import OLButton from '@/features/ui/components/ol/ol-button'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import MaterialIcon from '@/shared/components/material-icon'
import { ErrorLevel, SourceLocation } from '@/features/pdf-preview/util/types'
@@ -91,15 +89,7 @@ function PreviewLogEntryHeader({
aria-label={headerLogLocationTitle}
onClick={onSourceLocationClick}
>
-
-
-
- >
- }
- bs5={}
- />
+
{`\u202A${locationLinkText}\u202C`}
diff --git a/services/web/frontend/js/features/preview/components/preview-logs-pane-max-entries.jsx b/services/web/frontend/js/features/preview/components/preview-logs-pane-max-entries.jsx
index 82fd59195c..774dba826e 100644
--- a/services/web/frontend/js/features/preview/components/preview-logs-pane-max-entries.jsx
+++ b/services/web/frontend/js/features/preview/components/preview-logs-pane-max-entries.jsx
@@ -3,11 +3,9 @@ import PropTypes from 'prop-types'
import { Trans, useTranslation } from 'react-i18next'
import OLButton from '@/features/ui/components/ol/ol-button'
import PreviewLogEntryHeader from './preview-log-entry-header'
-import Icon from '../../../shared/components/icon'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error'
import MaterialIcon from '@/shared/components/material-icon'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown, hasErrors }) {
const { t } = useTranslation()
@@ -36,12 +34,7 @@ function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown, hasErrors }) {
{hasErrors && !stoppedOnFirstError ? (
<>
- }
- bs5={
-
- }
- />
+
{t('tip')}:
,
// eslint-disable-next-line jsx-a11y/anchor-has-content
@@ -66,10 +58,7 @@ function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown, hasErrors }) {
>
) : (
- }
- bs5={}
- />
+
{t('tip')}:
{t('log_entry_maximum_entries_see_full_logs')}
diff --git a/services/web/frontend/js/features/review-panel-new/components/review-panel-comment-options.tsx b/services/web/frontend/js/features/review-panel-new/components/review-panel-comment-options.tsx
index eacb1fa134..1da2aff66e 100644
--- a/services/web/frontend/js/features/review-panel-new/components/review-panel-comment-options.tsx
+++ b/services/web/frontend/js/features/review-panel-new/components/review-panel-comment-options.tsx
@@ -1,12 +1,6 @@
-import ControlledDropdown from '@/shared/components/controlled-dropdown'
import MaterialIcon from '@/shared/components/material-icon'
import { FC, memo, forwardRef } from 'react'
-import {
- Dropdown as BS3Dropdown,
- MenuItem as BS3MenuItem,
-} from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import {
Dropdown,
DropdownItem,
@@ -38,61 +32,35 @@ const ReviewPanelCommentOptions: FC<{
}
return (
-