From b7b38097900e3e383590c911e654e5b2c7702cdd Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Fri, 17 Jul 2026 18:38:20 -0300 Subject: [PATCH] feat(posts): make the post editor usable on mobile - Top switcher (Compose / Channels / Preview / Comments) reveals the panel that was hidden below lg - Sticky bottom action bar puts schedule/publish/delete within thumb reach - Composer media actions and comment toolbar are visible on touch (no hover needed); media grid is 3-up - Clamp media picker and emoji picker widths to the viewport --- lang/ar/posts.php | 1 + lang/de/posts.php | 1 + lang/el/posts.php | 1 + lang/en/posts.php | 1 + lang/es/posts.php | 1 + lang/fr/posts.php | 1 + lang/it/posts.php | 1 + lang/ja/posts.php | 1 + lang/ko/posts.php | 1 + lang/nl/posts.php | 1 + lang/pl/posts.php | 1 + lang/pt-BR/posts.php | 1 + lang/ru/posts.php | 1 + lang/tr/posts.php | 1 + lang/zh/posts.php | 1 + resources/js/components/posts/EmojiPicker.vue | 2 +- .../js/components/posts/MediaPickerDialog.vue | 2 +- .../components/posts/editor/CommentsTab.vue | 14 +-- .../posts/editor/PostEditorActionBar.vue | 52 ++++++++ .../posts/editor/PostEditorActions.vue | 116 ++++++++++++++++++ .../posts/editor/PostEditorComposer.vue | 11 +- .../posts/editor/PostEditorHeader.vue | 116 ++++++------------ .../posts/editor/PostEditorMobileNav.vue | 33 +++++ .../posts/editor/PostEditorTabs.vue | 4 +- .../components/posts/editor/ScheduleTab.vue | 6 +- resources/js/pages/posts/Edit.vue | 48 +++++++- tests/Browser/MobileEditorTest.php | 103 ++++++++++++++++ 27 files changed, 420 insertions(+), 102 deletions(-) create mode 100644 resources/js/components/posts/editor/PostEditorActionBar.vue create mode 100644 resources/js/components/posts/editor/PostEditorActions.vue create mode 100644 resources/js/components/posts/editor/PostEditorMobileNav.vue create mode 100644 tests/Browser/MobileEditorTest.php diff --git a/lang/ar/posts.php b/lang/ar/posts.php index 365d124d..a85c56fc 100644 --- a/lang/ar/posts.php +++ b/lang/ar/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'ألغِ الجدولة للتعديل', 'tabs' => [ + 'compose' => 'الكتابة', 'preview' => 'معاينة', 'channels' => 'القنوات', 'comments' => 'التعليقات', diff --git a/lang/de/posts.php b/lang/de/posts.php index c70ce333..77c50c03 100644 --- a/lang/de/posts.php +++ b/lang/de/posts.php @@ -365,6 +365,7 @@ 'unschedule_cta' => 'Zum Bearbeiten Planung aufheben', 'tabs' => [ + 'compose' => 'Verfassen', 'preview' => 'Vorschau', 'channels' => 'Kanäle', 'comments' => 'Kommentare', diff --git a/lang/el/posts.php b/lang/el/posts.php index 991273b6..3fb7a85c 100644 --- a/lang/el/posts.php +++ b/lang/el/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Αναίρεση προγραμματισμού για επεξεργασία', 'tabs' => [ + 'compose' => 'Σύνταξη', 'preview' => 'Προεπισκόπηση', 'channels' => 'Κανάλια', 'comments' => 'Σχόλια', diff --git a/lang/en/posts.php b/lang/en/posts.php index 50822682..35814545 100644 --- a/lang/en/posts.php +++ b/lang/en/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Unschedule to edit', 'tabs' => [ + 'compose' => 'Compose', 'preview' => 'Preview', 'channels' => 'Channels', 'comments' => 'Comments', diff --git a/lang/es/posts.php b/lang/es/posts.php index abf2bd31..7bd1e4bd 100644 --- a/lang/es/posts.php +++ b/lang/es/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Cancelar para editar', 'tabs' => [ + 'compose' => 'Redactar', 'preview' => 'Vista previa', 'channels' => 'Canales', 'comments' => 'Comentarios', diff --git a/lang/fr/posts.php b/lang/fr/posts.php index dd1e1ad9..599f37b4 100644 --- a/lang/fr/posts.php +++ b/lang/fr/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Déprogrammer pour modifier', 'tabs' => [ + 'compose' => 'Rédiger', 'preview' => 'Aperçu', 'channels' => 'Canaux', 'comments' => 'Commentaires', diff --git a/lang/it/posts.php b/lang/it/posts.php index 74450429..dd525823 100644 --- a/lang/it/posts.php +++ b/lang/it/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Annulla programmazione per modificare', 'tabs' => [ + 'compose' => 'Componi', 'preview' => 'Anteprima', 'channels' => 'Canali', 'comments' => 'Commenti', diff --git a/lang/ja/posts.php b/lang/ja/posts.php index 7be94ef1..b1f850be 100644 --- a/lang/ja/posts.php +++ b/lang/ja/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => '予約を解除して編集', 'tabs' => [ + 'compose' => '作成', 'preview' => 'プレビュー', 'channels' => 'チャンネル', 'comments' => 'コメント', diff --git a/lang/ko/posts.php b/lang/ko/posts.php index d79c8d18..7da6343e 100644 --- a/lang/ko/posts.php +++ b/lang/ko/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => '편집하려면 예약 취소', 'tabs' => [ + 'compose' => '작성', 'preview' => '미리보기', 'channels' => '채널', 'comments' => '댓글', diff --git a/lang/nl/posts.php b/lang/nl/posts.php index 0967738d..4b37a488 100644 --- a/lang/nl/posts.php +++ b/lang/nl/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Planning opheffen om te bewerken', 'tabs' => [ + 'compose' => 'Opstellen', 'preview' => 'Voorbeeld', 'channels' => 'Kanalen', 'comments' => 'Reacties', diff --git a/lang/pl/posts.php b/lang/pl/posts.php index e07f0361..8a9daddb 100644 --- a/lang/pl/posts.php +++ b/lang/pl/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Anuluj planowanie, aby edytować', 'tabs' => [ + 'compose' => 'Utwórz', 'preview' => 'Podgląd', 'channels' => 'Kanały', 'comments' => 'Komentarze', diff --git a/lang/pt-BR/posts.php b/lang/pt-BR/posts.php index 8c4cdeea..e5eb157c 100644 --- a/lang/pt-BR/posts.php +++ b/lang/pt-BR/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Desagendar para editar', 'tabs' => [ + 'compose' => 'Escrever', 'preview' => 'Pré-visualização', 'channels' => 'Canais', 'comments' => 'Comentários', diff --git a/lang/ru/posts.php b/lang/ru/posts.php index febab44f..5e64fb0b 100644 --- a/lang/ru/posts.php +++ b/lang/ru/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => 'Отменить планирование для редактирования', 'tabs' => [ + 'compose' => 'Написать', 'preview' => 'Предпросмотр', 'channels' => 'Каналы', 'comments' => 'Комментарии', diff --git a/lang/tr/posts.php b/lang/tr/posts.php index 7d499c6f..418f7e65 100644 --- a/lang/tr/posts.php +++ b/lang/tr/posts.php @@ -365,6 +365,7 @@ 'unschedule_cta' => 'Düzenlemek için zamanlamayı kaldır', 'tabs' => [ + 'compose' => 'Oluştur', 'preview' => 'Önizleme', 'channels' => 'Kanallar', 'comments' => 'Yorumlar', diff --git a/lang/zh/posts.php b/lang/zh/posts.php index 77df4cfe..90293186 100644 --- a/lang/zh/posts.php +++ b/lang/zh/posts.php @@ -363,6 +363,7 @@ 'unschedule_cta' => '取消排期以编辑', 'tabs' => [ + 'compose' => '撰写', 'preview' => '预览', 'channels' => '渠道', 'comments' => '评论', diff --git a/resources/js/components/posts/EmojiPicker.vue b/resources/js/components/posts/EmojiPicker.vue index 8b153e51..b0836a3f 100644 --- a/resources/js/components/posts/EmojiPicker.vue +++ b/resources/js/components/posts/EmojiPicker.vue @@ -121,7 +121,7 @@ onBeforeUnmount(() => {