GithubHelp home page GithubHelp logo

aymanalhattami / filament-context-menu Goto Github PK

View Code? Open in Web Editor NEW
79.0 2.0 8.0 6.3 MB

This package is used to add a context menu (right click menu) for resource pages, custom pages and table cells of Filament Admin Panel.

Home Page: https://github.com/aymanalhattami/filament-context-menu

License: MIT License

JavaScript 4.47% PHP 74.03% CSS 0.45% Blade 21.05%
filament javascript laravel

filament-context-menu's People

Contributors

aymanalhattami avatar dependabot[bot] avatar fsamapoor avatar github-actions[bot] avatar joshuasigaban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

filament-context-menu's Issues

[Suggestion]: Maybe we can add this to the outer frame of filament also, not just to the inner page

What happened?

When we click on the Navbar, the top two sides of the tables (after the max width), we see the regular right-click browser menu; it would be nice to have the option to add this context menu to the full filament frame.

I do understand that we will then probably have a static context menu - just one for the full filament panel, but in my case this is totally fine.
Screenshot 2024-05-28 213427

How to reproduce the bug

Just click on sidebar, topbar or empty width

Package Version

v1.0.2

PHP Version

8.3

Laravel Version

10

Which operating systems does with happen with?

Windows

Notes

No response

[Bug]: Weirdly Package Overrides Create Action

What happened?

When I just add your Trait, my previously-working Create button turns into a modal action without... action?

How to reproduce the bug

See video:
https://www.loom.com/share/2b63fd0f88e4468db5d468ed51efc973?sid=2f25bdf0-48a4-49b6-8605-aed5ad5b8d0c

Maybe it's my local code and I have extra things coded somewhere, but please try to reproduce on your end.

Package Version

Latest

PHP Version

8.2

Laravel Version

11.0

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: Context menu not showing until refresh the page and it's not desapear after changing page

What happened?

  1. the contextMenu appear correctly when refresh the page. but if i come to the page without refreshing it, the contextMenu not showing.
  2. when i click link on the contextMenu to change page, in the targeted page, i have to refresh before seing the conextMenu. and the contextMenu do not disapear when go back to the previous page even if i click on Esc key or refresh the page.

How to reproduce the bug

  1. add the PageHasContextMenu to the page
  2. add the getContextMenuActions function and set the contextMenu actions
  3. test on the targeted pages.

Package Version

1.0.0

PHP Version

8.2.17

Laravel Version

10.x

Which operating systems does with happen with?

Linux

Notes

No response

[Bug]: Modal actions does not work in table cell

What happened?

Modal actions does not work in table cell

How to reproduce the bug

Modal actions does not work in table cell

Package Version

latest

PHP Version

8.2.0

Laravel Version

11.0

Which operating systems does with happen with?

No response

Notes

No response

[Help]: How to use replicate inside List page

What happened?

How to use replicate inside List page when i use below code the page just keeps loading

public static function getContextMenuActions(): array
    {
        return [
            Action::make('Create New Price')
            ->url(CreateSmsPrices::getUrl()),
            ContextMenuDivider::make(),
            \Filament\Actions\ReplicateAction::make()
           ->record(fn (Resouce $record) => $record->id), // keeps loading nothing happens
        
        ];

    }

How to reproduce the bug

When I do as below i get this error

Error
Using $this when not in object context

public static function getContextMenuActions(): array
{
return [
Action::make('Create New Price')
->url(CreateSmsPrices::getUrl()),
ContextMenuDivider::make(),
\Filament\Actions\ReplicateAction::make()
->record($this->record),

    ];

}

Package Version

1.0.2

PHP Version

8.2.19

Laravel Version

11.10.0

Which operating systems does with happen with?

macOS

Notes

Please not that i couldn't open as a question category i get 404 page

Full code

<?php

namespace App\Filament\Resources\SmsPricesResource\Pages;

use App\Filament\Resources\SmsPricesResource;
use App\Models\SmsPrices;
use Filament\Actions;
use Filament\Actions\Action;
use Filament\Resources\Pages\ListRecords;
use Filament\Actions\ReplicateAction;
use AymanAlhattami\FilamentContextMenu\Traits\PageHasContextMenu;
use AymanAlhattami\FilamentContextMenu\ContextMenuDivider;
use AymanAlhattami\FilamentContextMenu\Actions\RefreshAction;



class ListSmsPrices extends ListRecords
{
    use ListRecords\Concerns\Translatable;

    use PageHasContextMenu;

    protected static string $resource = SmsPricesResource::class;


    public static function getContextMenuActions(): array
    {


        return [
            Action::make('Create New Price')
            ->url(CreateSmsPrices::getUrl()),
            ContextMenuDivider::make(),
            \Filament\Actions\ReplicateAction::make()
           ->record(fn (Resouce $record) => $record->id),
        ];

    }


    protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make(),
            Actions\LocaleSwitcher::make(),
        ];
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.