From 43c0ffe7f855c5544b6bc9d1b23888e2d0f9f991 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 7 Jun 2024 11:01:49 +0100 Subject: [PATCH] better block display for `` elements We use MfM in all sorts of places, and only some of them are actual blocks. We can now tell the `Mfm` component to make the top-level `` a block when we need to (mostly note bodies, user descriptions, announcements) and leave it inline in all other places. This should still rendener inline rtl content embedded in ltr text in a sensible way, while providing right-alignment for fully rtl blocks. --- .../frontend/src/components/MkAbuseReport.vue | 2 +- .../src/components/MkAnnouncementDialog.vue | 2 +- packages/frontend/src/components/MkDialog.vue | 2 +- packages/frontend/src/components/MkNote.vue | 9 +++-- .../src/components/MkNoteDetailed.vue | 5 ++- .../frontend/src/components/MkNotePreview.vue | 4 +- .../frontend/src/components/MkNoteSimple.vue | 2 +- .../frontend/src/components/MkNoteSub.vue | 2 +- .../src/components/MkNotification.vue | 16 ++++---- .../src/components/MkSubNoteContent.vue | 4 +- .../frontend/src/components/MkTextarea.vue | 2 +- .../frontend/src/components/MkUserInfo.vue | 2 +- .../frontend/src/components/MkUserPopup.vue | 2 +- .../src/components/MkUserSetupDialog.User.vue | 2 +- packages/frontend/src/components/SkNote.vue | 7 ++-- .../src/components/SkNoteDetailed.vue | 5 ++- .../frontend/src/components/SkNoteSimple.vue | 2 +- .../frontend/src/components/SkNoteSub.vue | 2 +- .../src/components/SkOldNoteWindow.vue | 6 +-- .../global/MkMisskeyFlavoredMarkdown.ts | 37 ++++++++++--------- .../src/components/page/page.text.vue | 2 +- packages/frontend/src/pages/announcements.vue | 2 +- packages/frontend/src/pages/channel.vue | 2 +- packages/frontend/src/pages/clip.vue | 2 +- packages/frontend/src/pages/flash/flash.vue | 2 +- packages/frontend/src/pages/gallery/post.vue | 2 +- packages/frontend/src/pages/user/home.vue | 2 +- .../frontend/src/pages/welcome.timeline.vue | 2 +- packages/frontend/src/style.scss | 4 +- 29 files changed, 72 insertions(+), 63 deletions(-) diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index 0493e885b9..7174affabe 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +

{{ i18n.ts.reporter }}: @{{ report.reporter.username }}
diff --git a/packages/frontend/src/components/MkAnnouncementDialog.vue b/packages/frontend/src/components/MkAnnouncementDialog.vue index 74d0e7214f..032a815ee6 100644 --- a/packages/frontend/src/components/MkAnnouncementDialog.vue +++ b/packages/frontend/src/components/MkAnnouncementDialog.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ announcement.title }}
-
+
{{ i18n.ts.ok }} diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue index b81ebbbb11..f51758ada7 100644 --- a/packages/frontend/src/components/MkDialog.vue +++ b/packages/frontend/src/components/MkDialog.vue @@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+