From 695d773d509484c7c5ef598852134b93877fc154 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 31 Oct 2022 11:43:18 +0100 Subject: [PATCH] Various UI fixes, add placeholder to the text editor Signed-off-by: Thomas Citharel --- js/package.json | 1 + js/src/components/Comment/CommentTree.vue | 1 + js/src/components/Comment/EventComment.vue | 3 +- .../Discussion/DiscussionComment.vue | 24 +- js/src/components/Event/OrganizerPicker.vue | 2 +- js/src/components/TextEditor.vue | 16 +- js/src/i18n/en_US.json | 10 +- js/src/i18n/fr_FR.json | 10 +- js/src/views/Account/IdentityPicker.vue | 2 +- .../views/Account/IdentityPickerWrapper.vue | 4 +- js/src/views/Discussions/CreateView.vue | 3 +- js/src/views/Discussions/DiscussionView.vue | 23 +- js/src/views/Event/EditView.vue | 1 + js/src/views/Event/EventView.vue | 209 ++---------------- js/src/views/Group/GroupSettings.vue | 1 + js/src/views/Posts/EditView.vue | 35 +-- js/yarn.lock | 9 + 17 files changed, 111 insertions(+), 243 deletions(-) diff --git a/js/package.json b/js/package.json index a15e4d4a..7b105068 100644 --- a/js/package.json +++ b/js/package.json @@ -41,6 +41,7 @@ "@tiptap/extension-mention": "^2.0.0-beta.42", "@tiptap/extension-ordered-list": "^2.0.0-beta.24", "@tiptap/extension-paragraph": "^2.0.0-beta.22", + "@tiptap/extension-placeholder": "^2.0.0-beta.199", "@tiptap/extension-strike": "^2.0.0-beta.26", "@tiptap/extension-text": "^2.0.0-beta.15", "@tiptap/extension-underline": "^2.0.0-beta.7", diff --git a/js/src/components/Comment/CommentTree.vue b/js/src/components/Comment/CommentTree.vue index 320c00b3..5492f48b 100644 --- a/js/src/components/Comment/CommentTree.vue +++ b/js/src/components/Comment/CommentTree.vue @@ -26,6 +26,7 @@ v-model="newComment.text" :aria-label="t('Comment body')" @submit="createCommentForEvent(newComment)" + :placeholder="t('Write a new comment')" />

{{ t("Comment text can't be empty") }} diff --git a/js/src/components/Comment/EventComment.vue b/js/src/components/Comment/EventComment.vue index d23de515..48e7fcf3 100644 --- a/js/src/components/Comment/EventComment.vue +++ b/js/src/components/Comment/EventComment.vue @@ -155,6 +155,7 @@ :aria-label="t('Comment body')" class="flex-1" @submit="replyToComment" + :placeholder="t('Write a new reply')" /> - diff --git a/js/src/views/Group/GroupSettings.vue b/js/src/views/Group/GroupSettings.vue index 4d03f630..20fd776e 100644 --- a/js/src/views/Group/GroupSettings.vue +++ b/js/src/views/Group/GroupSettings.vue @@ -37,6 +37,7 @@ :aria-label="t('Group description body')" v-if="currentActor" :currentActor="currentActor" + :placeholder="t('A few lines about your group')" />

- {{ $t("Edit post") }} + {{ t("Edit post") }}

- {{ $t("Add a new post") }} + {{ t("Add a new post") }}

-

{{ $t("General information") }}

+

{{ t("General information") }}

-

{{ $t("Who can view this post") }}

+

{{ t("Who can view this post") }}

{{ - $t( + t( "When the post is private, you'll need to share the link around." ) }} @@ -58,7 +59,7 @@ v-model="editablePost.visibility" name="postVisibility" :native-value="PostVisibility.PUBLIC" - >{{ $t("Visible everywhere on the web") }}{{ t("Visible everywhere on the web") }}
@@ -66,7 +67,7 @@ v-model="editablePost.visibility" name="postVisibility" :native-value="PostVisibility.UNLISTED" - >{{ $t("Only accessible through link") }}{{ t("Only accessible through link") }}
@@ -74,7 +75,7 @@ v-model="editablePost.visibility" name="postVisibility" :native-value="PostVisibility.PRIVATE" - >{{ $t("Only accessible to members of the group") }}{{ t("Only accessible to members of the group") }}
@@ -84,14 +85,14 @@ @@ -121,7 +122,7 @@ >
- {{ $t("Only group moderators can create, edit and delete posts.") }} + {{ t("Only group moderators can create, edit and delete posts.") }}
diff --git a/js/yarn.lock b/js/yarn.lock index ea0d8bb9..756b1807 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1585,6 +1585,15 @@ resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.199.tgz#34213e6594a1183a77bb33ced49502bafb0a3d1c" integrity sha512-+BoMCaxlsHqw065zTUNd+ywkvFJzNKbTY461/AlKX2dgHeaO8doXHDQK+9icOpibQvrKaMhOJmuBTgGlJlUUgw== +"@tiptap/extension-placeholder@^2.0.0-beta.199": + version "2.0.0-beta.199" + resolved "https://registry.yarnpkg.com/@tiptap/extension-placeholder/-/extension-placeholder-2.0.0-beta.199.tgz#0208c42f8b92a88e66b726353d07b652f09fd823" + integrity sha512-Tdq0r9XQ6hcu4ASvw2Xko6h8uS/xONmMmOFiTkK/54REB3RRQpkdCtXrhFn/T4DunJVBf6FUOLTjYN3SONhuew== + dependencies: + prosemirror-model "^1.18.1" + prosemirror-state "^1.4.1" + prosemirror-view "^1.28.2" + "@tiptap/extension-strike@^2.0.0-beta.26": version "2.0.0-beta.199" resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.199.tgz#5fc6e067728009d92027e58a042f18449f2fa264"