manogi / nova-tiptap

Laravel Nova Tiptap Field
MIT License
172 stars 57 forks source link

No Detail Field anymore in 2.0 #50

Closed mstaack closed 2 years ago

mstaack commented 2 years ago

Is there any reason to have an empty detail field in 2.0?

With 1.0 all worked fine on my side :)

https://github.com/manogi/nova-tiptap/blob/v2.7.0/resources/js/components/DetailField.vue

isn't adding v1 vue component enough?

jolora commented 2 years ago

Yes to me this seems like it must be a bug... I was surprised to find my TipTap fields missing on the detail view.

Edit: @manogi first of all, thanks for sharing your work! Was it intentional to remove the detail view? If so, why? For my implementation it's essential.

Edit2:: As a workaround I've just added duplicate Text fields like this:

Tiptap::make('Description'),
Text::make('Description')->asHTML()->onlyOnDetail(),

Suits me fine.

manogi commented 2 years ago

Hi there - the detail field now behaves the same as the Trix detail field: it shows a "Show content" button to expand the content. Also like the Trix fied using the ->alwaysShow() method in the resource makes the content always visible in the detail view.

manogi commented 2 years ago

P.S. added in v2.7.1

jolora commented 2 years ago

Brilliant, thanks @manogi . I was on v2.7.0 ... v2.7.1 works a treat!

mstaack commented 2 years ago

brilliant stuff, thank you!