contributte / contributte/datagrid
Own FlashMessages
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 296
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Description
Is there a reason why a datagrid doesn't render its own flashmessage? Sometimes I render more grid on one page and flashmessage on presenter are less user-friendly.
My usecase for example:
class ItemPricesGridFactory
{
public function create(Item $item): \Ublaboo\DataGrid\DataGrid
{
$grid = new \Ublaboo\DataGrid\DataGrid();
// add cols…
$grid->addGroupAction('Synchronize')->onSelect[] = function (array $itemIds) use ($grid): void {
// some process…
$grid->flashMessage('All is OK'); // now I use $grid->getPresenter()->flashMessage()
// redirect/redraw…
};
return $grid;
}
}
I can not send PR because I do not know how to do it nicely in css and js.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the DataGrid flashMessage() and getPresenter()->flashMessage() usage shown in the issue, then inspect the existing grid rendering and frontend behavior. Define how a grid-owned message should appear when several grids share a page, including the required CSS and JavaScript behavior; done means the message renders in the intended grid context after the group action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100