Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks with preview: fields: Block name and tabs do not wrap #6634

Open
hariom147 opened this issue Aug 20, 2024 · 4 comments
Open

Blocks with preview: fields: Block name and tabs do not wrap #6634

hariom147 opened this issue Aug 20, 2024 · 4 comments
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@hariom147
Copy link
Contributor

Description

When using preview: fields for blocks with a long title and/or many tabs, the block-title and the tabs do not wrap for narrow layouts, but instead move into eachother.

Expected behavior
When space runs out, block-title and tabs should wrap, as to stay readable and clickable.

Screenshots
Screenshot 2024-08-20 at 11 46 26

To reproduce

Use this modified blueprint of the default quote-block in the starterkit.

name: Block with a longer than usual name
icon: quote
wysiwyg: true
preview: fields
tabs:
  tab1:
    fields:
      text:
        label: field.blocks.quote.text.label
        placeholder: field.blocks.quote.text.placeholder
        type: writer
        inline: true
        icon: quote
      citation:
        label: field.blocks.quote.citation.label
        placeholder: field.blocks.quote.citation.placeholder
        type: writer
        inline: true
        icon: user
  tab2:
    fields:
      info1:
        type: info
        text: Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue. Sed posuere consectetur est at lobortis.

  tab3:
    label: Tab with a really long name
    fields:
      info1:
        type: info
        text: Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue. Sed posuere consectetur est at lobortis.
@afbora
Copy link
Member

afbora commented Aug 22, 2024

I'm not sure which one is best way. My favorite is flex column option for mobile screens.

Wrap

localhost_test_kirby_develop_panel_pages_test

Flex column

localhost_test_kirby_develop_panel_pages_test (1)

@afbora afbora added the type: bug 🐛 Is a bug; fixes a bug label Aug 22, 2024
@distantnative
Copy link
Member

@afbora could the tabs collapse on narrow views, like we do for the main blueprint tabs?

@afbora
Copy link
Member

afbora commented Aug 22, 2024

@distantnative I think this is great idea. But I've checked the tabs component (Layout/Tabs.vue) and it's working with link prop. But drawer tabs working with hide/show logic (@open). Maybe it's doable but it's difficult for me 🙈

@hariom147
Copy link
Contributor Author

I also noticed, that long block-titles overflow even without tabs...
Screenshot 2024-08-22 at 18 30 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants