diff --git a/services/web/frontend/js/features/ide-redesign/utils/new-editor-utils.ts b/services/web/frontend/js/features/ide-redesign/utils/new-editor-utils.ts
index 8c0499357a..fa6d0d9f1e 100644
--- a/services/web/frontend/js/features/ide-redesign/utils/new-editor-utils.ts
+++ b/services/web/frontend/js/features/ide-redesign/utils/new-editor-utils.ts
@@ -41,18 +41,6 @@ export const canUseNewEditor = () => {
)
}
-const canUseNewLogs = () => {
- const newUserTestVariant = getSplitTestVariant('editor-redesign-new-users')
- const canUseNewLogsViaNewUserFeatureFlag =
- isNewUser() &&
- (newUserTestVariant === 'new-editor' ||
- newUserTestVariant === 'new-editor-new-logs-old-position')
-
- return (
- canUseNewEditorViaPrimaryFeatureFlag() || canUseNewLogsViaNewUserFeatureFlag
- )
-}
-
export const useIsNewEditorEnabledViaPrimaryFeatureFlag = () => {
const { userSettings } = useUserSettingsContext()
const hasAccess = canUseNewEditorViaPrimaryFeatureFlag()
@@ -67,15 +55,8 @@ export const useIsNewEditorEnabled = () => {
return hasAccess && enabled
}
-export const useAreNewErrorLogsEnabled = () => {
- const newEditorEnabled = useIsNewEditorEnabled()
- return newEditorEnabled && canUseNewLogs()
-}
-
export function useNewEditorVariant() {
const newEditor = useIsNewEditorEnabled()
- const newErrorLogs = useAreNewErrorLogsEnabled()
if (!newEditor) return 'default'
- if (!newErrorLogs) return 'new-editor-old-logs'
return 'new-editor-new-logs-old-position'
}
diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry.tsx
index d0e574d5ad..e2e7e5893a 100644
--- a/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry.tsx
+++ b/services/web/frontend/js/features/pdf-preview/components/pdf-log-entry.tsx
@@ -4,9 +4,9 @@ import PdfLogEntryContent from './pdf-log-entry-content'
import HumanReadableLogsHints from '../../../ide/human-readable-logs/HumanReadableLogsHints'
import getMeta from '@/utils/meta'
import { ErrorLevel, LogEntry, SourceLocation } from '../util/types'
-import { useAreNewErrorLogsEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
import NewLogEntry from '@/features/ide-redesign/components/error-logs/log-entry'
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
+import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
function PdfLogEntry({
autoExpand,
@@ -71,9 +71,9 @@ function PdfLogEntry({
[level, onSourceLocationClick, ruleId, sourceLocation, sendEvent]
)
- const newErrorlogs = useAreNewErrorLogsEnabled()
+ const newEditor = useIsNewEditorEnabled()
- if (newErrorlogs) {
+ if (newEditor) {
return (
)}
- {newErrorLogs && }
+ {newEditor && }
{compileTimeout < 60 && }
@@ -51,7 +47,7 @@ function PdfPreviewPane() {
- {newErrorLogs ? : }
+ {newEditor ? : }
{pdfPromotions.map(({ import: { default: Component }, path }) => (
))}
diff --git a/services/web/frontend/js/features/pdf-preview/hooks/use-log-events.ts b/services/web/frontend/js/features/pdf-preview/hooks/use-log-events.ts
index 4bed8a5500..05396aa597 100644
--- a/services/web/frontend/js/features/pdf-preview/hooks/use-log-events.ts
+++ b/services/web/frontend/js/features/pdf-preview/hooks/use-log-events.ts
@@ -1,8 +1,8 @@
import { useCallback } from 'react'
import { useLayoutContext } from '@/shared/context/layout-context'
-import { useAreNewErrorLogsEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
import { useEditorContext } from '@/shared/context/editor-context'
import useEventListener from '@/shared/hooks/use-event-listener'
+import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
function scrollIntoView(element: Element) {
setTimeout(() => {
@@ -18,7 +18,7 @@ function scrollIntoView(element: Element) {
*/
export const useLogEvents = (setShowLogs: (show: boolean) => void) => {
const { pdfLayout, setView } = useLayoutContext()
- const newLogs = useAreNewErrorLogsEnabled()
+ const newEditor = useIsNewEditorEnabled()
const { hasPremiumSuggestion } = useEditorContext()
const selectLogOldLogs = useCallback((id: string, suggestFix: boolean) => {
@@ -117,7 +117,7 @@ export const useLogEvents = (setShowLogs: (show: boolean) => void) => {
openLogs()
- if (newLogs) {
+ if (newEditor) {
selectLogNewLogs(
id,
Boolean(suggestFix),
@@ -127,7 +127,7 @@ export const useLogEvents = (setShowLogs: (show: boolean) => void) => {
selectLogOldLogs(id, Boolean(suggestFix))
}
},
- [openLogs, selectLogNewLogs, selectLogOldLogs, newLogs]
+ [openLogs, selectLogNewLogs, selectLogOldLogs, newEditor]
)
useEventListener(
diff --git a/services/web/test/frontend/components/pdf-preview/new-editor-utils.test.tsx b/services/web/test/frontend/components/pdf-preview/new-editor-utils.test.tsx
index baaa8b1998..bcacd7898b 100644
--- a/services/web/test/frontend/components/pdf-preview/new-editor-utils.test.tsx
+++ b/services/web/test/frontend/components/pdf-preview/new-editor-utils.test.tsx
@@ -14,7 +14,7 @@ describe('new-editor-utils', function () {
},
{
splitTestVariant: 'new-editor-old-logs',
- uiVariant: 'new-editor-old-logs',
+ uiVariant: 'new-editor-new-logs-old-position',
},
{
splitTestVariant: 'new-editor-new-logs-old-position',