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 (
-