Skip to content

Commit 17f26d4

Browse files
committed
Disable autocomplete on name fields in the dashboard
1 parent 129c2bf commit 17f26d4

File tree

7 files changed

+35
-14
lines changed

7 files changed

+35
-14
lines changed

src/Filament/Resources/ComponentGroupResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public static function form(Form $form): Form
2828
->label(__('Name'))
2929
->required()
3030
->maxLength(255)
31-
->columnSpanFull(),
31+
->columnSpanFull()
32+
->autocomplete(false),
3233
Forms\Components\ToggleButtons::make('visible')
3334
->label(__('Visible'))
3435
->inline()
@@ -82,7 +83,9 @@ public static function table(Table $table): Table
8283
Tables\Actions\BulkActionGroup::make([
8384
Tables\Actions\DeleteBulkAction::make(),
8485
]),
85-
]);
86+
])
87+
->emptyStateHeading(__('Component Groups'))
88+
->emptyStateDescription(__('Group related components together.'));
8689
}
8790

8891
public static function getRelations(): array

src/Filament/Resources/ComponentResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static function form(Form $form): Form
2525
Forms\Components\TextInput::make('name')
2626
->label(__('Name'))
2727
->required()
28-
->maxLength(255),
28+
->maxLength(255)
29+
->autocomplete(false),
2930
Forms\Components\ToggleButtons::make('status')
3031
->label(__('Status'))
3132
->inline()
@@ -106,7 +107,9 @@ public static function table(Table $table): Table
106107
Tables\Actions\DeleteBulkAction::make(),
107108
]),
108109
])
109-
->reorderable('order');
110+
->reorderable('order')
111+
->emptyStateHeading(__('Components'))
112+
->emptyStateDescription(__('Components represent the various parts of your system that can affect the status of your status page.'));
110113
}
111114

112115
public static function getRelations(): array

src/Filament/Resources/IncidentResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public static function form(Form $form): Form
3232
Forms\Components\TextInput::make('name')
3333
->label(__('Name'))
3434
->required()
35-
->maxLength(255),
35+
->maxLength(255)
36+
->autocomplete(false),
3637
Forms\Components\ToggleButtons::make('status')
3738
->label(__('Status'))
3839
->inline()
@@ -169,7 +170,9 @@ public static function table(Table $table): Table
169170
Tables\Actions\BulkActionGroup::make([
170171
Tables\Actions\DeleteBulkAction::make(),
171172
]),
172-
]);
173+
])
174+
->emptyStateHeading(__('Incidents'))
175+
->emptyStateDescription(__('Incidents are used to communicate and track the status of your services.'));
173176
}
174177

175178
public static function getRelations(): array

src/Filament/Resources/IncidentTemplateResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public static function form(Form $form): Form
3131
->label(__('Name'))
3232
->required()
3333
->live(debounce: 250)
34-
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
34+
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state)))
35+
->autocomplete(false),
3536
Forms\Components\TextInput::make('slug')
3637
->label(__('Slug'))
3738
->required(),
@@ -96,7 +97,9 @@ public static function table(Table $table): Table
9697
Tables\Actions\BulkActionGroup::make([
9798
Tables\Actions\DeleteBulkAction::make(),
9899
]),
99-
]);
100+
])
101+
->emptyStateHeading(__('Incident Templates'))
102+
->emptyStateDescription(__('Incident templates are used to create reusable incident messages.'));
100103
}
101104

102105
public static function getRelations(): array

src/Filament/Resources/MetricResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public static function form(Form $form): Form
2828
->label(__('Name'))
2929
->required()
3030
->maxLength(255)
31-
->columnSpan(3),
31+
->columnSpan(3)
32+
->autocomplete(false),
3233
Forms\Components\TextInput::make('suffix')
3334
->label(__('Suffix'))
3435
->required()
@@ -155,7 +156,9 @@ public static function table(Table $table): Table
155156
]),
156157
])
157158
->reorderable('order')
158-
->defaultSort('order');
159+
->defaultSort('order')
160+
->emptyStateHeading(__('Metrics'))
161+
->emptyStateDescription(__('Metrics are used to track and display data on your status page.'));
159162
}
160163

161164
public static function getLabel(): ?string

src/Filament/Resources/ScheduleResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public static function table(Table $table): Table
4545
->columns([
4646
Tables\Columns\TextColumn::make('name')
4747
->label(__('Name'))
48-
->searchable(),
48+
->searchable()
49+
->autocomplete(false),
4950
Tables\Columns\TextColumn::make('status')
5051
->label(__('Status'))
5152
->badge()
@@ -93,7 +94,9 @@ public static function table(Table $table): Table
9394
Tables\Actions\BulkActionGroup::make([
9495
Tables\Actions\DeleteBulkAction::make(),
9596
]),
96-
]);
97+
])
98+
->emptyStateHeading(__('Schedules'))
99+
->emptyStateDescription(__('Plan and schedule your maintenance.'));
97100
}
98101

99102
public static function getPages(): array

src/Filament/Resources/SubscriberResource.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public static function form(Form $form): Form
2626
->label(__('Email'))
2727
->email()
2828
->required()
29-
->maxLength(255),
29+
->maxLength(255)
30+
->autocomplete(false),
3031
Forms\Components\TextInput::make('verify_code')
3132
->label(__('Verify code'))
3233
->required()
@@ -97,7 +98,9 @@ public static function table(Table $table): Table
9798
Tables\Actions\BulkActionGroup::make([
9899
Tables\Actions\DeleteBulkAction::make(),
99100
]),
100-
]);
101+
])
102+
->emptyStateHeading(__('Subscribers'))
103+
->emptyStateDescription(__('Subscribers are people who have subscribed to your status page for notifications.'));
101104
}
102105

103106
public static function getRelations(): array

0 commit comments

Comments
 (0)