EasyCorp / EasyCorp/EasyAdminBundle

Action button issues and improvements

Open
#7,684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
4.3k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
11

Description

Hello,

I can see many small issues or potential improvements related to action buttons.

Here are some of them:

  • askConfirmation() is not working in combination with renderAsButton() (used to submit form).

  • Some styles are not really rendering well. Eg: asInfoAction() in dark mode or asTextLink() in light mode

  • In dark mode, the hover effect of secondary buttons (default when no asXxxAction() style is specified) looks strange. The button briefly flashes white before returning to its normal color.

Batch actions
  • askConfirmation() does not work inside BatchAction.
    Instead, we are supposed to use askConfirmationOnBatchActions(), but this method is only available at Crud configuration level, so there is no way to configure a different message par button inside batch actions.
    => Why not just supporting the existing askConfirmation() in batch actions?

  • In batch actions, button priority is handled differently from normal views.
    For example, a button using asPrimaryAction() is rendered on the left in the batch action menu, while in the normal view it is rendered on the right.

  • For batch actions, add a way to conditionally enable or disable the action button based on the selected items, using displayIf() or a dedicated method.
    For example: an "Archive" batch action should only be enabled if all selected items are in the "completed" status.
    This could be implemented by evaluating the condition for each row and adding a data attribute indicating whether the batch action is allowed for that item, for example data-ea-batch-action-archive="true".

  • Unable to use ActionGroup inside batch actions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the action confirmation and batch action documentation linked in the issue, then inspect the existing action and ActionGroup entry points for normal and batch views. The work is done when the listed confirmation, styling, priority, conditional-enabling, and ActionGroup cases are resolved and their behavior is covered consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.