feat(datatables): add tooltip support and custom button helper#112
Merged
sebastienheyd merged 4 commits intomasterfrom Feb 14, 2026
Merged
feat(datatables): add tooltip support and custom button helper#112sebastienheyd merged 4 commits intomasterfrom
sebastienheyd merged 4 commits intomasterfrom
Conversation
Add tooltip functionality to datatable buttons with conditional rendering to avoid empty title attributes. Introduce custom() static helper method for simplified button creation with icon, tooltip, color and attributes support. The method intelligently handles empty icons to prevent unnecessary HTML generation. Include comprehensive test suite with 8 tests covering tooltip rendering, method chaining, custom button creation with various parameter combinations, and argument order validation. Also update documentation with detailed examples and usage instructions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 207efd620b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Group the tooltip setter with other setters (color, class, link, etc.) before the make() rendering method for better readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add tooltip support and custom button helper to DataTable buttons with comprehensive improvements.
Features
title="")custom()static helper method for simplified button creationiconbeforetooltipfor better ergonomicsAPI Usage
Method 1: Fluent API
Method 2: Custom helper
Test Results
✅ All 228 tests pass with 735 assertions
Changes
src/Datatables/Button.php: Add tooltip property, custom() and tooltip() methods, conditional renderingtests/Datatables/ButtonTest.php: Complete test suitedocs/docs/8.x/datatables/button.md: Updated documentationCloses #104