From 47d6cd3facb8d323a1e43dbca7c5a30d6840102b Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:38:32 +0200 Subject: [PATCH] Move field description into EditingArea as placeholder --- ftl/core/fields.ftl | 2 +- ts/editable/ContentEditable.svelte | 13 +++++++++- ts/editor/EditingArea.svelte | 7 +++++- ts/editor/EditorField.svelte | 14 ++++++----- ts/editor/LabelDescription.svelte | 39 ------------------------------ ts/editor/icons.ts | 1 - ts/lib/context-keys.ts | 1 + 7 files changed, 28 insertions(+), 49 deletions(-) delete mode 100644 ts/editor/LabelDescription.svelte diff --git a/ftl/core/fields.ftl b/ftl/core/fields.ftl index 12f3f79e9..2bb7553fd 100644 --- a/ftl/core/fields.ftl +++ b/ftl/core/fields.ftl @@ -4,7 +4,7 @@ fields-editing-font = Editing Font fields-field = Field: fields-field-name = Field name: fields-description = Description -fields-description-placeholder = Tooltip to show next to the field's name in the editing screen +fields-description-placeholder = Placeholder to show inside the field when it's empty fields-fields-for = Fields for { $val } fields-font = Font: fields-new-position-1 = New position (1...{ $val }): diff --git a/ts/editable/ContentEditable.svelte b/ts/editable/ContentEditable.svelte index dd0a9bdad..385499690 100644 --- a/ts/editable/ContentEditable.svelte +++ b/ts/editable/ContentEditable.svelte @@ -7,7 +7,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html diff --git a/ts/editor/icons.ts b/ts/editor/icons.ts index f05de24b0..701483237 100644 --- a/ts/editor/icons.ts +++ b/ts/editor/icons.ts @@ -12,4 +12,3 @@ export { default as richTextOn } from "@mdi/svg/svg/eye-outline.svg"; export { default as stickyOff } from "@mdi/svg/svg/pin-off-outline.svg"; export { default as stickyOn } from "@mdi/svg/svg/pin-outline.svg"; export { default as htmlOff } from "@mdi/svg/svg/xml.svg"; -export { default as descriptionIcon } from "bootstrap-icons/icons/info-circle.svg"; diff --git a/ts/lib/context-keys.ts b/ts/lib/context-keys.ts index 34f27aaf7..506c18d38 100644 --- a/ts/lib/context-keys.ts +++ b/ts/lib/context-keys.ts @@ -4,3 +4,4 @@ export const fontFamilyKey = Symbol("fontFamily"); export const fontSizeKey = Symbol("fontSize"); export const directionKey = Symbol("direction"); +export const descriptionKey = Symbol("description");