rmsramos / activitylog

Spatie Laravel activity logs inside of Filament.
MIT License
147 stars 30 forks source link

Support for Filament\Actions\Action along with Filament\Tables\Actions\Action #40

Closed manojhl closed 1 month ago

manojhl commented 3 months ago

Package Version

v1.0.4

Laravel Version

v11

PHP Version

PHP 8.2

Problem description

Currently, the plugin only supports action for table using Filament\Tables\Actions\Action.

I wanted to add the similar action in View page or Edit page or in general any page which is only possible with support for Filament\Actions\Action

Expected behavior

An action class which can be added anywhere built extending Filament\Actions\Action

Steps to reproduce

After setting up this package try to add the action class \Rmsramos\Activitylog\Actions\ActivityLogTimelineSimpleAction::make('Activities') (i know this is supported only for table but this is for failure case)

Reproduction repository (issue will be closed if this is not valid)

https://github.com/filamentphp/demo

Relevant log output

I'm happy to do a PR with your blessing
gregupton commented 2 months ago

It looks like there's another action in the src:

<?php

namespace Rmsramos\Activitylog\Actions;

use Filament\Tables\Actions\Action;
use Rmsramos\Activitylog\Actions\Concerns\ActionContent;

class ActivityLogTimelineSimpleAction extends Action
{
    use ActionContent;
}

But maybe it should use

use Filament\Actions\Action;

Instead of:

use Filament\Tables\Actions\Action;

Personally, I would like to be able to view the records where the user is the causer in a timeline on the viewUser page.

GeoSot commented 1 month ago

@rmsramos after https://github.com/rmsramos/activitylog/pull/42, I think it can be cxlosed.

But for sure, we need a release . Thanks in advance

billmn commented 1 month ago

@rmsramos Do you have plans for a new release?

rmsramos commented 1 month ago

Hi guys, next week at the latest I will update everything and release it