-
-
Notifications
You must be signed in to change notification settings - Fork 254
Change Admin Actions to IconButtons #1900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughConverts many Filament action buttons to icon-button variants with explicit Tabler icons and standardized icon sizes (mostly ExtraLarge/Large), removes several empty-state CreateAction buttons, renames NodesRelationManager → ServersRelationManager with table/selection/column changes, and registers Tabler icon mappings in the Filament service provider. Changes
Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-11-05T22:21:31.863ZApplied to files:
🧬 Code graph analysis (1)app/Filament/Admin/Resources/Servers/Pages/EditServer.php (2)
🔇 Additional comments (3)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
app/Filament/Admin/Resources/Nodes/RelationManagers/ServerRelationManager.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/Filament/Admin/Resources/Servers/Pages/EditServer.php (1)
951-967: Convert ForceDelete action to icon button to match Delete action.The
Deleteaction has been converted to an icon button, but theForceDeleteaction hasn't. Since these are mutually exclusive alternatives—only one is displayed based on whether a forced delete is possible—they should maintain consistent styling. TheForceDeleteaction should be updated to match theDeleteaction with icon button styling.Apply this diff:
Action::make('ForceDelete') ->color('danger') ->label(trans('filament-actions::force-delete.single.label')) ->modalHeading(trans('filament-actions::force-delete.single.modal.heading', ['label' => $this->getRecordTitle()])) ->modalSubmitActionLabel(trans('filament-actions::force-delete.single.label')) ->requiresConfirmation() ->action(function (Server $server, ServerDeletionService $service) { try { $service->withForce()->handle($server); return redirect(ListServers::getUrl(panel: 'admin')); } catch (ConnectionException) { return cache()->forget("servers.$server->uuid.canForceDelete"); } }) ->visible(fn () => $canForceDelete) ->authorize(fn (Server $server) => user()?->can('delete server', $server)) + ->icon('tabler-trash') + ->iconButton()->iconSize(IconSize::ExtraLarge),
🧹 Nitpick comments (3)
app/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.php (1)
71-72: Consider converting ViewAction to an icon button for consistency.The DeleteAction was converted to an icon button, but ViewAction remains as a regular button. For UI consistency with the PR objectives, consider also converting ViewAction to an icon button with appropriate Tabler icon (e.g.,
tabler-eye).If this is intentionally kept as a regular button, that's fine—just wanted to flag the inconsistency.
app/Filament/Admin/Resources/Mounts/Pages/ViewMount.php (1)
25-28: Inconsistent method chaining order.The method chaining order here is
icon()->iconSize()->iconButton(), whereas other files in this PR useiconButton()->iconSize()->icon()(e.g., EditMount.php lines 25-30, CreateMount.php lines 28-30). While both should work functionally, the inconsistency could be unintentional.Consider standardizing to:
- EditAction::make() - ->icon('tabler-edit') - ->iconSize(IconSize::ExtraLarge) - ->iconButton(), + EditAction::make() + ->iconButton()->iconSize(IconSize::ExtraLarge) + ->icon('tabler-edit'),app/Filament/Admin/Resources/Webhooks/WebhookResource.php (1)
115-115: Consider removingpersistFiltersInSession()if filters are no longer used.Since filters were removed from this table (as discussed in past reviews), the
persistFiltersInSession()call may no longer serve a purpose. While harmless, removing it would improve code clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (42)
app/Filament/Admin/Pages/Health.php(2 hunks)app/Filament/Admin/Pages/ListLogs.php(2 hunks)app/Filament/Admin/Pages/Settings.php(2 hunks)app/Filament/Admin/Pages/ViewLogs.php(1 hunks)app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php(2 hunks)app/Filament/Admin/Resources/ApiKeys/Pages/CreateApiKey.php(2 hunks)app/Filament/Admin/Resources/ApiKeys/Pages/ListApiKeys.php(2 hunks)app/Filament/Admin/Resources/DatabaseHosts/DatabaseHostResource.php(1 hunks)app/Filament/Admin/Resources/DatabaseHosts/Pages/EditDatabaseHost.php(2 hunks)app/Filament/Admin/Resources/DatabaseHosts/Pages/ListDatabaseHosts.php(2 hunks)app/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.php(2 hunks)app/Filament/Admin/Resources/Eggs/Pages/CreateEgg.php(2 hunks)app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php(1 hunks)app/Filament/Admin/Resources/Eggs/Pages/ListEggs.php(2 hunks)app/Filament/Admin/Resources/Mounts/MountResource.php(1 hunks)app/Filament/Admin/Resources/Mounts/Pages/CreateMount.php(2 hunks)app/Filament/Admin/Resources/Mounts/Pages/EditMount.php(2 hunks)app/Filament/Admin/Resources/Mounts/Pages/ListMounts.php(2 hunks)app/Filament/Admin/Resources/Mounts/Pages/ViewMount.php(2 hunks)app/Filament/Admin/Resources/Nodes/NodeResource.php(2 hunks)app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php(2 hunks)app/Filament/Admin/Resources/Nodes/Pages/EditNode.php(1 hunks)app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php(2 hunks)app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php(2 hunks)app/Filament/Admin/Resources/Nodes/RelationManagers/ServerRelationManager.php(2 hunks)app/Filament/Admin/Resources/Roles/Pages/EditRole.php(2 hunks)app/Filament/Admin/Resources/Roles/Pages/ListRoles.php(2 hunks)app/Filament/Admin/Resources/Roles/RoleResource.php(0 hunks)app/Filament/Admin/Resources/Servers/Pages/EditServer.php(3 hunks)app/Filament/Admin/Resources/Servers/Pages/ListServers.php(2 hunks)app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.php(5 hunks)app/Filament/Admin/Resources/Servers/RelationManagers/DatabasesRelationManager.php(4 hunks)app/Filament/Admin/Resources/Users/Pages/EditUser.php(2 hunks)app/Filament/Admin/Resources/Users/Pages/ListUsers.php(2 hunks)app/Filament/Admin/Resources/Webhooks/Pages/EditWebhookConfiguration.php(2 hunks)app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php(2 hunks)app/Filament/Admin/Resources/Webhooks/WebhookResource.php(1 hunks)app/Filament/Components/Actions/ExportEggAction.php(2 hunks)app/Filament/Components/Actions/ImportEggAction.php(2 hunks)app/Filament/Components/Actions/UpdateNodeAllocations.php(2 hunks)app/Filament/Pages/Auth/EditProfile.php(2 hunks)app/Providers/AppServiceProvider.php(2 hunks)
💤 Files with no reviewable changes (1)
- app/Filament/Admin/Resources/Roles/RoleResource.php
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: notAreYouScared
Repo: pelican-dev/panel PR: 1865
File: app/Filament/Admin/Resources/Nodes/Pages/EditNode.php:682-682
Timestamp: 2025-11-05T22:21:31.863Z
Learning: In app/Filament/Admin/Resources/Nodes/Pages/EditNode.php, the diagnostics tab's upload action intentionally does not use the iconButton() modifier, while the pull action does. This UI difference is intentional.
📚 Learning: 2025-11-05T22:21:31.863Z
Learnt from: notAreYouScared
Repo: pelican-dev/panel PR: 1865
File: app/Filament/Admin/Resources/Nodes/Pages/EditNode.php:682-682
Timestamp: 2025-11-05T22:21:31.863Z
Learning: In app/Filament/Admin/Resources/Nodes/Pages/EditNode.php, the diagnostics tab's upload action intentionally does not use the iconButton() modifier, while the pull action does. This UI difference is intentional.
Applied to files:
app/Filament/Components/Actions/ExportEggAction.phpapp/Filament/Components/Actions/ImportEggAction.phpapp/Filament/Admin/Pages/Health.phpapp/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.phpapp/Filament/Admin/Resources/Nodes/Pages/ListNodes.phpapp/Filament/Admin/Resources/Nodes/Pages/CreateNode.phpapp/Filament/Admin/Resources/Servers/RelationManagers/DatabasesRelationManager.phpapp/Filament/Admin/Resources/Mounts/Pages/EditMount.phpapp/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.phpapp/Filament/Admin/Resources/Eggs/Pages/ListEggs.phpapp/Filament/Admin/Resources/Servers/Pages/ListServers.phpapp/Filament/Admin/Resources/Eggs/Pages/CreateEgg.phpapp/Filament/Admin/Resources/Webhooks/Pages/EditWebhookConfiguration.phpapp/Filament/Admin/Resources/ApiKeys/Pages/CreateApiKey.phpapp/Filament/Admin/Resources/DatabaseHosts/Pages/EditDatabaseHost.phpapp/Filament/Admin/Resources/Mounts/Pages/ViewMount.phpapp/Filament/Admin/Pages/Settings.phpapp/Filament/Admin/Resources/Roles/Pages/ListRoles.phpapp/Filament/Admin/Resources/Mounts/Pages/CreateMount.phpapp/Filament/Admin/Resources/DatabaseHosts/Pages/ListDatabaseHosts.phpapp/Filament/Admin/Resources/Users/Pages/EditUser.phpapp/Filament/Admin/Pages/ListLogs.phpapp/Filament/Admin/Resources/Mounts/Pages/ListMounts.phpapp/Filament/Admin/Resources/Servers/Pages/EditServer.phpapp/Filament/Components/Actions/UpdateNodeAllocations.phpapp/Filament/Pages/Auth/EditProfile.phpapp/Filament/Admin/Resources/Roles/Pages/EditRole.phpapp/Filament/Admin/Resources/Nodes/Pages/EditNode.phpapp/Filament/Admin/Pages/ViewLogs.phpapp/Filament/Admin/Resources/Eggs/Pages/EditEgg.phpapp/Filament/Admin/Resources/ApiKeys/Pages/ListApiKeys.php
📚 Learning: 2025-10-15T11:55:53.461Z
Learnt from: rmartinoscar
Repo: pelican-dev/panel PR: 1801
File: app/Extensions/OAuth/Schemas/AuthentikSchema.php:7-10
Timestamp: 2025-10-15T11:55:53.461Z
Learning: In Filament v4, Wizard Step components use the Filament\Schemas namespace (Filament\Schemas\Components\Wizard\Step), not Filament\Forms.
Applied to files:
app/Filament/Components/Actions/ImportEggAction.phpapp/Filament/Admin/Resources/Nodes/Pages/CreateNode.phpapp/Providers/AppServiceProvider.phpapp/Filament/Admin/Resources/Eggs/Pages/CreateEgg.phpapp/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.phpapp/Filament/Admin/Pages/Settings.phpapp/Filament/Admin/Resources/ApiKeys/ApiKeyResource.phpapp/Filament/Admin/Resources/Servers/Pages/EditServer.phpapp/Filament/Pages/Auth/EditProfile.php
📚 Learning: 2025-09-16T19:30:21.443Z
Learnt from: rmartinoscar
Repo: pelican-dev/panel PR: 1708
File: app/Filament/App/Resources/Servers/Pages/ListServers.php:115-116
Timestamp: 2025-09-16T19:30:21.443Z
Learning: The Filament `recordActions` method accepts both arrays and ActionGroup instances (signature: `array | ActionGroup $actions`), so ActionGroup can be passed directly without wrapping in an array.
Applied to files:
app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.phpapp/Filament/Admin/Resources/Mounts/Pages/EditMount.phpapp/Filament/Admin/Resources/Servers/Pages/ListServers.phpapp/Filament/Admin/Resources/Webhooks/Pages/EditWebhookConfiguration.phpapp/Filament/Admin/Resources/ApiKeys/Pages/CreateApiKey.phpapp/Filament/Admin/Resources/Mounts/Pages/ViewMount.phpapp/Filament/Admin/Resources/Roles/Pages/ListRoles.phpapp/Filament/Admin/Resources/Mounts/Pages/CreateMount.phpapp/Filament/Admin/Resources/Users/Pages/EditUser.phpapp/Filament/Admin/Resources/Users/Pages/ListUsers.phpapp/Filament/Admin/Resources/Roles/Pages/EditRole.php
📚 Learning: 2025-08-12T17:33:57.388Z
Learnt from: lancepioch
Repo: pelican-dev/panel PR: 1595
File: app/Services/Servers/ServerCreationService.php:182-184
Timestamp: 2025-08-12T17:33:57.388Z
Learning: In the Pelican Panel codebase, when updating allocations to assign them to servers, the preferred pattern is to use whereNull('server_id'), lockForUpdate(), and direct property assignment with save() rather than mass update methods, to prevent race conditions and mass-assignment issues while ensuring model events fire properly.
Applied to files:
app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.php
📚 Learning: 2025-10-15T11:55:53.461Z
Learnt from: rmartinoscar
Repo: pelican-dev/panel PR: 1801
File: app/Extensions/OAuth/Schemas/AuthentikSchema.php:7-10
Timestamp: 2025-10-15T11:55:53.461Z
Learning: In Filament v4, the Forms component Placeholder was deprecated and removed. Use TextEntry from Filament\Infolists\Components\TextEntry in forms instead, binding values with ->state(). For HTML content, use ->html().
Applied to files:
app/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.php
📚 Learning: 2025-09-16T19:32:01.343Z
Learnt from: rmartinoscar
Repo: pelican-dev/panel PR: 1708
File: app/Filament/App/Resources/Servers/Pages/ListServers.php:228-266
Timestamp: 2025-09-16T19:32:01.343Z
Learning: ActionGroup in Filament automatically hides itself when all child actions are not visible, so additional hidden() logic to prevent empty groups is unnecessary.
Applied to files:
app/Filament/Admin/Resources/Roles/Pages/EditRole.php
🧬 Code graph analysis (15)
app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.php (1)
app/Models/Allocation.php (1)
Allocation(48-141)
app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php (1)
app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php (1)
app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/Servers/RelationManagers/DatabasesRelationManager.php (1)
app/Models/DatabaseHost.php (1)
DatabaseHost(32-106)
app/Filament/Admin/Resources/Servers/Pages/ListServers.php (2)
app/Filament/Admin/Resources/ApiKeys/Pages/ListApiKeys.php (1)
getDefaultHeaderActions(22-29)app/Filament/Admin/Resources/Servers/Pages/EditServer.php (1)
getDefaultHeaderActions(916-978)
app/Filament/Admin/Resources/Nodes/NodeResource.php (1)
app/Filament/Admin/Resources/Nodes/RelationManagers/ServerRelationManager.php (1)
ServerRelationManager(12-69)
app/Filament/Admin/Resources/ApiKeys/Pages/CreateApiKey.php (1)
app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.php (1)
app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/Users/Pages/EditUser.php (2)
app/Models/User.php (1)
User(94-491)app/helpers.php (1)
user(127-130)
app/Filament/Admin/Resources/Nodes/RelationManagers/ServerRelationManager.php (1)
app/Models/Server.php (2)
Server(132-516)formatResource(482-508)
app/Filament/Admin/Resources/Servers/Pages/EditServer.php (1)
app/Filament/Server/Pages/Console.php (1)
Console(29-219)
app/Filament/Admin/Resources/Users/Pages/ListUsers.php (1)
app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/Roles/Pages/EditRole.php (1)
app/Models/Role.php (1)
Role(24-144)
app/Filament/Admin/Resources/Nodes/Pages/EditNode.php (2)
app/Models/Node.php (2)
Node(59-402)servers(259-262)app/Filament/Admin/Pages/Health.php (1)
icon(165-174)
app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php (3)
app/Models/Egg.php (2)
Egg(60-332)servers(294-297)app/Filament/Components/Actions/ExportEggAction.php (1)
ExportEggAction(12-57)app/Filament/Components/Actions/ImportEggAction.php (2)
ImportEggAction(26-182)multiple(109-181)
🔇 Additional comments (65)
app/Filament/Components/Actions/UpdateNodeAllocations.php (1)
11-11: LGTM! Clean conversion to icon button.The changes correctly convert this action to an icon button with extra-large sizing, consistent with the PR's objective to standardize admin UI. The import is appropriate, and the icon is already defined on line 26.
Also applies to: 27-28
app/Filament/Admin/Pages/ListLogs.php (4)
48-49: LGTM!The conversion to an icon button with large icon size is consistent with the PR's objective to standardize admin actions.
50-51: LGTM!The icon button conversion with large icon size aligns with the PR objectives.
52-54: LGTM!The conversion to an icon button with large icon size is consistent with the standardization effort.
125-126: Verify icon size consistency with other actions.The
DeleteActionusesIconSize::Mediumwhile the other three record actions (ViewLogAction,DownloadAction,uploadLogs) all useIconSize::Large. This creates a visual inconsistency where the delete icon will appear smaller than the other action icons in the same row.Was this intentional, or should
DeleteActionalso useIconSize::Largefor consistency?app/Filament/Components/Actions/ImportEggAction.php (2)
20-20: LGTM: Import statement is correct.The
IconSizeenum import is properly added to support theiconSize()configuration on line 43.
39-43: LGTM: Icon button configuration is correct.The action is properly configured as an icon button with appropriate styling. The
tabler-file-importicon is semantically correct for an import action, and theExtraLargesizing aligns with the PR-wide pattern to standardize admin UI.app/Filament/Admin/Resources/DatabaseHosts/RelationManagers/DatabasesRelationManager.php (3)
13-13: LGTM! Import is necessary for the icon sizing.The IconSize enum import is correctly added to support the new
iconSize()configuration on the DeleteAction.
54-54: Verify the intent of the empty heading.Setting an empty heading string might suppress the default relation table heading, but it's unclear if this is intentional or if this line could be removed entirely. Consider whether this improves the UI or if it was added accidentally.
73-75: LGTM! DeleteAction properly converted to icon button.The DeleteAction is correctly configured as an icon button with:
- Extra-large icon size for consistency
- Appropriate
tabler-trashicon- Proper method chaining
This aligns well with the PR objectives to standardize admin actions as icon buttons.
app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php (1)
454-462: LGTM! Icon button conversion looks good.The DeleteAction and Save action have been successfully converted to icon buttons with appropriate icons (trash and floppy disk) and consistent ExtraLarge sizing. The dynamic label logic for the DeleteAction is preserved, which will provide helpful tooltip context when the action is disabled due to server associations.
app/Filament/Admin/Resources/Eggs/Pages/ListEggs.php (1)
116-118: LGTM! CreateAction styling is consistent.The CreateAction has been properly converted to an icon button with the appropriate file-plus icon and ExtraLarge sizing, matching the pattern used in CreateEgg.php.
app/Filament/Admin/Resources/Eggs/Pages/CreateEgg.php (1)
48-50: LGTM! Create form action properly styled.The create form action has been correctly converted to an icon button with the file-plus icon and ExtraLarge sizing, maintaining consistency with the ListEggs page and the overall PR objective.
app/Filament/Admin/Resources/Nodes/Pages/EditNode.php (1)
811-818: Consider UX implications of icon button with dynamic disabled state.The DeleteAction has a dynamic label that explains why it's disabled when the node has servers. With
iconButton(), this explanatory text will only be visible as a tooltip, which users may not discover since they might not hover over a disabled button. Consider whether this reduced visibility of the "node_has_servers" message aligns with your UX goals, or if a more prominent indicator is needed when deletion is unavailable.The technical implementation is correct and consistent with the PR's objective to standardize on icon buttons.
Note: Line 684 in the diagnostics tab now applies
iconButton()to the upload action, which differs from the previous intentional UI distinction mentioned in learnings. This appears to be part of this PR's broader consistency effort.Based on learnings.
app/Filament/Admin/Resources/Servers/RelationManagers/DatabasesRelationManager.php (5)
21-21: LGTM: Required import added.The
IconSizeenum import is necessary for theiconSize(IconSize::ExtraLarge)calls on lines 86 and 113.
65-65: Verify the empty heading is intentional.Setting the heading to an empty string removes the relation table's title. Please confirm this is intentional and aligns with the desired UI pattern for relation managers in the admin area.
86-87: LGTM: DeleteAction converted to icon button.The conversion to an icon button with extra-large sizing and the
tabler-trashicon aligns perfectly with the PR objective and is semantically appropriate for a delete action.
107-107: LGTM: Improved action placement.Switching from
headerActionstotoolbarActionsis appropriate for relation managers, as it places the create action directly in the table's toolbar rather than the page header, improving UI cohesion.
112-113: LGTM: Excellent dynamic icon implementation.The dynamic icon selection (
tabler-database-xvstabler-database-plus) based on database host availability nicely complements the existing conditional disabled/label/color logic, providing clear visual feedback. The icon button conversion aligns with the PR objective.app/Filament/Admin/Resources/Roles/Pages/EditRole.php (2)
13-13: LGTM!The IconSize import is correctly added and properly used for icon button sizing.
60-68: LGTM! Clean conversion to icon buttons with preserved functionality.The changes successfully convert both actions to icon buttons while maintaining all existing logic:
- DeleteAction preserves conditional label/tooltip logic for disabled states, providing helpful user feedback
- Save action correctly maintains
formId('form')linkage for form submission- Appropriate Tabler icons and consistent ExtraLarge sizing align with the PR objectives
app/Filament/Admin/Resources/Mounts/Pages/EditMount.php (1)
25-30: LGTM! Icon button conversion looks good.The conversion of DeleteAction and Save action to icon buttons with ExtraLarge sizing and appropriate Tabler icons aligns well with the PR objective of standardizing the admin UI to match the client area.
app/Filament/Admin/Resources/Mounts/MountResource.php (1)
104-106: Verify removal of empty state creation action is intentional.The empty state action for creating a mount has been removed. When the table is empty, users will no longer see a convenient creation button in the empty state and will need to use the header action instead. This may reduce discoverability for first-time users.
Is this removal intentional across all resources? If so, ensure the header CreateAction in ListMounts (which is now an icon button) remains visible and intuitive enough for users to discover.
app/Filament/Admin/Resources/Mounts/Pages/ListMounts.php (1)
25-27: LGTM! Good UX improvement.The conversion to an icon button with appropriate icon and sizing is correct. Additionally, removing the
hidden(fn () => Mount::count() <= 0)visibility condition (mentioned in the summary) is a positive UX improvement, as hiding the create button when no mounts exist was counterintuitive.app/Filament/Admin/Resources/Mounts/Pages/CreateMount.php (1)
28-30: LGTM! Icon button conversion is correct.The create form action has been properly converted to an icon button with ExtraLarge sizing and the appropriate tabler-file-plus icon, consistent with the PR objective.
app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php (1)
88-91: LGTM! Consistent icon button conversion.The "create new allocation" action has been successfully converted to an icon button with ExtraLarge sizing and the
tabler-world-plusicon, aligning with the PR's objective to standardize admin area actions.app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php (2)
404-405: LGTM! Wizard navigation actions properly converted.The next and previous navigation actions have been correctly converted to icon buttons with ExtraLarge sizing and appropriate directional arrow icons.
406-414: LGTM! Submit action converted to icon button.The submit action has been successfully converted from a standard button to an icon button with the appropriate
tabler-file-plusicon and XL sizing.app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php (1)
81-84: LGTM! CreateAction converted to prominent icon button.The CreateAction has been successfully converted to an icon button with ExtraLarge sizing and the
tabler-file-plusicon, making it consistently visible in the header.app/Filament/Admin/Resources/Nodes/NodeResource.php (1)
10-10: LGTM! Relation manager reference updated.The import and usage have been correctly updated to reference the renamed
ServerRelationManagerclass.Also applies to: 60-60
app/Filament/Admin/Resources/Nodes/RelationManagers/ServerRelationManager.php (3)
5-5: LGTM! Class renamed with necessary import.The class has been appropriately renamed from
NodesRelationManagertoServerRelationManager, and theServerResourceTypeimport has been added to support the enhanced CPU/Memory column formatting.Also applies to: 12-12
46-47: LGTM! Dynamic placeholder logic added.The
selectablePlaceholderhas been enhanced with dynamic logic that shows the placeholder when a server has one or fewer allocations, and the placeholder text has been properly added.
49-56: LGTM! CPU and Memory columns with proper formatting.The CPU and Memory columns have been added with proper formatting via
Server::formatResource(), which correctly handles unlimited resources (0 values) by displaying the infinity symbol. The tooltips provide helpful context for the displayed limits.app/Filament/Admin/Resources/Users/Pages/ListUsers.php (2)
12-12: LGTM!The
IconSizeenum import is correctly added to support the extra-large icon sizing configuration.
25-27: Code changes are correct and complete.The
tabler-user-plusicon is available via thesecondnetwork/blade-tabler-iconspackage (version ^3.26) already installed in the project. Icons from this package are automatically registered with thetabler-prefix, so no additional configuration is needed. The CreateAction implementation looks good.app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.php (4)
11-11: LGTM!The new imports for
BulkActionGroupandIconSizeare correctly added and properly utilized in the toolbar actions.Also applies to: 22-22
38-38: LGTM!The empty heading aligns with the UI consistency improvements across the admin panel.
111-151: LGTM!The CreateAction correctly implements the icon button pattern with appropriate Tabler icon and extra-large sizing, matching the PR's objective to unify the admin UI.
152-167: LGTM!The AssociateAction correctly implements the icon button pattern with appropriate Tabler icon and extra-large sizing, consistent with the other toolbar actions.
app/Filament/Admin/Resources/Servers/Pages/ListServers.php (3)
15-15: LGTM! Import correctly added.The IconSize enum import is properly added and used in the file for sizing icon buttons.
113-116: LGTM! CreateAction properly converted to icon button.The CreateAction has been correctly updated to use an icon button with
IconSize::ExtraLargeand the 'tabler-file-plus' icon, which is consistent with the pattern used in other admin resources likeListApiKeys.php.
96-99: Based on the comprehensive search results, the codebase actually shows a clear and consistent pattern that the original review comment did not identify:Pattern discovered:
- Delete actions use
IconSize::ExtraLarge(ApiKeys, DatabasesRelationManagers, ListNodes)- View/other actions use
IconSize::Large(ListLogs file operations, and the ListServers View action in this PR)Finding: The PR change using
IconSize::Largefor the View action is actually consistent with the established codebase pattern for non-delete record actions. This is not an inconsistency—it's following the convention.The original review comment's assumption that the size difference is "intentional" due to record vs. header actions was incorrect in its reasoning, but the actual implementation is correct because it aligns with the action-type-based pattern that exists throughout the codebase.
app/Filament/Admin/Resources/Servers/Pages/EditServer.php (3)
54-54: LGTM!The
IconSizeimport is correctly added to support the icon button sizing throughout the file.
948-950: LGTM!The Delete action is correctly converted to an icon button with appropriate icon and sizing. The method chaining order is correct and the
tabler-trashicon is semantically appropriate.
968-976: LGTM!Both the console and save actions are correctly converted to icon buttons:
- The console action properly uses
tabler-terminalicon with icon button styling- The save action uses the classic
tabler-device-floppyicon with appropriate sizingThe method chaining is correct and consistent with the PR's objective to standardize admin actions as icon buttons.
app/Filament/Admin/Pages/Settings.php (1)
833-834: LGTM! Clean conversion to icon button.The save action has been successfully converted to an icon button with an extra-large icon size and appropriate floppy disk icon, while preserving the existing authorization and keyboard shortcut functionality.
app/Filament/Admin/Resources/Users/Pages/EditUser.php (1)
37-42: LGTM! Header actions properly converted to icon buttons.Both the DeleteAction and SaveFormAction have been successfully converted to icon buttons with extra-large sizing and appropriate icons. The existing disabled logic for preventing self-deletion and deletion of users with servers remains intact.
app/Filament/Admin/Resources/Roles/Pages/ListRoles.php (1)
25-27: LGTM! CreateAction cleanly converted to icon button.The CreateAction has been successfully converted to an icon button with the appropriate file-plus icon and extra-large sizing, maintaining consistency with the broader UI enhancement pattern.
app/Filament/Pages/Auth/EditProfile.php (1)
555-560: LGTM! Profile edit actions converted to icon buttons.Both the Cancel and Save form actions have been successfully converted to icon buttons with appropriate icons (arrow-left and device-floppy) and extra-large sizing. The formId linkage is properly maintained, and the action ordering provides good UX.
app/Filament/Admin/Pages/ViewLogs.php (1)
22-30: LGTM! Log viewer actions comprehensively converted to icon buttons.All four header actions (Back, Delete, Download, and UploadLogs) have been successfully converted to icon buttons with appropriate icons and extra-large sizing. The BackAction repositioning to the beginning of the actions array improves UX by placing the navigation action first. All existing functionality (tooltips, confirmations, modals) is properly preserved.
app/Filament/Admin/Resources/DatabaseHosts/DatabaseHostResource.php (1)
102-102: LGTM! Empty state action removed in favor of header action.The CreateAction has been removed from the empty state actions, streamlining the UI by relying on the header action for creation instead. This is consistent with the broader pattern of standardizing action placement across the admin interface.
app/Filament/Admin/Pages/Health.php (1)
51-52: LGTM! Health page refresh action converted to icon button.The refresh action has been successfully converted to an icon button with an appropriate refresh icon and extra-large sizing, maintaining the existing action binding while enhancing the UI consistency.
app/Filament/Admin/Resources/DatabaseHosts/Pages/EditDatabaseHost.php (1)
40-45: LGTM! Database host edit actions converted to icon buttons.Both the DeleteAction and SaveFormAction have been successfully converted to icon buttons with appropriate icons and extra-large sizing. The existing disabled logic preventing deletion of database hosts with active databases is properly preserved, and the form linkage is maintained.
app/Filament/Admin/Resources/DatabaseHosts/Pages/ListDatabaseHosts.php (1)
12-12: LGTM!The import is necessary for the
iconSize()configuration below.app/Providers/AppServiceProvider.php (2)
29-35: LGTM! Imports are well-organized.The Filament icon alias imports are correctly namespaced and organized, following Filament v4 conventions.
138-175: Icon registration is correct; no changes needed.All Tabler icon names and Filament icon alias constants you questioned have been verified as valid:
- Tabler icons including alert-circle and info-circle are valid
- Filament icon alias constants (PanelsIconAlias, TablesIconAlias, NotificationsIconAlias, FormsIconAlias, SupportIconAlias) are documented in the Filament 4.x API
- The icon naming patterns used (e.g., tabler-arrow-right-dashed, tabler-chevrons-right) align with Tabler's naming conventions
The registration approach is solid and the code is ready to merge.
app/Filament/Admin/Resources/ApiKeys/Pages/ListApiKeys.php (1)
12-12: LGTM! Consistent icon button pattern.The CreateAction has been successfully converted to an icon button matching the pattern established in CreateApiKey.php. The removal of conditional hiding logic (mentioned in the AI summary) improves consistency by making the create action always visible in the header.
Also applies to: 26-27
app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php (2)
23-23: Icon verified—delete action conversion is correct.The
tabler-trashicon is properly registered inapp/Providers/AppServiceProvider.phpas a form icon alias (lines 168-169) and is consistently used throughout the codebase. The DeleteAction conversion in ApiKeyResource.php is correct and follows the established pattern used in other resources.
103-105: Review comment is based on an incorrect premise.The review claims that
emptyStateActionscontainingCreateAction::make()"has been removed," but:
- No
emptyStateActionsexist anywhere in the codebase (verified via full-codebase search)- All resources follow the identical pattern: empty state configuration (icon, description, heading) with
CreateActionin the page header- The current ApiKeyResource implementation matches the standard pattern used throughout the admin panel
- The CreateAction is properly located in
ListApiKeys.phpheader actions, which is the correct and consistent approachThe code is already in its intended state and matches established patterns in the codebase. No changes or verification needed.
Likely an incorrect or invalid review comment.
app/Filament/Admin/Resources/ApiKeys/Pages/CreateApiKey.php (1)
12-12: The verification concern is incorrect and should be disregarded.The
tabler-file-plusicon does not need to be registered in the service provider. TheFilamentIcon::register()block handles only Filament framework-specific icon aliases (e.g.,PanelsIconAlias,TablesIconAlias). Standard Tabler icons liketabler-file-plusare available by default as part of Filament's built-in Tabler icon set and work out-of-the-box without explicit registration. The icon is used consistently across 14+ files throughout the codebase, confirming this is the correct pattern.Likely an incorrect or invalid review comment.
app/Filament/Components/Actions/ExportEggAction.php (2)
10-10: LGTM! Clean icon button conversion.The implementation correctly converts the export action to an icon button with appropriate sizing. The
tabler-file-exporticon is semantically appropriate for an export action, and theExtraLargesize is consistent with the PR's systematic UI updates.Also applies to: 24-24, 26-26, 28-28
26-26: Original review comment is based on incorrect assumptions about Filament icon registration.The icon
tabler-file-exportexists in the Tabler icon set and is available through the blade-tabler-icons package. Filament'sFilamentIcon::register()in AppServiceProvider is specifically for aliasing system UI component icons (user menu, notifications, theme switcher, etc.), not for registering generic Tabler icons. Custom icon usage like$this->icon('tabler-file-export')works directly without needing registration, as long as the Tabler icon package is installed and Blade Icons is configured—both of which are clearly present in the codebase given the existing Tabler icon aliases. No action required.Likely an incorrect or invalid review comment.
app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php (1)
25-27: LGTM! Clean conversion to icon button.The CreateAction conversion to an icon button with extra-large sizing and the
tabler-file-plusicon is consistent with the PR's objective to standardize admin UI.app/Filament/Admin/Resources/Webhooks/Pages/EditWebhookConfiguration.php (2)
27-29: LGTM! DeleteAction icon button conversion.The conversion to an icon button with the trash icon and extra-large sizing is consistent with the PR's UI standardization objective.
36-38: The form ID mismatch concern is unfounded—no code changes needed.Verification found:
- No 'configuration_form' references exist in the codebase; the concern about a breaking change from a prior value is baseless
- The
formId('form')matches Filament's default convention; both standard Filament pages and webhook pages use the same ID- Both
EditWebhookConfigurationandCreateWebhookConfigurationconsistently applyformId('form')across all form actions, and no custom form templates override thisThe form submission will work correctly as-is.
Likely an incorrect or invalid review comment.
app/Filament/Admin/Resources/Servers/RelationManagers/AllocationsRelationManager.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
app/Providers/Filament/FilamentServiceProvider.php (1)
88-89: Re‑evaluate the globalIconSize::Largedefault (may be redundant and out of step with ExtraLarge usage)Globally forcing
iconSize(IconSize::Large)on allActions looks harmless, but:
Largeis already the Filament default in most cases.- Prior feedback notes that
ExtraLargeis the dominant size in the codebase, so this may fight the desired visual baseline instead of enforcing it.You might either:
- Switch the default here to
IconSize::ExtraLarge, or- Drop this
configureUsingentirely and rely on local overrides where needed.Example if you decide to drop it:
- Select::configureUsing(fn (Select $select) => $select->native(false)); - Action::configureUsing(fn (Action $action) => $action->iconSize(IconSize::Large)); + Select::configureUsing(fn (Select $select) => $select->native(false));
🧹 Nitpick comments (1)
app/Providers/Filament/FilamentServiceProvider.php (1)
91-133: Centralized FilamentIcon alias map looks good; consider future extraction to config if it growsThe alias→Tabler mappings for actions, panels, tables, notifications, support, forms, and schemas are coherent (trash for deletes, chevrons for collapse/expand, bells for notifications, etc.) and give you a nice single place to standardize admin/client iconography. No functional issues from my side.
If this list keeps expanding, you might eventually move it into a dedicated config file or static map to keep
FilamentServiceProviderfrom becoming too UI‑heavy, but that’s not necessary right now.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/Providers/Filament/FilamentServiceProvider.php(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: notAreYouScared
Repo: pelican-dev/panel PR: 1865
File: app/Filament/Admin/Resources/Nodes/Pages/EditNode.php:682-682
Timestamp: 2025-11-05T22:21:31.863Z
Learning: In app/Filament/Admin/Resources/Nodes/Pages/EditNode.php, the diagnostics tab's upload action intentionally does not use the iconButton() modifier, while the pull action does. This UI difference is intentional.
📚 Learning: 2025-10-15T11:55:53.461Z
Learnt from: rmartinoscar
Repo: pelican-dev/panel PR: 1801
File: app/Extensions/OAuth/Schemas/AuthentikSchema.php:7-10
Timestamp: 2025-10-15T11:55:53.461Z
Learning: In Filament v4, Wizard Step components use the Filament\Schemas namespace (Filament\Schemas\Components\Wizard\Step), not Filament\Forms.
Applied to files:
app/Providers/Filament/FilamentServiceProvider.php
🔇 Additional comments (1)
app/Providers/Filament/FilamentServiceProvider.php (1)
5-6: Icon alias imports and namespaces look consistent with Filament v4 usageThe added imports for
Action,IconSize,FilamentIcon, and the various*IconAliasclasses line up with the Filament v4 “View*IconAlias” /Schemasnamespaces and should integrate cleanly with the new icon registration below. I don’t see issues here.Based on learnings, this matches the Filament\Schemas namespace pattern we’ve used elsewhere.
Also applies to: 10-12, 14-14, 16-16, 18-20
Changes most, if not all, actions in the admin area to IconButtons to match the client area.