Explorar o código

Merge pull request #10196 from overleaf/ta-galileo-instruction-modal

Add Galileo Instruction Modal

GitOrigin-RevId: c6eb9465c9a90b7b6fb681537bf2851a4570b397
Tim Down %!s(int64=4) %!d(string=hai) anos
pai
achega
2bb8bd6f14

+ 2 - 0
services/web/frontend/extracted-translations.json

@@ -220,6 +220,8 @@
   "galileo_insert_citation_button": "",
   "galileo_insert_instruction_button": "",
   "galileo_insert_math_button": "",
+  "galileo_instruction_modal_input_placeholder": "",
+  "galileo_instruction_modal_title": "",
   "galileo_is": "",
   "galileo_only_available_in_cm6": "",
   "galileo_promo_autocomplete_content": "",

+ 36 - 36
services/web/frontend/stylesheets/modules/galileo.less

@@ -33,14 +33,6 @@
     }
   }
 
-  .galileo-font-lucida {
-    font-family: @editor-font-lucida;
-  }
-
-  .galileo-font-monaco {
-    font-family: @editor-font-monaco;
-  }
-
   .galileo-body {
     padding: 0 @padding-sm @padding-xs @padding-sm;
     overflow-y: auto;
@@ -53,34 +45,6 @@
       }
     }
 
-    .galileo-suggestion {
-      background: @galileo-suggestion-background;
-      color: @galileo-color;
-      margin-top: @margin-xs;
-
-      .galileo-suggestion-body {
-        padding: @padding-xs;
-        max-height: @line-height-computed * 4; // 4 lines
-        overflow: hidden;
-
-        .galileo-suggestion-text {
-          white-space: break-spaces;
-        }
-      }
-
-      .galileo-suggestion-footer {
-        display: flex;
-        justify-content: space-between;
-        padding: @padding-xs;
-      }
-
-      .galileo-suggestion-footer-links {
-        display: flex;
-        align-items: flex-end;
-        gap: @padding-xs;
-      }
-    }
-
     .galileo-promo {
       margin-top: @margin-md;
       text-align: center;
@@ -150,3 +114,39 @@
     }
   }
 }
+
+.galileo-suggestion {
+  background: @galileo-suggestion-background;
+  color: @galileo-color;
+  margin-top: @margin-xs;
+
+  .galileo-suggestion-body {
+    padding: @padding-xs;
+    max-height: @line-height-computed * 4; // 4 lines
+    overflow: hidden;
+  }
+
+  .galileo-suggestion-footer {
+    display: flex;
+    justify-content: space-between;
+    padding: @padding-xs;
+  }
+
+  .galileo-suggestion-footer-links {
+    display: flex;
+    align-items: flex-end;
+    gap: @padding-xs;
+  }
+}
+
+.galileo-suggestion-text {
+  white-space: break-spaces;
+}
+
+.galileo-font-lucida {
+  font-family: @editor-font-lucida;
+}
+
+.galileo-font-monaco {
+  font-family: @editor-font-monaco;
+}

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

@@ -1772,6 +1772,8 @@
   "galileo_feedback_detail": "Tell us more",
   "galileo_feedback_send_debug": "Share additional data",
   "galileo_feedback_send_debug_more": "Share the part of your document that was used to generate the suggestion",
+  "galileo_instruction_modal_title": "Ask Galileo to generate LaTeX",
+  "galileo_instruction_modal_input_placeholder": "e.g. add centered figure",
   "galileo_promo_shadow_text_title": "Math Suggestions",
   "galileo_promo_shadow_text_content": "Galileo will provide contextualized relevant formulae, definitions, etc.",
   "galileo_promo_autocomplete_title": "Citations",