You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder what's the best solution to achieve inline blocks in the Admin UI. All fields of a block inlined in the fields of a Collection Item in the Admin UI.
Use Case example: A blog post collection where the blog posts always have a details card with different values. Two solutions came to my mind, which both are not perfect:
Imagine DetailsCard is a block with an array of details, and you have the following code inside the fields of your Blogs CollectionConfig.
Solution 1:
PRO: uses the Typescript Type of DetailsCard, so no new Type is created
CON: the User has to add the block manually in the Admin UI (not inlined)
Solution 2:
PRO: the user can directly enter the values for the DetailsCard in the Admin UI (its inlined)
CON: there is a new Type DetailsCard2 (see interfaceName) generated (which could be merged with the DetailsCard Block Type because it has the same fields)
Are there better solutions or options to improve them?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wonder what's the best solution to achieve inline blocks in the Admin UI. All fields of a block inlined in the fields of a Collection Item in the Admin UI.
Use Case example: A blog post collection where the blog posts always have a details card with different values. Two solutions came to my mind, which both are not perfect:
Imagine
DetailsCard
is a block with an array of details, and you have the following code inside the fields of your BlogsCollectionConfig
.Solution 1:
Solution 2:
Both solutions have advantages and disadvantages:
Solution 1:
PRO: uses the Typescript Type of
DetailsCard
, so no new Type is createdCON: the User has to add the block manually in the Admin UI (not inlined)
Solution 2:
PRO: the user can directly enter the values for the
DetailsCard
in the Admin UI (its inlined)CON: there is a new Type
DetailsCard2
(seeinterfaceName
) generated (which could be merged with theDetailsCard
Block Type because it has the same fields)Are there better solutions or options to improve them?
Beta Was this translation helpful? Give feedback.
All reactions