Skip to content

Refine presentation of Blocks#358

Closed
PaulProjects wants to merge 2 commits into
hunvreus:developmentfrom
PaulProjects:development
Closed

Refine presentation of Blocks#358
PaulProjects wants to merge 2 commits into
hunvreus:developmentfrom
PaulProjects:development

Conversation

@PaulProjects

Copy link
Copy Markdown

Hey, I want to suggest a change to the way the block field is displayed.

Current Look:
SCR-20260319-mbtv

Suggested Look:
SCR-20260319-mbqi

Precisely, the collapsible header now displays the label on the left instead of the generic 'Item #X'. This made more sense to me, as the label is needed to identify the block (without expanding it), which is currently in the small badge on the right.

I still kept the index to help with keeping an overview over the arrangement of the elements, and displayed it on the right.

A bit more opinionated suggestion is to remove the "Remove Block" action. For me, it seems duplicate and hard to understand to either remove the content of the item or the item itself. The action to remove an item and place a new one is now (as its currently possible):
Remove Item -> Create new one -> Choose Block -> Move to designated position

Previously, it was:

Remove Block -> Choose Block

I think this limitation of actions is worth the reduced confusion I first encountered when seeing this construct.

Feel free to edit my commit and thank you for this awesome project!

@hunvreus

Copy link
Copy Markdown
Owner

Precisely, the collapsible header now displays the label on the left instead of the generic 'Item #X'. This made more sense to me, as the label is needed to identify the block (without expanding it), which is currently in the small badge on the right.

Lists are used for more than blocks. You can define what to display instead of the Item #n label:

- name: authors
  type: object
  list:
    collapsible:
      collapsed: true
      summary: "{fields.name} ({fields.role})"
  fields:
    - name: name
      type: string
    - name: role
      type: string

I should consider exposing the block type as a token though. I'll look into it tomorrow (I still have some changes I want to get in for all these token-based templates).

A bit more opinionated suggestion is to remove the "Remove Block" action. For me, it seems duplicate and hard to understand to either remove the content of the item or the item itself. The action to remove an item and place a new one is now (as its currently possible):
Remove Item -> Create new one -> Choose Block -> Move to designated position

There's a reason for that: blocks aren't only used in lists. When it's a single entry, if you don't have the ability to unselect the block, you're stuck.

We could add a special rule for Block + List, but I don't like breaking patterns.

@PaulProjects

Copy link
Copy Markdown
Author

I should consider exposing the block type as a token though. I'll look into it tomorrow (I still have some changes I want to get in for all these token-based templates).

That would be awesome! I don't quite understand how the token-based templates work, but learning that this feature already exists is awesome! I will definetely look forward to use the label as summary

There's a reason for that: blocks aren't only used in lists. When it's a single entry, if you don't have the ability to unselect the block, you're stuck.

We could add a special rule for Block + List, but I don't like breaking patterns.

Ok I understand the need. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants