outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
271 stars 98 forks source link

Nova tabs compatibility #120

Open stepanenko3 opened 2 years ago

stepanenko3 commented 2 years ago

Tabs are not displayed on the settings page Tabs package eminiarts/nova-tabs

Tarpsvo commented 2 years ago

Hi! Nova tabs reworked their package quite a bit since v1 and it's no longer possible to easily support the Tabs package. It requires a lot of custom integration code, as they mutate the Panel a lot on the server side. If you want Tabs support, you can try to implement it and submit a PR. :) Thanks.

mucenica-bogdan commented 2 years ago

I had a first pass at it and it requires a fair amount of rework. I'll give it another go during the weekend, hopefully I can get it to work.

@stepanenko3 - in the mean time in my projects i've changed back to native Panels instead of tabs.

rgdigital commented 2 years ago

@Tarpsvo - Just to check, is the tabbed UI in the screenshot for legacy versions only or is there native support for tabs now? https://raw.githubusercontent.com/outl1ne/nova-settings/main/docs/index.png

Tarpsvo commented 2 years ago

Sorry about that - that is indeed an old screenshot from Nova V3.

Violet-Vibes commented 1 year ago

I had a first pass at it and it requires a fair amount of rework. I'll give it another go during the weekend, hopefully I can get it to work.

@stepanenko3 - in the mean time in my projects i've changed back to native Panels instead of tabs.

Any update on this? Would love to have tab support for this <3

stepanenko3 commented 1 year ago

@Violet-Vibes,

I didn't get NovaTabs support and made my package nova-settings

Violet-Vibes commented 1 year ago

@Violet-Vibes,

I didn't get NovaTabs support and made my package nova-settings

@stepanenko3 Oh, interesting! Is there an easy way to migrate usage of nova_get_setting and the other helper functions to your package?

stepanenko3 commented 1 year ago

@Violet-Vibes, I didn't get NovaTabs support and made my package nova-settings

@stepanenko3 Oh, interesting! Is there an easy way to migrate usage of nova_get_setting and the other helper functions to your package?

Of course

function settings(string|null $section, string|null $key = null, string|null $default = null, string|null $env = null)

Get cart_link value from General settings in current Env

settings('general', 'cart_link')

Get all General settings

settings('general')

Get cart_link value from General settings in specific Env with default value

settings(
    section: 'general',
    key: 'cart_link',
    default: true,
    env: 'production'
);

// OR

settings('general', 'cart_link', true, 'production');
Violet-Vibes commented 1 year ago

I'll have a look at it, thanks @stepanenko3