Skip to content

Allow shipping tables pages to be extended#2246

Merged
alecritson merged 1 commit intolunarphp:1.xfrom
ryanmitchell:fix/allow-shipping-table-page-extending
Jul 23, 2025
Merged

Allow shipping tables pages to be extended#2246
alecritson merged 1 commit intolunarphp:1.xfrom
ryanmitchell:fix/allow-shipping-table-page-extending

Conversation

@ryanmitchell
Copy link
Contributor

@ryanmitchell ryanmitchell commented Jul 18, 2025

The shipping tables resources should use getDefaultPages() not getPages() so that they can be extended.

Summary by CodeRabbit

  • Refactor
    • Updated method names for improved clarity in shipping resource management. No changes to existing functionality or user experience.

@vercel
Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 9:21am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

Walkthrough

The method name getPages() was renamed to getDefaultPages() in three resource classes within the table-rate-shipping package. The method logic and returned routing configurations remain unchanged in each class; only the method names and their signatures were updated.

Changes

Files (grouped) Change Summary
packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php Renamed getPages() to getDefaultPages() in ShippingExclusionListResource.
packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php Renamed getPages() to getDefaultPages() in ShippingMethodResource.
packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php Renamed getPages() to getDefaultPages() in ShippingZoneResource.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cec97ad and 16d9220.

📒 Files selected for processing (3)
  • packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php (1 hunks)
  • packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php (1 hunks)
  • packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php (2)
packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php (1)
  • getDefaultPages (109-115)
packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php (1)
  • getDefaultPages (294-302)
packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php (2)
packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php (1)
  • getDefaultPages (109-115)
packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php (1)
  • getDefaultPages (191-198)
packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php (2)
packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php (1)
  • getDefaultPages (294-302)
packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php (1)
  • getDefaultPages (191-198)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: admin - PHP 8.4 - L11.* ↑ E
  • GitHub Check: admin - PHP 8.4 - L12.* ↑
  • GitHub Check: shipping - PHP 8.4 - L12.* ↑
  • GitHub Check: core - PHP 8.4 - L12.* ↑ E
  • GitHub Check: search - PHP 8.4 - L11.* ↑
  • GitHub Check: core - PHP 8.4 - L12.* ↑
  • GitHub Check: admin - PHP 8.3 - L12.* ↑
  • GitHub Check: admin - PHP 8.4 - L11.* ↑
  • GitHub Check: stripe - PHP 8.3 - L12.* ↑
  • GitHub Check: admin - PHP 8.3 - L12.* ↑ E
  • GitHub Check: core - PHP 8.4 - L11.* ↑ E
  • GitHub Check: stripe - PHP 8.3 - L11.* ↑ E
  • GitHub Check: search - PHP 8.3 - L11.* ↑ E
  • GitHub Check: search - PHP 8.3 - L11.* ↑
  • GitHub Check: core - PHP 8.3 - L12.* ↑ E
  • GitHub Check: core - PHP 8.3 - L12.* ↑
  • GitHub Check: admin - PHP 8.3 - L11.* ↑ E
  • GitHub Check: admin - PHP 8.3 - L11.* ↑
  • GitHub Check: core - PHP 8.3 - L11.* ↑
  • GitHub Check: core - PHP 8.3 - L11.* ↑ E
🔇 Additional comments (4)
packages/table-rate-shipping/src/Filament/Resources/ShippingExclusionListResource.php (1)

109-115: LGTM! Method rename enables extensibility as intended.

The method rename from getPages() to getDefaultPages() aligns with Filament's convention for extensible resources. This change allows developers to override or extend the default page configuration while maintaining the same functionality. The implementation is consistent with the similar changes made in ShippingMethodResource and ShippingZoneResource classes.

packages/table-rate-shipping/src/Filament/Resources/ShippingZoneResource.php (1)

294-294: LGTM! Method renaming enables extensibility as intended.

The method name change from getPages() to getDefaultPages() correctly implements the extensibility pattern described in the PR objectives. This change is consistent with the similar modifications made to ShippingExclusionListResource and ShippingMethodResource classes, creating a unified approach for allowing page extensions across all shipping table resources.

packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource.php (2)

191-198: Method rename aligns with Filament 3 API – nice catch

Switching to getDefaultPages() keeps the door open for downstream packages to extend getPages() while preserving the default set here. 👍
No further issues spotted with the method signature or returned routes.


191-198: No change required: ListShippingMethod is correctly named
Verification shows the class is defined as singular ListShippingMethod and there is no ListShippingMethods class, so the existing reference will resolve at runtime.

• File: packages/table-rate-shipping/src/Filament/Resources/ShippingMethodResource/Pages/ListShippingMethod.php (line 12)
• Class declaration: class ListShippingMethod extends BaseListRecords

You can ignore the proposed pluralization; everything is wired up correctly.

Likely an incorrect or invalid review comment.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@alecritson alecritson merged commit 60ac49f into lunarphp:1.x Jul 23, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants