Pārlūkot izejas kodu

HUE-6077 [frontend] Improve sample table styling in the context popover

Johan Ahlen 8 gadi atpakaļ
vecāks
revīzija
fee0534847

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 32 - 16
desktop/core/src/desktop/static/desktop/less/hue-assist.less

@@ -757,25 +757,41 @@
   text-align: center;
 }
 
-.context-sample th {
-  border-right: 1px solid #e5e5e5;
-}
+.context-sample {
+  text-align: left;
+  padding: 3px;
+  overflow: hidden;
+  height: 100%;
 
-.context-sample td {
-  border-right: 1px solid #e5e5e5;
-  white-space: nowrap;
-}
+  th {
+    border-right: 1px solid #e5e5e5;
+  }
 
-.context-sample .fixed-first-column {
-  margin-top: -1px;
-}
+  td {
+    border-right: 1px solid #e5e5e5;
+    white-space: nowrap;
+  }
 
-.context-sample .fixed-header-row {
-  border-bottom: 1px solid #e5e5e5;
+  .fixed-first-column {
+    margin-top: 3px;
+    margin-left: 0 !important;
+  }
+
+  .fixed-header-row {
+    border-bottom: 1px solid #e5e5e5;
+  }
+
+  .fixed-first-cell {
+    border-right: 1px solid #e5e5e5;
+    margin-left: -1px;
+
+    thead th {
+      height: 23px;
+      border-bottom: 1px solid #e5e5e5 !important;
+    }
+  }
 }
 
-.context-sample .fixed-first-cell {
-  border-right: 1px solid #e5e5e5;
-  margin-top: -1px;
-  margin-left: -1px;
+.sql-context-flex-fill.context-sample-container {
+  margin: 0;
 }

+ 2 - 2
desktop/core/src/desktop/templates/sql_context_popover.mako

@@ -120,8 +120,8 @@ from metadata.conf import has_navigator
   </script>
 
   <script type="text/html" id="sql-context-table-and-column-sample">
-    <div class="sql-context-flex-fill" data-bind="with: fetchedData">
-      <div class="context-sample sample-scroll" style="text-align: left; padding: 3px; overflow: hidden; height: 100%">
+    <div class="sql-context-flex-fill context-sample-container" data-bind="with: fetchedData">
+      <div class="context-sample sample-scroll">
         <!-- ko if: rows.length == 0 -->
         <div class="alert">${ _('The selected table has no data.') }</div>
         <!-- /ko -->

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css


+ 4 - 0
desktop/libs/notebook/src/notebook/static/notebook/less/notebook.less

@@ -898,6 +898,10 @@ h4.header {
 .history-table tbody tr {
   border-left: 2px solid transparent;
   border-right: 2px solid transparent;
+
+  td {
+    vertical-align: middle;
+  }
 }
 
 .history-table tbody tr:hover {

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels