fixed spell checker issue

This commit is contained in:
Mark Gregory
2026-06-25 15:51:23 +01:00
parent e32aa9915a
commit 38feedd0aa
6 changed files with 93 additions and 7 deletions
@@ -115,9 +115,16 @@
<textarea
x-ref="input"
wire:model.defer="{{ $model }}"
spellcheck="true"
lang="en-GB"
autocorrect="on"
autocomplete="on"
autocapitalize="sentences"
inputmode="text"
class="sr-only"
tabindex="-1"
aria-hidden="true"
data-helpdesk-spellcheck-mirror="{{ $model }}"
></textarea>
</div>
@@ -66,9 +66,9 @@
Subject <span class="helpdesk-required-star">*</span>
</label>
<input id="subject" type="text" spellcheck="true" lang="en-GB" maxlength="180" wire:model.defer="subject"
<input id="subject" type="text" spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text" maxlength="180" wire:model.defer="subject"
class="mt-2 block h-14 w-full max-w-4xl rounded-xl border border-zinc-700 bg-zinc-950 px-4 text-base font-medium text-zinc-100 shadow-sm outline-none transition-colors duration-150 placeholder:text-zinc-500 focus:border-blue-500 focus:bg-zinc-950 focus:ring-2 focus:ring-blue-500/40"
data-dusk="ticket-subject" dusk="ticket-subject" autocomplete="off" />
data-dusk="ticket-subject" dusk="ticket-subject" />
@error('subject')
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
@@ -51,9 +51,9 @@
Subject <span class="helpdesk-required-star">*</span>
</label>
<input id="subject" type="text" maxlength="180" wire:model.defer="subject"
<input id="subject" type="text" spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text" maxlength="180" wire:model.defer="subject"
class="mt-2 block h-14 w-full max-w-4xl rounded-xl border border-zinc-700 bg-zinc-950 px-4 text-base font-medium text-zinc-100 shadow-sm outline-none transition-colors duration-150 placeholder:text-zinc-500 focus:border-blue-500 focus:bg-zinc-950 focus:ring-2 focus:ring-blue-500/40"
data-dusk="ticket-edit-subject" autocomplete="off" />
data-dusk="ticket-edit-subject" dusk="ticket-edit-subject" />
@error('subject')
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
@@ -291,8 +291,13 @@
</div>
<div class="lg:col-span-3 xl:col-span-6">
<x-helpdesk::html-editor dusk="ticket-edit-body-editor" wire:model="body" label="Details *"
rows="10" placeholder="Update the ticket details..." />
<x-helpdesk::html-editor
model="body"
label="Details *"
rows="10"
placeholder="Update the ticket details..."
editor-dusk="ticket-edit-body-editor"
/>
@error('body')
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
namespace Modules\Helpdesk\Tests\Feature;
use Tests\TestCase;
/**
* Guards browser-native spellcheck wiring on Helpdesk ticket create and edit forms.
*/
final class TicketCreateEditSpellcheckFilesTest extends TestCase
{
/**
* Ensure the create form subject and body editor remain wired for native browser spellcheck.
*/
public function test_create_ticket_subject_and_body_keep_native_spellcheck_hints(): void
{
$view = file_get_contents(base_path('Modules/Helpdesk/Resources/views/livewire/ticket-create.blade.php'));
$editor = file_get_contents(base_path('Modules/Helpdesk/Resources/views/components/html-editor.blade.php'));
$this->assertIsString($view);
$this->assertIsString($editor);
$this->assertStringContainsString('id="subject" type="text" spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text"', $view);
$this->assertStringContainsString('model="body"', $view);
$this->assertStringContainsString('editor-dusk="ticket-body-editor"', $view);
$this->assertStringContainsString('contenteditable="true"', $editor);
$this->assertStringContainsString('spellcheck="true"', $editor);
$this->assertStringContainsString('lang="en-GB"', $editor);
$this->assertStringContainsString('autocorrect="on"', $editor);
$this->assertStringContainsString('autocomplete="on"', $editor);
$this->assertStringContainsString('autocapitalize="sentences"', $editor);
$this->assertStringContainsString('data-helpdesk-spellcheck-mirror="{{ $model }}"', $editor);
}
/**
* Ensure the edit form subject and body editor use the same spellcheck baseline as create.
*/
public function test_edit_ticket_subject_and_body_keep_native_spellcheck_hints(): void
{
$view = file_get_contents(base_path('Modules/Helpdesk/Resources/views/livewire/ticket-edit.blade.php'));
$this->assertIsString($view);
$this->assertStringContainsString('id="subject" type="text" spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text"', $view);
$this->assertStringContainsString('model="body"', $view);
$this->assertStringContainsString('editor-dusk="ticket-edit-body-editor"', $view);
$this->assertStringNotContainsString('wire:model="body" label="Details *"', $view);
}
}
+23
View File
@@ -561,3 +561,26 @@
- Hardened the deletion audit migration so tombstoned_at is created before deleted_by when databases missed the Lotus replication migration state.
- Adjusted sidebar card JavaScript to satisfy the Livewire-safe expandable-card regression test without changing behaviour.
- Preserved append-only changelog history.
- version: 1.10.28
date: 2026-06-25
type: bugfix
summary: Remove Helpdesk Kanban ticket card owner and agent N+1 queries.
changes:
- Eager-loaded ticket owner and agent relationships for Kanban board cards because the view renders both names for every visible ticket.
- Eager-loaded owner and agent after Kanban status and board moves so workflow notifications and refreshed card state do not reintroduce lazy relationship access.
- Added regression coverage that enables strict lazy-loading prevention while rendering Kanban cards with owner and agent names.
- Updated module.json to keep the Helpdesk module version aligned with changelog.yaml.
- Preserved append-only changelog history.
- version: 1.10.29
date: 2026-06-25
type: bugfix
summary: Restore Helpdesk ticket create and edit spellcheck fields.
changes:
- Restored native browser spellcheck, language, autocorrect, autocomplete, sentence-capitalisation and text-input hints on ticket create and edit subject fields.
- Made the ticket edit body editor use the same explicit body model and editor dusk binding pattern as the create form.
- Kept the rich contenteditable body editor as the visible spelling surface while adding matching spellcheck hints to the hidden Livewire mirror textarea.
- Added file-level regression coverage for create and edit subject/body spellcheck wiring.
- Updated module.json to keep the Helpdesk module version aligned with changelog.yaml.
- Preserved append-only changelog history.
+1 -1
View File
@@ -23,5 +23,5 @@
"Modules\\Helpdesk\\Providers\\HelpdeskServiceProvider"
],
"files": [],
"version": "1.10.26"
"version": "1.10.29"
}