mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 18:18:29 +00:00
feat(forms): make textarea monospace opt-in and improve multiline toggle
Add `monospace` prop to Textarea component so font-mono is no longer applied by default. Apply it explicitly to env variable editors, private key fields, and shared variable forms where monospace is appropriate. Use Alpine.js x-data/x-model to make the multiline toggle reactive without a full Livewire round-trip. Add wire:key on the input/textarea wrappers to force proper DOM replacement when switching modes.
This commit is contained in:
1 parent
47025c7815
commit
3961077b90
12 files changed
+87
-35
No files matched your search
@@ -31,6 +31,20 @@ it('renders password textarea with Alpine-managed visibility state', function ()
|
||||
->not->toContain('changePasswordFieldType');
|
||||
});
|
||||
|
||||
it('renders textarea without monospace classes by default', function () {
|
||||
$html = Blade::render('<x-forms.textarea id="notes" />');
|
||||
|
||||
expect($html)
|
||||
->toContain('class="input scrollbar"')
|
||||
->not->toContain('font-mono');
|
||||
});
|
||||
|
||||
it('renders textarea with monospace classes when requested', function () {
|
||||
$html = Blade::render('<x-forms.textarea id="variables" monospace />');
|
||||
|
||||
expect($html)->toContain('class="input scrollbar font-mono"');
|
||||
});
|
||||
|
||||
it('resets password visibility on success event for env-var-input', function () {
|
||||
$html = Blade::render('<x-forms.env-var-input type="password" id="secret" />');
|
||||
|
||||
|
||||
Reference in new issue
Block a user