Closed mgralikowski closed 2 years ago
Categories works because this field is outside the tabs module.
return [
Tabs::make('Tabs', [
Tab::make('Basic information', [
ID::make(__('ID'), 'id'),
Text::make('Title', 'title')
->sortable()
->exceptOnForms(),
new Panel('Translatable elements', $this->translatableFields()), // here we put fields using NovaTabTranslatable
new Panel('Basic information', $this->basicFields()),
new Panel('Media', $this->mediaFields()),
]),
Tab::make('SEO', SeoFields::getNovaFields()),
]),
BelongsToMany::make('Categories', null, NewsCategory::class)
->sortable()
->onlyOnDetail(),
];
@mgralikowski I made it so that they are also in the tab that you need, and not go beyond the tab https://github.com/kongulov/nova-tab-translatable/commit/c3bb55718ac927459d4b1ec60d7fd3eae09d188c
Your PR broke compatibility with: https://github.com/kongulov/nova-tab-translatable/issues/9
Please update package: https://github.com/kongulov/nova-tab-translatable/releases/tag/1.0.17
Thanks. Update is working but it breaks the another function.
Before:
After:
Crucial is that actions button disappeared.
@mgralikowski From the screenshot, I did not understand what the problem was. Can you describe in more detail?
Whole "div" just disappeared. Both screen are the same "place" - above categories.
@mgralikowski Previously, it just went beyond the tab, now it should be in the tab in which you added it
I'm talking about these things:
They disappeared. When I try the previous version they are in the center of the details page like on the screenshot, maybe is not the best place, but better than none. Of course the proper place is top of page. For me, it is critical as we in custom actions have important actions.
This is how looks normal header (when we don't use tabs or panels):
When we use tabs and panel header is moved to the middle of the page (see my first screenshot https://github.com/kongulov/nova-tab-translatable/pull/13#issue-998622691 )
And in the last release:
Of course, generally, you fixed the issue with the wrong place to fields - it works.
@mgralikowski I understood you. Due to the fact that you do not have any information, Nova herself does not display this tab.
You can solve this problem by adding ID::make()
to the beginning.
return [
ID::make(),
Tabs::make('Tabs', [
...
]),
]
It's not because of the trait. if you use only Tabs, without our package return [ Tabs::make('Tabs', [ ... ]) ]
, then you will see that the buttons you need will not come out again. This property is Nova
@mgralikowski But if you use only our package, then the buttons are shown normally.
return [
NovaTabTranslatable::make([
Text::make('Name1'),
]),
]
This is a Tabs package problem
Yea.. It works and looks ugly. Nova sucks :/
Your previous version "fixed" it by displaying separately this section.
Of course, the issue is closed, there is nothing we can do.
It is not strictly connected with this library but for people who comes here, there is the solution to use ->withToolbar() on Tabs::make(); ;)
We use this plugin with another great plugin https://github.com/eminiarts/nova-tabs.
After upgrade to 1.13 it stopped work.
Console error:
This PR fixes it but I am sure there is a better option.