Bootstrap 3 cleanup from the IDE page - #2 (#24175)

* Remove skipLoadingStyleSheet

* Remove unused bootstrap-5 assignment from the Account settings page since it's archived

* Remove bsVersionIcon

* Remove bsVersion, bootstrapVersion and isBootstrap5 from elements on the IDE page

* Remove BS3Dropdown from the context menu

* Cleanup Bootstrap 3 related comment and type

GitOrigin-RevId: a67244eb78943ee84cc5f89bae164c0361e8fc13
This commit is contained in:
Rebeka Dekany
2025-03-11 09:05:00 +00:00
committed by Copybot
parent 6a344c7a52
commit 69bc8a135b
15 changed files with 16 additions and 134 deletions
@@ -303,7 +303,7 @@ const searchFormTheme = EditorView.theme({
padding: 'var(--spacing-03) var(--spacing-05)',
},
},
'&.bootstrap-5 .ol-cm-search-form': {
'&.ol-cm-search-form': {
'--ol-cm-search-form-gap': 'var(--spacing-05)',
'--ol-cm-search-form-button-margin': 'var(--spacing-02)',
'--input-border': 'var(--border-primary)',
@@ -19,7 +19,6 @@ type Options = {
fontFamily: FontFamily
lineHeight: LineHeight
overallTheme: OverallTheme
bootstrapVersion: 3 | 5
}
export const theme = (options: Options) => [
@@ -60,7 +59,6 @@ const createThemeFromOptions = ({
fontFamily = 'monaco',
lineHeight = 'normal',
overallTheme = '',
bootstrapVersion = 3,
}: Options) => {
// Theme styles that depend on settings.
const styles = userStyles({ fontSize, fontFamily, lineHeight })
@@ -68,8 +66,7 @@ const createThemeFromOptions = ({
return [
EditorView.editorAttributes.of({
class: classNames(
overallTheme === '' ? 'overall-theme-dark' : 'overall-theme-light',
'bootstrap-' + bootstrapVersion
overallTheme === '' ? 'overall-theme-dark' : 'overall-theme-light'
),
style: Object.entries({
'--font-size': styles.fontSize,
@@ -56,7 +56,6 @@ import { useRangesContext } from '@/features/review-panel-new/context/ranges-con
import { updateRanges } from '@/features/source-editor/extensions/ranges'
import { useThreadsContext } from '@/features/review-panel-new/context/threads-context'
import { useHunspell } from '@/features/source-editor/hooks/use-hunspell'
import { isBootstrap5 } from '@/features/utils/bootstrap-5'
import { Permissions } from '@/features/ide-react/types/permissions'
import { lineHeights } from '@/shared/utils/styles'
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
@@ -130,7 +129,6 @@ function useCodeMirrorScope(view: EditorView) {
lineHeight,
overallTheme,
editorTheme,
bootstrapVersion: 3 as 3 | 5,
})
useEffect(() => {
@@ -140,7 +138,6 @@ function useCodeMirrorScope(view: EditorView) {
lineHeight,
overallTheme,
editorTheme,
bootstrapVersion: isBootstrap5() ? 5 : 3,
}
view.dispatch(
@@ -149,7 +146,6 @@ function useCodeMirrorScope(view: EditorView) {
fontSize,
lineHeight,
overallTheme,
bootstrapVersion: themeRef.current.bootstrapVersion,
})
)