Skip to content

Commit 6d83708

Browse files
simonhampclaude
andauthored
Dashboard upgrade (#287)
* Upgrade Livewire 3→4, Filament 3→5, add Flux UI Pro and Blaze Phase 1: Upgrade core packages - Upgrade livewire/livewire from ^3.6 to ^4.0 - Upgrade filament/filament from ^3.2 to ^5.0 - Fix Filament breaking changes: Form→Schema, Action relocations, widget properties static→non-static, layout component namespace moves - Fix Livewire 4 ESM import path (livewire.esm → livewire.esm.js) - Migrate MobilePricing from deprecated $listeners to #[On] attribute Phase 2: Install Flux UI Pro and Blaze - Add livewire/flux ^2.13 and livewire/blaze ^1.0 - Add Flux CSS import to app.css - Add @fluxscripts directive to main layout - Create dashboard sidebar layout with Flux components Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add account settings page with name, password, and delete account - Create Settings Livewire component with update name, change password, and delete account functionality - Move Settings link from sidebar bottom nav into user profile dropdown - Fix sidebar logo to use favicon.svg - Add PHPUnit tests covering all settings flows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Upgrade dashboard: Flux UI, route restructuring, developer settings - Change all /customer routes to /dashboard prefix - Add developer settings page with display name and Stripe status - Add plugin status tabs (Pending, Rejected, Approved) - Move rejection reason/resubmit to top of plugin edit screen - Upgrade auth pages to use Flux components with new auth layout - Restructure sidebar: rename Developer Hub to Hub, add Discord link - Show only approved paid plugins on developer hub - Move session messages to top of dashboard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add database notifications system with bell icon in dashboard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix ProductLicensesRelationManager Filament 5 compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix Filament 5 compatibility and update tests for Livewire migration - Migrate Filament action imports from Tables\Actions to Actions namespace - Update tests to use Livewire test helpers instead of removed controller routes - Remove redundant factory methods (onboarded/completedOnboarding) that duplicate defaults - Fix PurchaseHistoryTest for Livewire-based dashboard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix hardcoded URLs in notifications to use correct dashboard route paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Apply Rector upgrades and Laravel 12 compatibility changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d413fab commit 6d83708

215 files changed

Lines changed: 7473 additions & 2260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Console/Commands/ExtendLicenseExpiryCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Console\Commands;
44

5+
use App\Jobs\UpdateAnystackLicenseExpiryJob;
56
use App\Models\License;
67
use Illuminate\Console\Command;
78

@@ -37,7 +38,7 @@ public function handle(): int
3738
}
3839

3940
// Dispatch the job to update the license expiry
40-
dispatch(new \App\Jobs\UpdateAnystackLicenseExpiryJob($license));
41+
dispatch(new UpdateAnystackLicenseExpiryJob($license));
4142

4243
$this->info("License expiry updated to {$license->expires_at->format('Y-m-d')}");
4344

app/Console/Commands/MatchUsersWithStripeCustomers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Models\User;
66
use Illuminate\Console\Command;
7+
use Illuminate\Support\Sleep;
78
use Stripe\Customer;
89
use Stripe\Exception\ApiErrorException;
910

@@ -82,7 +83,7 @@ public function handle(): int
8283
$progressBar->advance();
8384

8485
// Add a small delay to avoid rate limiting
85-
\Illuminate\Support\Sleep::usleep(100000); // 0.1 seconds
86+
Sleep::usleep(100000); // 0.1 seconds
8687
}
8788

8889
$progressBar->finish();

app/Console/Commands/SatisBuild.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Console\Commands;
44

5+
use App\Models\Plugin;
56
use App\Services\SatisService;
67
use Illuminate\Console\Command;
78

@@ -30,7 +31,7 @@ public function handle(SatisService $satisService): int
3031
$pluginName = $this->option('plugin');
3132

3233
if ($pluginName) {
33-
$plugin = \App\Models\Plugin::where('name', $pluginName)->first();
34+
$plugin = Plugin::where('name', $pluginName)->first();
3435

3536
if (! $plugin) {
3637
$this->error("Plugin '{$pluginName}' not found.");

app/Console/Commands/SendLegacyLicenseThankYou.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Models\License;
66
use App\Notifications\LegacyLicenseThankYou;
77
use Illuminate\Console\Command;
8+
use Illuminate\Support\Facades\Date;
89

910
class SendLegacyLicenseThankYou extends Command
1011
{
@@ -25,7 +26,7 @@ public function handle(): int
2526
// that have a user and haven't been converted to a subscription
2627
$legacyLicenses = License::query()
2728
->whereNull('subscription_item_id')
28-
->where('created_at', '<', \Illuminate\Support\Facades\Date::create(2025, 5, 8))
29+
->where('created_at', '<', Date::create(2025, 5, 8))
2930
->whereHas('user')
3031
->with('user')
3132
->get();

app/Console/Commands/SyncPlugins.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Console\Commands;
44

5+
use App\Jobs\SyncPlugin;
56
use App\Models\Plugin;
67
use Illuminate\Console\Command;
78

@@ -25,7 +26,7 @@ public function handle(): int
2526

2627
$this->info("Dispatching sync jobs for {$count} plugins...");
2728

28-
$plugins->each(fn (Plugin $plugin) => dispatch(new \App\Jobs\SyncPlugin($plugin)));
29+
$plugins->each(fn (Plugin $plugin) => dispatch(new SyncPlugin($plugin)));
2930

3031
$this->info('Done. Jobs have been dispatched to the queue.');
3132

app/Filament/Pages/Dashboard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Dashboard extends BaseDashboard
1313
{
14-
protected static ?string $navigationIcon = 'heroicon-o-home';
14+
protected static \BackedEnum|string|null $navigationIcon = 'heroicon-o-home';
1515

1616
public function getHeaderWidgets(): array
1717
{

app/Filament/Resources/ArticleResource.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use App\Filament\Resources\ArticleResource\Actions\UnpublishAction;
88
use App\Filament\Resources\ArticleResource\Pages;
99
use App\Models\Article;
10+
use Filament\Actions;
11+
use Filament\Actions\ActionGroup;
1012
use Filament\Forms\Components\MarkdownEditor;
1113
use Filament\Forms\Components\Textarea;
1214
use Filament\Forms\Components\TextInput;
13-
use Filament\Forms\Form;
1415
use Filament\Forms\Set;
1516
use Filament\Resources\Resource;
16-
use Filament\Tables;
17-
use Filament\Tables\Actions\ActionGroup;
17+
use Filament\Schemas\Schema;
1818
use Filament\Tables\Columns\TextColumn;
1919
use Filament\Tables\Table;
2020
use Illuminate\Contracts\Database\Eloquent\Builder;
@@ -28,11 +28,11 @@ class ArticleResource extends Resource
2828

2929
protected static ?string $recordTitleAttribute = 'title';
3030

31-
protected static ?string $navigationIcon = 'heroicon-o-newspaper';
31+
protected static \BackedEnum|string|null $navigationIcon = 'heroicon-o-newspaper';
3232

33-
public static function form(Form $form): Form
33+
public static function form(Schema $schema): Schema
3434
{
35-
return $form
35+
return $schema
3636
->schema([
3737
TextInput::make('title')
3838
->required()
@@ -98,14 +98,14 @@ public static function table(Table $table): Table
9898
->actions([
9999
ActionGroup::make([
100100
PreviewAction::make('preview'),
101-
Tables\Actions\EditAction::make()->url(fn ($record) => static::getUrl('edit', ['record' => $record->id])),
101+
Actions\EditAction::make()->url(fn ($record) => static::getUrl('edit', ['record' => $record->id])),
102102
UnpublishAction::make('unpublish'),
103103
PublishAction::make('publish'),
104104
]),
105105
])
106106
->bulkActions([
107-
Tables\Actions\BulkActionGroup::make([
108-
Tables\Actions\DeleteBulkAction::make(),
107+
Actions\BulkActionGroup::make([
108+
Actions\DeleteBulkAction::make(),
109109
]),
110110
])
111111
->defaultSort('published_at', 'desc');

app/Filament/Resources/ArticleResource/Actions/PreviewAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Filament\Resources\ArticleResource\Actions;
44

55
use App\Models\Article;
6-
use Filament\Tables\Actions\Action;
6+
use Filament\Actions\Action;
77

88
class PreviewAction extends Action
99
{

app/Filament/Resources/ArticleResource/Actions/PublishAction.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace App\Filament\Resources\ArticleResource\Actions;
44

55
use App\Models\Article;
6+
use Filament\Actions\Action;
67
use Filament\Forms\Components\DateTimePicker;
78
use Filament\Forms\Components\Radio;
8-
use Filament\Tables\Actions\Action;
9+
use Illuminate\Support\Facades\Date;
910

1011
class PublishAction extends Action
1112
{
@@ -37,7 +38,7 @@ protected function setUp(): void
3738
if ($data['publish_type'] === 'now') {
3839
$article->publish();
3940
} else {
40-
$article->publish(\Illuminate\Support\Facades\Date::parse($data['published_at']));
41+
$article->publish(Date::parse($data['published_at']));
4142
}
4243
});
4344
}

app/Filament/Resources/ArticleResource/Actions/ScheduleAction.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace App\Filament\Resources\ArticleResource\Actions;
44

55
use App\Models\Article;
6+
use Filament\Actions\Action;
67
use Filament\Forms\Components\DateTimePicker;
7-
use Filament\Tables\Actions\Action;
8+
use Illuminate\Support\Facades\Date;
89

910
class ScheduleAction extends Action
1011
{
@@ -24,7 +25,7 @@ protected function setUp(): void
2425
->required(),
2526
])
2627
->action(function (Article $article, array $data): void {
27-
$article->publish(\Illuminate\Support\Facades\Date::parse($data['published_at']));
28+
$article->publish(Date::parse($data['published_at']));
2829
})
2930
->requiresConfirmation();
3031
}

0 commit comments

Comments
 (0)