Git Product home page Git Product logo

nova-tabs's People

Contributors

dkulyk 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

Watchers

 avatar  avatar  avatar

nova-tabs's Issues

The Create resource button stick on top of the Tabs bar.

The Create button of any resource I use with the tabs, stick on top of the bar.
I inspect the button and confirm that this class "mb-6" it's the issue.

I don't know if this class it's used on purpose, or If I can change this to remove it.

Here it's a view of the problem:
sample

And this is how I'm using the nova-tabs:

...
            (new Tabs(__('Structure Relations'), [
                HasOne::make('Segmentation', 'segmentation', 'App\Nova\CondominiumSegmentation'),
                HasMany::make('Building Types')
                    ->hideFromDetail(function(){
                        if($this->segmentation()->count())
                            return false;
                        else
                            return true;
                    }),
                HasMany::make(__('Building ↔︎ Segment Relation'), 'building_segments_relation', 'App\Nova\BuildingSegmentation')
                    ->hideFromDetail(function(){
                        if($this->segmentation()->count() && $this->building_types()->count())
                            return false;
                        else
                            return true;
                    }),
            ])),
...

Ajax 404 when deleting a file inside of a tab on edit screens

We get a 404 error when trying to delete a file from a file field.

It only happens when we are using the tabs also on the edit screen with use TabsOnEdit;, else everything works fine.

It seems that there is an error in the nova/src/Http/Controllers/FieldDestroyController.php.

To reproduce:

  • add a new model like "FileTest" with just one column for a file name
  • add the nova model with Tabs and the file-field inside the tab
  • add the use TabsOnEdit; to the nova model

Now try to upload and delete the file again from the field in nova. There should be a 404 error in the network tab of the browser debug window.

Does anybody else have the same problem?

Tabs are not rendering, all tabs files are shown in same panel

Hello.

I don't know what i'm doing wrong, but here my tabs not render. See:

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        RadioButton::make('Tipo', 'tipo')
            ->options(\App\Models\Cliente::getTipos())
            ->default('Pessoa Jurídica') // optional
            ->stack()
            ->toggle([  // optional
                'Pessoa Física' => [ 'cnpj', ],
                'Pessoa Jurídica' => [ 'cpf', 'rg', 'rg_complemento' ],
            ]),

        Text::make('Inscrição Estadual', 'ie'),

        new Tabs('Tabs', [
            'Balance' => [
                Text::make('Name')
                    ->sortable()
                    ->rules('required', 'max:255'),
                Text::make('Email')
                    ->sortable()
                    ->rules('required', 'email', 'max:255')
                    ->creationRules('unique:users,email')
                    ->updateRules('unique:users,email,{{resourceId}}')
            ],
            'Address Info' => [
                Text::make('Address')
                    ->sortable()
                    ->rules('required', 'max:255'),
            ],
            'Other Info' => [
                Text::make('Other')
                    ->sortable()
                    ->rules('required', 'max:255'),
            ],
        ]),
    ];
}

image

Of course, i'm using use DKulyk\Nova\Tabs;

In composer.json the package is listed as "dkulyk/nova-tabs": "^1.1",

What i'm doing wrong ?

Environment:

PHP: 7.3
Laravel: 6.3
Nova: 2.5

2 Tabs with same Model break the layout

Hi,

I'm trying to add two Tabs with 2 different ressources that share the same model, in that case the layout is broken... Any idea ? may be i'm doing it wrong ? I would like to filter my model by type and add the filtered results in different tabs.

(new Tabs('Relations', [
                    HasMany::make('Drink Products', 'drink_products', \App\Nova\Product1::class),
                    HasMany::make('Food Products', 'food_products', \App\Nova\Product2::class),
                ]))->defaultSearch(true),

here is the result :

cleanshot 2019-02-17 at 23 54 45 2x

Enhancement: Tabs in Edit view

@dkulyk thanks for the great robust package, are you planning to add support for edit view? if so it will be also great if validation in edit view swich to the tab containing invalid fields ;)

showToolbar() doen't work

Hello

Cool what you did with my package. I am considering simplifying some stuff too.

When I do:

(new Tabs('Tabs', [
    // ...
]))->showToolbar(),

It doesn't work. There is no showToolbar-function in Tabs.php yet.

Regards

Keep selected tab when refresh

Hello,

It's possible to keep selected tab when the page is refresh ?

Example : I use "nova-field-sortable" and i lost the tab after each sort.

Thanks for your work :D

Tabs (Panel) Title without Ressource Buttons

I saw that the only way to display the Panel title on the created Tabs is to add ->withToolbar() parameter.

cleanshot 2019-02-11 at 12 48 41 2x

If i remove ->withToolbar(), the title is gone :

cleanshot 2019-02-11 at 12 55 37 2x

For a panel, adding ->withToolbar() only adds the Ressource Buttons.
If i remove ->withToolbar() from a Panel, the title remains, that's the behavior I'm looking for.

Any idea about that ?

Thanks again for your help

Panel within Tab

Hello @dkulyk . I'm trying to create a panel within a tab, I've read your documentation, but I can't find a way to do this. Do you know of a way?

Cheers

A thank you and a suggestion

Love your package. It's clean, and fast. Thank you!

Do you think you could make the tabs work on edit screens as well ?

Scrolling up when switching tabs

Imagine looking at a detail page that has some information above the tabs section (think metrics, general details panel etc), when switching the current tab closes and gets replaced by a new one.

Because the current tab gets closed before the new one is loaded, the window size gets smaller and the view basically jumps up to show the buttons of the tabs at the bottom of the screen. This causes the user having to scroll back down after switching between each tab.

BelongsToMany Relation is not loading

I have a belongsToMany relation with pivots. It takes too much time to show the contents in index page, sometimes it freezes on loading state.
There is no error and requests are ok and the results are ok too. It seems the Vue Component fails to show the resources.

Screen Shot 2019-05-15 at 11 51 00 AM

Tabs Labels

Hi,

First, thanks for this usefull package!

This is not working :

new Tabs('Tabs', [
                HasMany::make('Address List', 'TierAddress'),
            ]),

I tried this too, without luck :

new Tabs('Tabs', [
                new Panel('Adress List 1', [
                    HasMany::make('TierAddress'),
                ]),
                'Adress List 2' => [
                    HasMany::make('TierAddress'),
                ],
            ]),

I'm looking to rename the create TierAddress Button & TierAddress Tabs Label.
Any way to use the singularLabel and/or label of the ressource ?

Search field overlaps tabs

Hi!

Nova v3.30.0
dkulyk/nova-tabs (1.1.9)

Without search:
image

With search:
image

Search field overlaps last tab

Panels within tabs

I might guess it's impossible to have a standard Panels within Tabs, right?
Any ideas how can I achieve something similar? I need to somehow separate a long list of fields. Tabs will be too much, just visual separation needed.

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.