From 7c8362c5084e61336a13bf335531f9aaeb04d8f4 Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Wed, 20 Nov 2024 14:03:57 +0100 Subject: [PATCH] [web] Hide pdf-log-entry-content when empty + fixup search "count" color (#21977) * Hide `PdfLogEntryContent` when there is no content * Fixup in search "count": `--ol-blue-gray-4` doesn't exist in SCSS * Update `AiErrorAssistant` with a `shouldRender` export, allowing to hide the element from the caller * Revert "Update `AiErrorAssistant` with a `shouldRender` export, allowing to hide the element from the caller" This reverts commit 01812fa2b108b94c99d250c9a39e4f3c41b36781. * Hide .log-entry-content when empty, using CSS Co-authored-by: Alf Eaton --------- Co-authored-by: Alf Eaton GitOrigin-RevId: c5096b362600058535bd645cf11dad255e941fb9 --- .../frontend/js/features/source-editor/extensions/search.ts | 2 +- services/web/frontend/stylesheets/app/editor/logs.less | 4 ++++ .../frontend/stylesheets/bootstrap-5/pages/editor/logs.scss | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/source-editor/extensions/search.ts b/services/web/frontend/js/features/source-editor/extensions/search.ts index c27dd3692d..4661fc2037 100644 --- a/services/web/frontend/js/features/source-editor/extensions/search.ts +++ b/services/web/frontend/js/features/source-editor/extensions/search.ts @@ -358,7 +358,7 @@ const searchFormTheme = EditorView.theme({ }, '.ol-cm-search-form-position': { flexShrink: 0, - color: 'var(--ol-blue-gray-4)', + color: 'var(--content-secondary)', }, '.ol-cm-search-hidden-inputs': { position: 'absolute', diff --git a/services/web/frontend/stylesheets/app/editor/logs.less b/services/web/frontend/stylesheets/app/editor/logs.less index 6362e453c4..64bd4ff278 100644 --- a/services/web/frontend/stylesheets/app/editor/logs.less +++ b/services/web/frontend/stylesheets/app/editor/logs.less @@ -127,6 +127,10 @@ } .log-entry-content { + &:empty { + display: none; + } + background-color: #fff; padding: @padding-sm; } diff --git a/services/web/frontend/stylesheets/bootstrap-5/pages/editor/logs.scss b/services/web/frontend/stylesheets/bootstrap-5/pages/editor/logs.scss index 3a4580a1d5..7cf92c6e10 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/pages/editor/logs.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/pages/editor/logs.scss @@ -141,6 +141,10 @@ } .log-entry-content { + &:empty { + display: none; + } + background-color: var(--bg-light-primary); padding: var(--spacing-04); }