From 60fe810f594b97a4a1444ac6e0f753d580420bc0 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 16 Jun 2026 09:46:24 -0300 Subject: [PATCH 1/5] WIP: spec: remove EasyGrid.removeRowAction; action removal is via EasyRowAction.remove() --- FEATURE_ROW_ACTIONS.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/FEATURE_ROW_ACTIONS.md b/FEATURE_ROW_ACTIONS.md index 658cb9d..4637903 100644 --- a/FEATURE_ROW_ACTIONS.md +++ b/FEATURE_ROW_ACTIONS.md @@ -44,15 +44,6 @@ Adds an action button whose icon is resolved per row by calling `iconProvider` w --- -#### Removing row actions - -```java -void removeRowAction(EasyRowAction action); -``` -Removes the specified action from the actions column. Equivalent to calling `action.remove()`. - ---- - #### Rendering mode ```java @@ -122,7 +113,7 @@ Intercepts button clicks and presents a confirmation dialog before invoking the ```java void remove(); ``` -Removes this action from the actions column and triggers an immediate re-render so the change is visible without waiting for a data refresh. Equivalent to calling `easyGrid.removeRowAction(this)`. If the action has already been removed, this call is a no-op. After removal the `EasyRowAction` reference is considered dead and cannot be re-added; call `addRowAction` again to create a new action. +Removes this action from the actions column and triggers an immediate re-render so the change is visible without waiting for a data refresh. If the action has already been removed, this call is a no-op. After removal the `EasyRowAction` reference is considered dead and cannot be re-added; call `addRowAction` again to create a new action. --- @@ -163,8 +154,6 @@ easyGrid.addRowAction("Deactivate", VaadinIcon.CLOSE, person -> { // Removing an action EasyRowAction adminAction = easyGrid.addRowAction("Purge", VaadinIcon.TRASH, item -> purge(item)); // later: -easyGrid.removeRowAction(adminAction); -// or equivalently, if only the action reference is in scope: adminAction.remove(); // Configure the actions column via the underlying Grid.Column From 7b0ea555c2a77aeeeb7f301ee128cb9283acbbd4 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 16 Jun 2026 09:46:46 -0300 Subject: [PATCH 2/5] WIP: spec: add EasyGrid.setDefaultRowActionVariants --- FEATURE_ROW_ACTIONS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FEATURE_ROW_ACTIONS.md b/FEATURE_ROW_ACTIONS.md index 4637903..783b062 100644 --- a/FEATURE_ROW_ACTIONS.md +++ b/FEATURE_ROW_ACTIONS.md @@ -62,6 +62,15 @@ Returns the `Grid.Column` backing the actions column, allowing the caller to --- +#### Default theme variants + +```java +void setDefaultRowActionVariants(ButtonVariant... variants); +``` +Sets the Vaadin `ButtonVariant`s applied by default to every action button created *after* this call; actions added earlier are unaffected. The built-in default is `LUMO_TERTIARY_INLINE`. Pass no arguments (or `null`) to clear the defaults. Individual actions can still add their own variants via `EasyRowAction.addThemeVariants(...)`. + +--- + ### `EasyRowAction` All mutator methods return `this` to support method chaining. @@ -156,6 +165,9 @@ EasyRowAction adminAction = easyGrid.addRowAction("Purge", VaadinIcon.TR // later: adminAction.remove(); +// Default theme variants applied to every action added afterwards +easyGrid.setDefaultRowActionVariants(ButtonVariant.LUMO_SMALL, ButtonVariant.LUMO_TERTIARY); + // Configure the actions column via the underlying Grid.Column easyGrid.getActionsColumn() .setHeader("Actions") From c64092a4abe46a69dd7eee6df7a6fd5abf6d1c60 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 16 Jun 2026 09:46:58 -0300 Subject: [PATCH 3/5] WIP: spec: add EasyGrid.setRowActionsRenderer --- FEATURE_ROW_ACTIONS.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FEATURE_ROW_ACTIONS.md b/FEATURE_ROW_ACTIONS.md index 783b062..99207d4 100644 --- a/FEATURE_ROW_ACTIONS.md +++ b/FEATURE_ROW_ACTIONS.md @@ -71,6 +71,15 @@ Sets the Vaadin `ButtonVariant`s applied by default to every action button creat --- +#### Custom renderer + +```java +void setRowActionsRenderer(RowActionsRenderer renderer); +``` +Replaces the strategy that turns the registered actions into UI. The built-in inline-button and context-menu renderers (selected via `setRowActionsAsMenu`) cover the common cases; supply a custom `RowActionsRenderer` to present actions another way. The previous renderer is cleaned up and a rebuild is scheduled. + +--- + ### `EasyRowAction` All mutator methods return `this` to support method chaining. From 2f66f62bded39dda8b10faf4c39586396b835219 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 16 Jun 2026 09:47:07 -0300 Subject: [PATCH 4/5] WIP: spec: add EasyGrid.refreshRowActions --- FEATURE_ROW_ACTIONS.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FEATURE_ROW_ACTIONS.md b/FEATURE_ROW_ACTIONS.md index 99207d4..56ebb10 100644 --- a/FEATURE_ROW_ACTIONS.md +++ b/FEATURE_ROW_ACTIONS.md @@ -80,6 +80,15 @@ Replaces the strategy that turns the registered actions into UI. The built-in in --- +#### Refreshing after configuration changes + +```java +void refreshRowActions(); +``` +Schedules a rebuild of the actions column on the next server response. The fluent `EasyRowAction` methods (`visibleWhen`, `enabledWhen`, `tooltip`, `withConfirmation`) already trigger this automatically, so an explicit call is only needed after changing an action's attribute or property, which are not applied automatically. + +--- + ### `EasyRowAction` All mutator methods return `this` to support method chaining. From 28c38d5d1541de88b528d21ed56134d4cdb3b82e Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 16 Jun 2026 09:47:23 -0300 Subject: [PATCH 5/5] WIP: spec: add EasyRowAction HasStyle/HasThemeVariant styling --- FEATURE_ROW_ACTIONS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/FEATURE_ROW_ACTIONS.md b/FEATURE_ROW_ACTIONS.md index 56ebb10..b9de324 100644 --- a/FEATURE_ROW_ACTIONS.md +++ b/FEATURE_ROW_ACTIONS.md @@ -135,6 +135,19 @@ Intercepts button clicks and presents a confirmation dialog before invoking the --- +#### Styling and theme variants + +`EasyRowAction` implements `HasStyle` and `HasThemeVariant`, so the action's button can be styled and themed directly: + +```java +action.addClassName("danger"); +action.getStyle().set("font-weight", "bold"); +action.addThemeVariants(ButtonVariant.LUMO_ERROR); +``` +These are forwarded onto the rendered button. Unlike the fluent mutators above, style and theme-variant changes made after the grid has already rendered are **not** applied automatically — call `easyGrid.refreshRowActions()` afterwards to make them visible. + +--- + #### Removal ```java @@ -186,6 +199,10 @@ adminAction.remove(); // Default theme variants applied to every action added afterwards easyGrid.setDefaultRowActionVariants(ButtonVariant.LUMO_SMALL, ButtonVariant.LUMO_TERTIARY); +// Style or theme an individual action's button +easyGrid.addRowAction("Reset", person -> reset(person)) + .addClassName("warning"); + // Configure the actions column via the underlying Grid.Column easyGrid.getActionsColumn() .setHeader("Actions")