You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: allow customizing the button texts of a row action confirmation - #24
Add withConfirmation overloads to EasyRowAction that take the confirm and cancel button texts, both with a static message and with a message provider. The existing overloads keep using "Ok" / "Cancel". The row actions demo now shows custom button texts.
Confirmation dialogs for row actions can now use custom confirm and cancel button labels, alongside a fixed or item-specific message.
The deactivate action now displays “Deactivate” and “Keep active” as its confirmation and cancel options. Default button labels remain “Ok” and “Cancel.”
No actionable comments were generated in the recent review.
Walkthrough
EasyRowAction now exposes confirmation overloads that accept custom confirm and cancel button text. Tests cover default and custom labels, static and row-dependent messages, and null-label exceptions. The demo supplies custom labels, and the project version changes to 1.2.0-SNAPSHOT.
EasyRowAction exposes custom-button-text overloads for static messages and row-dependent message providers. Tests cover default and custom text, null titles, provider-generated messages, and null-label exceptions. The demo action supplies “Deactivate” and “Keep active.” The project version changes to 1.2.0-SNAPSHOT.
This change adds custom confirm and cancel button texts to row-action confirmation dialogs, and the existing default labels are unchanged. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title states the main change: row action confirmation dialogs can now use custom confirm and cancel button texts. The changeset adds public withConfirmation overloads to EasyRowAction that accept …
Linked Issues check
[#22] The issue asks that the confirm and cancel button texts of a row action confirmation be customizable. The issue proposes making the private overload `withConfirmation(String title, ValueProvider…
Out of Scope Changes check
All functional changes map to #22: - EasyRowAction.java: public overloads for custom button texts, plus the static-message variant. - EasyRowActionTest.java: tests for the new overloads and null h…
Full details: Title check
Explanation
The title states the main change: row action confirmation dialogs can now use custom confirm and cancel button texts. The changeset adds public withConfirmation overloads to EasyRowAction that accept these texts, and the demo and tests cover them. The title is concise, specific, and matches the linked issue #22 objective.
Full details: Linked Issues check
Explanation
[#22] The issue asks that the confirm and cancel button texts of a row action confirmation be customizable. The issue proposes making the private overload withConfirmation(String title, ValueProvider<T, String> messageProvider, String confirmText, String cancelText) public, and optionally adding a static-message variant.
At the reviewed head, EasyRowAction.java implements both requirements:
The message-provider overload with confirmText and cancelText is public. It builds a ConfirmDialog with setConfirmText and setCancelText.
A static-message overload withConfirmation(String title, String message, String confirmText, String cancelText) is public. It delegates to the message-provider overload through Constant.of(message).
The existing overloads keep the defaults "Ok" and "Cancel".
@NonNull on the text parameters causes a NullPointerException for null button texts. A null title remains allowed.
The test file adds coverage for default texts, custom texts with a null title, item-specific messages from a provider, and null button texts. The demo uses the new texts. The Easy CRUD integration described in the issue is context only and is not required here.
The current head contents were checked for the overload signatures and their delegation. The test assertions were taken from the change summary and were not independently run.
Full details: Out of Scope Changes check
Explanation
All functional changes map to #22:
EasyRowAction.java: public overloads for custom button texts, plus the static-message variant.
EasyRowActionTest.java: tests for the new overloads and null handling.
RowActionsDemo.java: the deactivate action shows the custom button texts. This is demonstration support for the new API.
The pom.xml change bumps the project version from 1.1.1-SNAPSHOT to 1.2.0-SNAPSHOT. It is a release-level metadata change, not a behavior change. It is consistent with adding a public API in a minor release. It is not tied to #22 in the PR description, so it is noted here but does not constitute unrelated functional scope.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
Add
withConfirmationoverloads toEasyRowActionthat take the confirm and cancel button texts, both with a static message and with a message provider. The existing overloads keep using "Ok" / "Cancel". The row actions demo now shows custom button texts.Close #22
Summary by CodeRabbit