Nested paragraphs title gets cut off

Created on 27 October 2021, almost 3 years ago
Updated 7 August 2024, 2 months ago

Problem/Motivation

On nested paragraphs if the paragraph type title is longer than 100px it gets cut off. This happens because the paragraphs module css add flex-basis: 100px;

Steps to reproduce

Add a nested paragraph that has a long title like 'Accordion item' and make sure you are using the experimental widget.

Proposed resolution

Override with flex-basis: auto;

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom ipwa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia darvanen Sydney, Australia

    Manual testing passes.

    I thought perhaps the lines should be removed instead of setting to 'auto' but that didn't work, so the code looks good to me too.

    I'm not 100% convinced the test suite fails are unrelated but I haven't gone digging so I'll split the difference and return it to NR.

  • 🇺🇸United States geela

    I manually reviewed this and seems to work. Steps below are taken:

    -Downloaded Drupal 9.5.10 and paragraph module (git 8.x-1-dev).
    -Downloaded the patch on #14 and applied.
    -Then complied the .scss and cleared cached
    -See 2 attached, seems to show complete title for the nested paragraph

  • 🇺🇸United States bburg Washington D.C.

    I tried the patch in #11, and I still see my paragraph type labels cut off to 100px. I think that is because of this rule:

    .js  .paragraph-top {
        grid-template-columns: 100px auto 1fr auto; 
    ...
    

    Is there any harm in using "auto auto 1fr auto" here instead?

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 7 months ago
    182 pass
  • 🇺🇸United States bburg Washington D.C.

    Here is a patch with the change I proposed in my last comment. Not including an interdiff due to the simplicity.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 7 months ago
    182 pass
  • 🇺🇸United States bburg Washington D.C.

    After applying the patch from my last comment, I saw there was an additional spot that needed an update.

  • Status changed to Needs work 2 months ago
  • 🇷🇸Serbia pivica

    @bburg we have some activity in 🐛 Paragraph with long label name gets cut off Closed: duplicate issue which is a duplicate of this issue. I've closed that one but feedback in comment #3350521-14: Paragraph with long label name gets cut off still applies here. In short we can't change that grid width for first column from px to auto because it will mess with collapse smmary rendering. Same comment has some ideas how to solve this better.

  • First commit to issue fork.
  • Status changed to Needs review 2 months ago
  • 🇮🇳India nayana_mvr

    Hi @pivica, I just attempted to fix this issue as per your suggestions in the comment #3350521-14 🐛 Paragraph with long label name gets cut off Closed: duplicate and created the MR132. Please see if this is the expected solution. Also, attaching a screen recording for reference.

  • 🇷🇸Serbia pivica

    Hi @nayana_mvr thanks for update but unfortunately I can not open mov format on my Linux. Anyway I think for this kind of problems screenshots are anyway better for reviewing stuff. I will try to test your MR in the evening and do more detail test locally but what I see right now is that previous patch in this commit (for example comment #19) was doing some additional CSS changes and not just changing from 150px to auto. What are we going to do with those additional stuff?

  • 🇮🇳India nayana_mvr

    Hi @pivica,
    Yes, there are some additional CSS changes in the patch which I think is not really required for this issue. One is related to changing flex-basis: 100px; to flex-basis: auto; for the element .paragraph-type-title. But I couldn't find any such element in the paragraphs UI. I noticed that that change was part of the patch #11 which was not working as per comment #17.
    The other change is related to .paragraphs-convert-button element which is again not available in the UI. Also, when I applied the patch in #19, that change was not getting applied. If possible, please check it from your end as well.
    Attaching few screenshots also for reviewing.

Production build 0.71.5 2024