From 65bf0ee5764e77baf81965cb42064e310307debf Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Thu, 14 Dec 2023 10:39:54 +0100 Subject: [PATCH 1/2] Move TextAreaInput styles to pageflow/ui Allow using the view outside of the editor. REDMINE-20511 --- app/assets/stylesheets/pageflow/editor/base.scss | 1 - app/assets/stylesheets/pageflow/ui.scss | 1 + .../{editor/wysihtml5.scss => ui/input/text_area_input.scss} | 2 +- package/src/ui/views/inputs/TextAreaInputView.js | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) rename app/assets/stylesheets/pageflow/{editor/wysihtml5.scss => ui/input/text_area_input.scss} (99%) diff --git a/app/assets/stylesheets/pageflow/editor/base.scss b/app/assets/stylesheets/pageflow/editor/base.scss index 2dff9ddb7b..1071d381a8 100644 --- a/app/assets/stylesheets/pageflow/editor/base.scss +++ b/app/assets/stylesheets/pageflow/editor/base.scss @@ -77,7 +77,6 @@ @import "./info_box"; @import "./text_tracks"; @import "./static_thumbnails"; - @import "./wysihtml5"; @import "./notifications"; @import "./publish_entry"; @import "./other_entry_item"; diff --git a/app/assets/stylesheets/pageflow/ui.scss b/app/assets/stylesheets/pageflow/ui.scss index 1fafa09def..b6c7214942 100644 --- a/app/assets/stylesheets/pageflow/ui.scss +++ b/app/assets/stylesheets/pageflow/ui.scss @@ -19,3 +19,4 @@ @import "./ui/input/extended_select_input"; @import "./ui/input/check_box_group_input"; +@import "./ui/input/text_area_input"; diff --git a/app/assets/stylesheets/pageflow/editor/wysihtml5.scss b/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss similarity index 99% rename from app/assets/stylesheets/pageflow/editor/wysihtml5.scss rename to app/assets/stylesheets/pageflow/ui/input/text_area_input.scss index f1f2595390..a1edf32c9c 100644 --- a/app/assets/stylesheets/pageflow/editor/wysihtml5.scss +++ b/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss @@ -1,4 +1,4 @@ -.toolbar { +.text_area_input .toolbar { margin-left: -2px; margin-top: 3px; position: relative; diff --git a/package/src/ui/views/inputs/TextAreaInputView.js b/package/src/ui/views/inputs/TextAreaInputView.js index 2c071f4f45..5c54ba09b0 100644 --- a/package/src/ui/views/inputs/TextAreaInputView.js +++ b/package/src/ui/views/inputs/TextAreaInputView.js @@ -36,6 +36,7 @@ export const TextAreaInputView = Marionette.ItemView.extend({ mixins: [inputView, inputWithPlaceholderText], template, + className: 'text_area_input', ui: { input: 'textarea', From d9290229f53d5137fd75a7f077e532aae3f43708 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Thu, 14 Dec 2023 10:46:13 +0100 Subject: [PATCH 2/2] Hide editor specific text area input inline help outside of editor The inline help recommends "open in new tab" to prevent users from having to reload the Pageflow entry. This only makes sense when actually editing a Pageflow entry. REDMINE-20511 --- .../pageflow/ui/input/text_area_input.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss b/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss index a1edf32c9c..0b08dc2b80 100644 --- a/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss +++ b/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss @@ -174,4 +174,16 @@ border-bottom: solid 9px var(--ui-surface-color); border-left: solid 9px transparent; } + + // Hide inline help text that only makes sense when editing a + // Pageflow entry outside the editor + .open_in_new_tab_section .inline_help { + display: none; + } +} + +.editor .text_area_input { + .open_in_new_tab_section .inline_help { + display: block; + } }