Skip to content

Commit

Permalink
Add Skeleton for header/footer widgets on each page as todo
Browse files Browse the repository at this point in the history
  • Loading branch information
dissto committed Jun 13, 2024
1 parent 152b29e commit 2602c9b
Show file tree
Hide file tree
Showing 17 changed files with 144 additions and 10 deletions.
13 changes: 9 additions & 4 deletions src/Handlers/StubHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public function getStubs(): Collection
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Table\Filter\Add::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Table\Filter\Remove::make($resource)->get(),

// \CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Widget\RenderFooterWidgets::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Widget\RenderHeaderWidgets::make($resource)->get(),

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\ListRecords::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\ListRecordsPaginated::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Trashed::make($resource)->get(),
Expand Down Expand Up @@ -138,7 +140,8 @@ public function getStubs(): Collection

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Action\Render::make($resource)->get(),

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Widget\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Widget\RenderFooterWidgets::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Widget\RenderHeaderWidgets::make($resource)->get(),

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Form\Field\Disabled::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Form\Field\Exists::make($resource)->get(),
Expand All @@ -153,7 +156,8 @@ public function getStubs(): Collection
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Action\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Form\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\RelationManager\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Widget\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Widget\RenderFooterWidgets::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Widget\RenderHeaderWidgets::make($resource)->get(),

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Form\Field\Disabled::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Form\Field\Exists::make($resource)->get(),
Expand All @@ -169,7 +173,8 @@ public function getStubs(): Collection
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Action\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Form\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\RelationManager\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Widget\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Widget\RenderFooterWidgets::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Widget\RenderHeaderWidgets::make($resource)->get(),

\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Custom\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\Custom\Action\Render::make($resource)->get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class Render extends Base
class RenderFooterWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render widget on the create page';
return 'can render footer widgets on the create page';
}

public function getShouldGenerate(): bool
Expand Down
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/Create/Widget/RenderHeaderWidgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Create\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class RenderHeaderWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render header widgets on the create page';
}

public function getShouldGenerate(): bool
{
return true; // TODO: implement
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class Render extends Base
class RenderFooterWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render widget on the edit page';
return 'can render footer widgets on the edit page';
}

public function getShouldGenerate(): bool
Expand Down
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/Edit/Widget/RenderHeaderWidgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Edit\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class RenderHeaderWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render header widgets on the edit page';
}

public function getShouldGenerate(): bool
{
return true; // TODO: implement
}
}
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/Index/Widget/RenderFooterWidgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class RenderFooterWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render footer widgets on the index page';
}

public function getShouldGenerate(): bool
{
return true; // TODO: implement
}
}
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/Index/Widget/RenderHeaderWidgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\Index\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class RenderHeaderWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render header widgets on the index page';
}

public function getShouldGenerate(): bool
{
return true; // TODO: implement
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class Render extends Base
class RenderFooterWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render widget on the view page';
return 'can render footer widgets on the view page';
}

public function getShouldGenerate(): bool
Expand Down
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/View/Widget/RenderHeaderWidgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\View\Widget;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class RenderHeaderWidgets extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'can render header widgets on the view page';
}

public function getShouldGenerate(): bool
{
return true; // TODO: implement
}
}
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions stubs/Resource/Page/Edit/Widget/RenderHeaderWidgets.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();
3 changes: 3 additions & 0 deletions stubs/Resource/Page/Index/Widget/RenderFooterWidgets.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();
3 changes: 3 additions & 0 deletions stubs/Resource/Page/Index/Widget/RenderHeaderWidgets.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();
3 changes: 3 additions & 0 deletions stubs/Resource/Page/View/Widget/RenderFooterWidgets.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();
3 changes: 3 additions & 0 deletions stubs/Resource/Page/View/Widget/RenderHeaderWidgets.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();

0 comments on commit 2602c9b

Please sign in to comment.