contributte / contributte/datagrid

Own FlashMessages

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.