nova-settings icon indicating copy to clipboard operation
nova-settings copied to clipboard

Nova tabs compatibility

Open stepanenko3 opened this issue 2 years ago • 9 comments

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

stepanenko3 avatar May 01 '22 18:05 stepanenko3

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.

Tarpsvo avatar May 13 '22 14:05 Tarpsvo

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.

mucenica-bogdan avatar May 13 '22 15:05 mucenica-bogdan

@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

rgdigital avatar Jun 26 '22 13:06 rgdigital

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

Tarpsvo avatar Jul 01 '22 08:07 Tarpsvo

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

Violet-Vibes avatar Sep 28 '22 07:09 Violet-Vibes

@Violet-Vibes,

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

stepanenko3 avatar Sep 28 '22 08:09 stepanenko3

@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?

Violet-Vibes avatar Sep 28 '22 11:09 Violet-Vibes

@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');

stepanenko3 avatar Sep 28 '22 13:09 stepanenko3

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

Violet-Vibes avatar Sep 28 '22 14:09 Violet-Vibes