Explorar el Código

Merge pull request #3626 from overleaf/file-tree-release

[ReactFileTree] Release to Public \o/

GitOrigin-RevId: 8762168561b1c2533cbdb3f7bd47d6f99d9e9d61
Timothée Alby hace 5 años
padre
commit
a351265175

+ 1 - 1
services/web/app/src/Features/Project/ProjectController.js

@@ -867,7 +867,7 @@ const ProjectController = {
               showNewLogsUI: user.alphaProgram && !wantsOldLogsUI,
               showNewLogsUI: user.alphaProgram && !wantsOldLogsUI,
               showNewNavigationUI:
               showNewNavigationUI:
                 req.query && req.query.new_navigation_ui === 'true',
                 req.query && req.query.new_navigation_ui === 'true',
-              showReactFileTree: user.betaProgram && !wantsOldFileTreeUI
+              showReactFileTree: !wantsOldFileTreeUI
             })
             })
             timer.done()
             timer.done()
           }
           }

+ 0 - 1
services/web/frontend/extracted-translation-keys.json

@@ -42,7 +42,6 @@
   "file_already_exists",
   "file_already_exists",
   "file_already_exists_in_this_location",
   "file_already_exists_in_this_location",
   "file_outline",
   "file_outline",
-  "file_tree_badge_tooltip",
   "files_cannot_include_invalid_characters",
   "files_cannot_include_invalid_characters",
   "find_out_more_about_the_file_outline",
   "find_out_more_about_the_file_outline",
   "first_error_popup_label",
   "first_error_popup_label",

+ 0 - 29
services/web/frontend/js/features/file-tree/components/file-tree-badge.js

@@ -1,29 +0,0 @@
-import React from 'react'
-import { useTranslation } from 'react-i18next'
-import { OverlayTrigger, Tooltip } from 'react-bootstrap'
-
-function FileTreeBadge() {
-  const { t } = useTranslation()
-
-  const tooltip = (
-    <Tooltip id="file-tree-badge-tooltip">
-      {t('file_tree_badge_tooltip')}
-    </Tooltip>
-  )
-
-  return (
-    <OverlayTrigger placement="bottom" overlay={tooltip} delayHide={100}>
-      <a
-        href="/beta/participate"
-        target="_blank"
-        rel="noopener noreferrer"
-        className="badge beta-badge"
-        onClick={ev => ev.stopPropagation()}
-      >
-        <span className="sr-only">{t('file_tree_badge_tooltip')}</span>
-      </a>
-    </OverlayTrigger>
-  )
-}
-
-export default FileTreeBadge

+ 1 - 8
services/web/frontend/js/features/file-tree/components/file-tree-toolbar.js

@@ -7,8 +7,6 @@ import TooltipButton from '../../../shared/components/tooltip-button'
 import { FileTreeMainContext } from '../contexts/file-tree-main'
 import { FileTreeMainContext } from '../contexts/file-tree-main'
 import { useFileTreeActionable } from '../contexts/file-tree-actionable'
 import { useFileTreeActionable } from '../contexts/file-tree-actionable'
 
 
-import FileTreeBadge from './file-tree-badge'
-
 function FileTreeToolbar() {
 function FileTreeToolbar() {
   const { hasWritePermissions } = useContext(FileTreeMainContext)
   const { hasWritePermissions } = useContext(FileTreeMainContext)
 
 
@@ -74,11 +72,7 @@ function FileTreeToolbarRight() {
   } = useFileTreeActionable()
   } = useFileTreeActionable()
 
 
   if (!canRename && !canDelete) {
   if (!canRename && !canDelete) {
-    return (
-      <div className="toolbar-right">
-        <FileTreeBadge />
-      </div>
-    )
+    return null
   }
   }
 
 
   return (
   return (
@@ -101,7 +95,6 @@ function FileTreeToolbarRight() {
           <Icon type="trash-o" modifier="fw" accessibilityLabel={t('delete')} />
           <Icon type="trash-o" modifier="fw" accessibilityLabel={t('delete')} />
         </TooltipButton>
         </TooltipButton>
       ) : null}
       ) : null}
-      <FileTreeBadge />
     </div>
     </div>
   )
   )
 }
 }

+ 3 - 7
services/web/frontend/stylesheets/app/editor/toolbar.less

@@ -23,11 +23,11 @@
     outline: none;
     outline: none;
   }
   }
 
 
-  > a:not(.btn):not(.badge),
+  > a:not(.btn),
   > button,
   > button,
-  .toolbar-left > a:not(.btn):not(.badge),
+  .toolbar-left > a:not(.btn),
   .toolbar-left > button,
   .toolbar-left > button,
-  .toolbar-right > a:not(.btn):not(.badge),
+  .toolbar-right > a:not(.btn),
   .toolbar-right > button {
   .toolbar-right > button {
     display: inline-block;
     display: inline-block;
     color: @toolbar-icon-btn-color;
     color: @toolbar-icon-btn-color;
@@ -61,10 +61,6 @@
     }
     }
   }
   }
 
 
-  .toolbar-right > a.badge {
-    margin-left: 5px;
-  }
-
   &.toolbar-pdf > a:not(.btn) {
   &.toolbar-pdf > a:not(.btn) {
     margin-right: 3px;
     margin-right: 3px;
   }
   }

+ 0 - 1
services/web/locales/en.json

@@ -1289,7 +1289,6 @@
   "highest_priority_compiling": "Highest priority compiling",
   "highest_priority_compiling": "Highest priority compiling",
   "dropbox_sync": "Dropbox Sync",
   "dropbox_sync": "Dropbox Sync",
   "beta": "Beta",
   "beta": "Beta",
-  "file_tree_badge_tooltip": "We made some improvements to the file tree. We hope you like it! Click here to manage your beta program membership",
   "sign_up_now": "Sign Up Now",
   "sign_up_now": "Sign Up Now",
   "annual": "Annual",
   "annual": "Annual",
   "half_price_student": "Half Price Student Plans",
   "half_price_student": "Half Price Student Plans",