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 973712a412..2e08212699 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 @@ -7,12 +7,10 @@ import * as eventTracking from '../../../infrastructure/event-tracking' import getMeta from '@/utils/meta' import { populateEditorRedesignSegmentation } from '@/shared/hooks/use-editor-analytics' import CompileTimeoutPaywallModal from '@/features/pdf-preview/components/compile-timeout-paywall-modal' -import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils' import { isSplitTestEnabled } from '@/utils/splitTestUtils' function TimeoutUpgradePromptNew() { const { isProjectOwner } = useDetachCompileContext() - const newEditor = useIsNewEditorEnabled() const isCompileTimeoutTargetPlansEnabled = isSplitTestEnabled( 'compile-timeout-target-plans' @@ -25,15 +23,12 @@ function TimeoutUpgradePromptNew() { const sharedSegmentation = useMemo( () => - populateEditorRedesignSegmentation( - { - 'is-owner': isProjectOwner, - compileTime: compileTimeout, - location: 'logs', - }, - newEditor - ), - [isProjectOwner, compileTimeout, newEditor] + populateEditorRedesignSegmentation({ + 'is-owner': isProjectOwner, + compileTime: compileTimeout, + location: 'logs', + }), + [isProjectOwner, compileTimeout] ) return ( @@ -66,12 +61,11 @@ const CompileTimeout = memo(function CompileTimeout({ isCompileTimeoutTargetPlansEnabled, }: CompileTimeoutProps) { const { t } = useTranslation() - const newEditor = useIsNewEditorEnabled() const extraSearchParams = useMemo(() => { return { - itm_content: newEditor ? 'new-editor' : 'old-editor', + itm_content: 'new-editor', } - }, [newEditor]) + }, []) const handleFreeTrialClick = useCallback( (event: React.MouseEvent) => { diff --git a/services/web/frontend/js/shared/components/panel-heading.tsx b/services/web/frontend/js/shared/components/panel-heading.tsx deleted file mode 100644 index 0184e23c4f..0000000000 --- a/services/web/frontend/js/shared/components/panel-heading.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { FC } from 'react' -import SplitTestBadge from '@/shared/components/split-test-badge' -import MaterialIcon from '@/shared/components/material-icon' -import { useTranslation } from 'react-i18next' -import OLTooltip from '@/shared/components/ol/ol-tooltip' - -// TODO ide-redesign-cleanup: Remove this component and only use RailPanelHeader -export const PanelHeading: FC< - React.PropsWithChildren<{ - title: string - splitTestName?: string - children?: React.ReactNode - handleClose(): void - }> -> = ({ title, splitTestName, children, handleClose }) => { - const { t } = useTranslation() - - return ( -
-
- {title} - {splitTestName && ( - - )} -
- - {children} - - - -
- ) -} diff --git a/services/web/frontend/js/shared/hooks/use-editor-analytics.ts b/services/web/frontend/js/shared/hooks/use-editor-analytics.ts index 0116e5b05a..02f0059805 100644 --- a/services/web/frontend/js/shared/hooks/use-editor-analytics.ts +++ b/services/web/frontend/js/shared/hooks/use-editor-analytics.ts @@ -1,4 +1,3 @@ -import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils' import { Segmentation, sendMB, @@ -10,22 +9,17 @@ import { useCallback } from 'react' export function populateEditorRedesignSegmentation< SegmentationType extends Segmentation, >( - segmentation: SegmentationType | undefined = {} as SegmentationType, - editorRedesign: boolean + segmentation: SegmentationType | undefined = {} as SegmentationType ): SegmentationType & { 'editor-redesign'?: 'enabled' } { - return editorRedesign - ? { ...segmentation, 'editor-redesign': 'enabled' } - : segmentation + return { ...segmentation, 'editor-redesign': 'enabled' } } export const useEditorAnalytics = () => { - const editorRedesign = useIsNewEditorEnabled() - const populateSegmentation = useCallback( (segmentation: Segmentation | undefined = {}): Segmentation => { - return populateEditorRedesignSegmentation(segmentation, editorRedesign) + return populateEditorRedesignSegmentation(segmentation) }, - [editorRedesign] + [] ) const sendEvent: typeof sendMB = useCallback( diff --git a/services/web/frontend/stylesheets/components/all.scss b/services/web/frontend/stylesheets/components/all.scss index 6a093459a0..25fe514299 100644 --- a/services/web/frontend/stylesheets/components/all.scss +++ b/services/web/frontend/stylesheets/components/all.scss @@ -40,7 +40,6 @@ @import 'tos'; @import 'collapsible-file-header'; @import 'radio-chip'; -@import 'panel-heading'; @import 'menu-bar'; @import 'invite'; @import 'upgrade-prompt'; diff --git a/services/web/frontend/stylesheets/components/panel-heading.scss b/services/web/frontend/stylesheets/components/panel-heading.scss deleted file mode 100644 index 71df17e601..0000000000 --- a/services/web/frontend/stylesheets/components/panel-heading.scss +++ /dev/null @@ -1,44 +0,0 @@ -:root { - --panel-heading-color: var(--content-primary); - --panel-heading-button-hover-color: var(--bg-light-tertiary); - - @include theme('default') { - .ide-redesign-main { - --panel-heading-color: var(--content-primary-dark); - --panel-heading-button-hover-color: var(--bg-dark-tertiary); - } - } -} - -.panel-heading { - color: var(--panel-heading-color); - display: flex; - align-items: center; - padding: var(--spacing-03) var(--spacing-02); - gap: 2px; -} - -.panel-heading-label { - font-size: var(--font-size-02); - font-weight: bold; - margin: 0; - flex: 1; - text-align: start; - display: flex; - align-items: center; - gap: var(--spacing-02); -} - -.panel-heading-close-button { - display: flex; - align-items: center; - border: none; - background-color: transparent; - color: var(--panel-heading-color); - padding: var(--spacing-01); - - &:hover, - &:focus { - background-color: var(--panel-heading-button-hover-color); - } -} diff --git a/services/web/locales/en.json b/services/web/locales/en.json index d68dc857f2..39f1565ddb 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2272,7 +2272,6 @@ "standard": "Standard", "start_a_free_trial": "Start a free trial", "start_by_adding_your_email": "Start by adding your email address.", - "start_by_fixing_the_first_error_in_your_doc": "Start by fixing the first error in your doc to avoid problems later on.", "start_by_fixing_the_first_error_in_your_document": "Start by fixing the first error in the document to avoid cascading problems later on.", "start_free_trial": "Start Free Trial!", "start_free_trial_without_exclamation": "Start Free Trial", @@ -2586,7 +2585,6 @@ "trial_remaining_days": "__days__ more days on your Overleaf Premium trial", "tried_to_log_in_with_email": "You’ve tried to log in with __email__.", "tried_to_register_with_email": "You’ve tried to register with __email__, which is already registered with __appName__ as an institutional account.", - "troubleshooting_tip": "Troubleshooting tip", "try_again": "Please try again", "try_for_free": "Try for free", "try_it_for_free": "Try it for free", @@ -2856,8 +2854,6 @@ "you_cant_reset_password_due_to_sso": "You can’t reset your password because your group or organization uses SSO. <0>Log in with SSO.", "you_dont_have_any_add_ons_on_your_account": "You don’t have any add-ons on your account.", "you_dont_have_any_repositories": "You don’t have any repositories", - "you_have_0_free_suggestions_left": "You have 0 free suggestions left", - "you_have_1_free_suggestion_left": "You have 1 free suggestion left", "you_have_1_license_and_your_plan_supports_up_to_y": "You have allocated 1 license and your plan supports up to __groupSize__.", "you_have_added_x_of_group_size_y": "You have added <0>__addedUsersSize__ of <1>__groupSize__ available members", "you_have_been_invited_to_transfer_management_of_your_account": "You have been invited to transfer management of your account.", diff --git a/services/web/modules/full-project-search/frontend/js/components/full-project-search-ui.tsx b/services/web/modules/full-project-search/frontend/js/components/full-project-search-ui.tsx index 98dae70468..64042a47fc 100644 --- a/services/web/modules/full-project-search/frontend/js/components/full-project-search-ui.tsx +++ b/services/web/modules/full-project-search/frontend/js/components/full-project-search-ui.tsx @@ -28,14 +28,12 @@ import { useUserSettingsContext } from '@/shared/context/user-settings-context' import { FullProjectMatchCounts } from './full-project-match-counts' import { FullProjectSearchModifiers } from './full-project-search-modifiers' import { isMac } from '@/shared/utils/os' -import { PanelHeading } from '@/shared/components/panel-heading' import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context' import { createRegExp } from '@/features/source-editor/utils/regexp' import { useEditorOpenDocContext } from '@/features/ide-react/context/editor-open-doc-context' import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path' import { FullProjectSearchResults } from './full-project-search-results' import { signalWithTimeout } from '@/utils/abort-signal' -import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils' import RailPanelHeader from '@/features/ide-react/components/rail/rail-panel-header' import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme' @@ -45,7 +43,6 @@ const FullProjectSearchUI: FC = () => { const { projectSnapshot } = useProjectContext() const { openDocs } = useEditorManagerContext() const { pathInFolder } = useFileTreePathContext() - const newEditor = useIsNewEditorEnabled() const { currentDocument: currentDoc } = useEditorOpenDocContext() @@ -111,11 +108,7 @@ const FullProjectSearchUI: FC = () => { await projectSnapshot.refresh() if (!abortControllerRef.current.signal.aborted) { - const results = await searchSnapshot( - projectSnapshot, - searchQuery, - newEditor - ) + const results = await searchSnapshot(projectSnapshot, searchQuery) setMatchedFiles(results) } } catch (error) { @@ -125,7 +118,7 @@ const FullProjectSearchUI: FC = () => { setLoading(false) } }, - [openDocs, projectSnapshot, t, newEditor] + [openDocs, projectSnapshot, t] ) const searchInputRef = useRef(null) @@ -191,15 +184,7 @@ const FullProjectSearchUI: FC = () => { style={variableStyle} data-bs-theme={activeOverallTheme === 'light' ? 'light' : 'dark'} > - {newEditor ? ( - - ) : ( - setProjectSearchIsOpen(false)} - splitTestName="full-project-search" - /> - )} +
string.toLowerCase() export const searchSnapshot = async ( projectSnapshot: ProjectSnapshot, - searchQuery: SearchQuery, - newEditor: boolean + searchQuery: SearchQuery ) => { if (!searchQuery.search.trim().length) { return @@ -86,14 +85,11 @@ export const searchSnapshot = async ( sendSearchEvent( 'search-execute', - populateEditorRedesignSegmentation( - { - searchType: 'full-project', - totalDocs: docPaths.length, - totalResults: results.flatMap(file => file.hits).length, - }, - newEditor - ) + populateEditorRedesignSegmentation({ + searchType: 'full-project', + totalDocs: docPaths.length, + totalResults: results.flatMap(file => file.hits).length, + }) ) return results diff --git a/services/web/modules/full-project-search/frontend/stylesheets/full-project-search.scss b/services/web/modules/full-project-search/frontend/stylesheets/full-project-search.scss index b434205a63..8a3dfcef27 100644 --- a/services/web/modules/full-project-search/frontend/stylesheets/full-project-search.scss +++ b/services/web/modules/full-project-search/frontend/stylesheets/full-project-search.scss @@ -34,7 +34,6 @@ --matched-hit-selected-unfocused-highlight-color: var(--content-primary); --collapsible-file-header-count-color: var(--content-primary); --collapsible-file-header-count-bg-color: var(--bg-light-tertiary); - --panel-heading-color: var(--content-primary-dark); --search-modifier-checked-bg: var(--green-70); --search-modifier-hover-color: var(--bg-dark-secondary); @@ -144,7 +143,6 @@ --matched-hit-selected-unfocused-highlight-color: var(--bg-dark-primary); --collapsible-file-header-count-color: var(--bs-body-color); --collapsible-file-header-count-bg-color: var(--bg-dark-secondary); - --panel-heading-color: var(--content-primary-dark); --search-modifier-checked-bg: var(--neutral-90); --search-modifier-hover-color: var(--neutral-70); @@ -157,15 +155,6 @@ color: inherit; } } - - .panel-heading-close-button { - color: var(--content-primary-dark); - - &:hover, - &:focus { - color: var(--content-primary); - } - } } position: absolute; @@ -185,10 +174,6 @@ font-weight: bold; } - .panel-heading-label { - margin-left: var(--spacing-02); - } - .full-project-search-form { padding: 8px; flex-shrink: 0;