From 070171382328e33b6169672e9e590d3c9c4c0e91 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Wed, 24 Jun 2026 17:51:50 +0100 Subject: [PATCH] fixed regression issue --- .../views/components/html-editor.blade.php | 110 ++++++++++++++++-- .../views/livewire/ticket-create.blade.php | 19 +-- ...ashboardTicketCardsSpellcheckFilesTest.php | 6 +- .../TicketCreateEditorSyncFilesTest.php | 19 ++- Modules/Helpdesk/changelog.yaml | 11 ++ 5 files changed, 142 insertions(+), 23 deletions(-) diff --git a/Modules/Helpdesk/Resources/views/components/html-editor.blade.php b/Modules/Helpdesk/Resources/views/components/html-editor.blade.php index 2f9b3250..f193b909 100644 --- a/Modules/Helpdesk/Resources/views/components/html-editor.blade.php +++ b/Modules/Helpdesk/Resources/views/components/html-editor.blade.php @@ -3,34 +3,122 @@ 'label' => 'Details', 'placeholder' => 'Describe the ticket, include steps to reproduce, expected result, actual result and any useful technical details.', 'rows' => 10, + 'editorDusk' => null, ]) -
+
-
- Spellcheck enabled - Use Markdown for formatting, lists, quotes, code and links. +
+ Spellcheck enabled + + + + + + + +
-

- Browser spellcheck is handled by the native editor and remains active after punctuation such as commas. + Browser spellcheck stays active in the native editable area. Formatting is synchronised only on blur and submit to avoid Livewire keypress regressions.

diff --git a/Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php b/Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php index 9b8faa9c..800bf6fd 100644 --- a/Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php +++ b/Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php @@ -245,10 +245,10 @@
@@ -330,25 +330,28 @@ @enderror
-
+
+ +
+ class="inline-flex min-h-10 items-center justify-center rounded-lg bg-blue-600 px-4 py-2 text-xs font-black text-white shadow-sm transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400/70"> + Cancel diff --git a/Modules/Helpdesk/Tests/Feature/DashboardTicketCardsSpellcheckFilesTest.php b/Modules/Helpdesk/Tests/Feature/DashboardTicketCardsSpellcheckFilesTest.php index ab841ce4..967ab51f 100644 --- a/Modules/Helpdesk/Tests/Feature/DashboardTicketCardsSpellcheckFilesTest.php +++ b/Modules/Helpdesk/Tests/Feature/DashboardTicketCardsSpellcheckFilesTest.php @@ -32,15 +32,15 @@ final class DashboardTicketCardsSpellcheckFilesTest extends TestCase } #[Test] - public function helpdesk_editor_uses_native_spellcheck_textarea(): void + public function helpdesk_editor_uses_native_spellcheck_contenteditable_area(): void { $view = file_get_contents(base_path('Modules/Helpdesk/Resources/views/components/html-editor.blade.php')); $this->assertIsString($view); - $this->assertStringContainsString('assertStringContainsString('contenteditable="true"', $view); $this->assertStringContainsString('spellcheck="true"', $view); + $this->assertStringContainsString('lang="en-GB"', $view); $this->assertStringContainsString('wire:model.defer', $view); - $this->assertStringNotContainsString('contenteditable', $view); $this->assertStringNotContainsString('x-on:keyup', $view); $this->assertStringNotContainsString('x-on:input', $view); } diff --git a/Modules/Helpdesk/Tests/Feature/TicketCreateEditorSyncFilesTest.php b/Modules/Helpdesk/Tests/Feature/TicketCreateEditorSyncFilesTest.php index d7a04b45..3f7c1d72 100644 --- a/Modules/Helpdesk/Tests/Feature/TicketCreateEditorSyncFilesTest.php +++ b/Modules/Helpdesk/Tests/Feature/TicketCreateEditorSyncFilesTest.php @@ -22,6 +22,7 @@ final class TicketCreateEditorSyncFilesTest extends TestCase $this->assertStringNotContainsString('x-on:keyup', $editor); $this->assertStringContainsString('contenteditable="true"', $editor); $this->assertStringContainsString('spellcheck="true"', $editor); + $this->assertStringContainsString('lang="en-GB"', $editor); $this->assertStringContainsString('this.$wire.set(this.model, this.value, live)', $editor); $this->assertStringContainsString('syncToLivewire(false)', $editor); } @@ -35,9 +36,25 @@ final class TicketCreateEditorSyncFilesTest extends TestCase $view = file_get_contents(base_path('Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php')); $this->assertIsString($view); - $this->assertStringContainsString('wire:model="body"', $view); + $this->assertStringContainsString('model="body"', $view); $this->assertStringContainsString('x-on:submit.capture', $view); $this->assertStringContainsString('helpdesk-editor-sync', $view); $this->assertStringNotContainsString('wire:model.live="body"', $view); } + + /** + * The create-ticket footer buttons should match the compact professional + * pattern already used by Ticket controls. + */ + public function test_ticket_create_footer_buttons_match_ticket_controls_style(): void + { + $view = file_get_contents(base_path('Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php')); + + $this->assertIsString($view); + $this->assertStringContainsString('inline-flex min-h-10 items-center justify-center rounded-lg bg-red-600 px-4 py-2 text-xs font-black', $view); + $this->assertStringContainsString('inline-flex min-h-10 items-center justify-center rounded-lg bg-blue-600 px-4 py-2 text-xs font-black', $view); + $this->assertStringContainsString('inline-flex min-h-10 items-center justify-center rounded-lg bg-emerald-600 px-4 py-2 text-xs font-black', $view); + $this->assertStringContainsString('Create ticket', $view); + $this->assertStringNotContainsString('rounded-xl bg-green-600 px-5 py-2 text-sm font-semibold', $view); + } } diff --git a/Modules/Helpdesk/changelog.yaml b/Modules/Helpdesk/changelog.yaml index 04bd3229..4aab0c27 100644 --- a/Modules/Helpdesk/changelog.yaml +++ b/Modules/Helpdesk/changelog.yaml @@ -513,3 +513,14 @@ - Preserved the existing expandable-card behaviour and Livewire navigation initialisation. - Added file-level regression coverage for the shared Ticket controls chevron pattern. - Preserved append-only changelog history. + +- version: 1.10.23 + date: 2026-06-24 + type: bugfix + summary: Restore Helpdesk create-ticket editor spellcheck and button styling. + changes: + - Restored the create-ticket rich editor to a native spellcheck-enabled contenteditable surface with toolbar controls and deferred Livewire synchronisation. + - Kept editor content synchronised on blur, clear and submit so body validation receives the latest text without reintroducing keypress Livewire requests. + - Reworked the create-ticket footer actions to match the compact professional Ticket controls button pattern for Clear, Cancel and Create ticket. + - Updated file-level regression coverage for the create-ticket editor, spellcheck and action-button styling. + - Preserved append-only changelog history.