Просмотр исходного кода

Merge pull request #13923 from overleaf/td-review-panel-non-sticky-toolbar-nav

Make toolbar and nav non-sticky in React review panel overview mode

GitOrigin-RevId: feb2950698512120a676a597f0edfa7ba615f934
Tim Down 3 лет назад
Родитель
Сommit
752ad8870d

+ 6 - 1
services/web/frontend/js/features/source-editor/components/review-panel/current-file-container.tsx

@@ -56,7 +56,12 @@ function CurrentFileContainer() {
   }, [setEntryHover])
 
   return (
-    <Container classNames={{ 'rp-collapsed-displaying-entry': entryHover }}>
+    <Container
+      classNames={{
+        'rp-collapsed-displaying-entry': entryHover,
+        'rp-current-file-container': true,
+      }}
+    >
       <div className="review-panel-tools">
         <Toolbar />
         <Nav />

+ 9 - 7
services/web/frontend/stylesheets/app/editor/review-panel.less

@@ -1244,14 +1244,16 @@ button when (@is-overleaf-light = true) {
     padding: 0;
   }
 
-  .review-panel-toolbar {
-    position: sticky;
-    top: 0;
-  }
+  &.rp-current-file-container {
+    .review-panel-toolbar {
+      position: sticky;
+      top: 0;
+    }
 
-  .rp-nav {
-    position: sticky;
-    bottom: 0;
+    .rp-nav {
+      position: sticky;
+      bottom: 0;
+    }
   }
 
   .rp-entry-list-react {