diff --git a/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts b/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts index 1ae05cd85e..9d1885a3e1 100644 --- a/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts +++ b/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.ts @@ -9,7 +9,7 @@ import { ICONS } from "../../../icons/icons"; import { CfTerms } from "../../../translations_terms"; css/* scss */ ` - .o-cf-preview { + .o-spreadsheet .o-cf-preview { &.o-cf-cursor-ptr { cursor: pointer; } @@ -17,6 +17,7 @@ css/* scss */ ` border-bottom: 1px solid ${GRAY_300}; height: 80px; padding: 10px; + box-sizing: border-box; position: relative; cursor: pointer; &:hover, @@ -30,7 +31,6 @@ css/* scss */ ` .o-cf-preview-icon { border: 1px solid ${GRAY_300}; background-color: #fff; - position: absolute; height: 50px; width: 50px; .o-icon { @@ -39,12 +39,6 @@ css/* scss */ ` } } .o-cf-preview-description { - left: 65px; - margin-bottom: auto; - margin-right: 8px; - margin-top: auto; - position: relative; - width: 142px; .o-cf-preview-description-rule { margin-bottom: 4px; max-height: 2.8em; @@ -54,16 +48,11 @@ css/* scss */ ` font-size: 12px; } } - .o-cf-delete { - left: 90%; - top: 39%; - position: absolute; - } &:not(:hover):not(.o-cf-dragging) .o-cf-drag-handle { display: none !important; } .o-cf-drag-handle { - left: -8px; + left: 2px; cursor: move; .o-icon { width: 6px; diff --git a/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.xml b/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.xml index 095103b0de..ad9768ad16 100644 --- a/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.xml +++ b/src/components/side_panel/conditional_formatting/cf_preview/cf_preview.xml @@ -2,46 +2,43 @@
-
+
+ +
+ +
+ + + +
+
+
- + t-att-style="getPreviewImageStyle(cf.rule)" + class="o-cf-preview-icon d-flex justify-content-around align-items-center me-3 flex-shrink-0"> + 123
- -
- - - -
-
- -
- 123 -
-
-
-
-
- -
+ +
+
+
+
-
-
-
- -
+
+
+
+
+
diff --git a/tests/conditional_formatting/__snapshots__/conditional_formatting_panel_component.test.ts.snap b/tests/conditional_formatting/__snapshots__/conditional_formatting_panel_component.test.ts.snap index 7c7cf245c7..8d3d81ded8 100644 --- a/tests/conditional_formatting/__snapshots__/conditional_formatting_panel_component.test.ts.snap +++ b/tests/conditional_formatting/__snapshots__/conditional_formatting_panel_component.test.ts.snap @@ -15,83 +15,79 @@ exports[`UI of conditional formats Conditional format list simple snapshot 1`] = style="" >
-
- - - - - - -
- -
- 123 -
- + + + + + +
+ +
+ 123 +
+ +
-
- Value is equal to 2 -
-
-
- A1:A2 + Value is equal to 2
+ A1:A2 +
+
+
+
-
- -
+
@@ -102,83 +98,79 @@ exports[`UI of conditional formats Conditional format list simple snapshot 1`] = style="" >
-
- - - - - - -
- -
- 123 -
- + + + + + +
+ +
+ 123 +
+ +
-
- Color scale -
-
-
- B1:B5 + Color scale
+ B1:B5 +
+
+
+
-
- -
+