- Issue created by @tivi22
- First commit to issue fork.
- last update
over 1 year ago 55 pass - @sakthi_dev opened merge request.
- Status changed to Needs review
over 1 year ago 2:27pm 15 June 2023 - Status changed to Needs work
over 1 year ago 10:45am 21 June 2023 - ๐ฆ๐นAustria hudri Austria
I think there is a conceptional problem here: These config settings are for admin widgets.
hook_entity_view_alter() also affects frontend displays, the MR adds markup to all layout paragraphs, not just in widgets.
- ๐ฌ๐งUnited Kingdom Vitor Faria
Vitor Faria โ made their first commit to this issueโs fork.
- Merge request !132Issue #3366968: Paragraph & Layout labels are not showing โ (Open) created by Vitor Faria
- Open on Drupal.org โCore: 10.1.x + Environment: PHP 8.1 & MariaDB 10.3.22last update
over 1 year ago Not currently mergeable. - last update
over 1 year ago 55 pass - ๐ฌ๐งUnited Kingdom Vitor Faria
I have picked up the code from @sakthi_dev and changed it so that it only is executed if in an admin route (As @hudri suggested in his comment).
Please review.
- Status changed to Needs review
over 1 year ago 9:13pm 26 June 2023 - Status changed to RTBC
over 1 year ago 10:32am 4 July 2023 - ๐บ๐ธUnited States DamienMcKenna NH, USA
This resolves the problem for me.
FWIW I didn't know these options existed, so thank you!
- ๐ต๐ฑPoland tivi22
Thank you for the patch. Is it possible to make this label permanent/always visible (maybe in the top right corner, I think this feature worked in 1.x version)? In my case, the label displays only once and when I save a paragraph, it disappears (even when I don't fill any field).
- ๐ต๐ฑPoland tivi22
Yep, I've just installed Layout Paragraphs module in ver. 1.0.0 and it works very well. Please, take a look at scr. Is it possible to restore this feature?
- ๐ต๐ฑPoland tivi22
FYI I did a temporary solution and it works great in my case. All I did was providing custom CSS styles:
/* Layouts */ .js-lpb-component-list .lpb-layout:not(:first-child) { margin-top: 50px; } .lpb-layout > .field + .layout { margin-top: 20px; } /* Components */ .js-lpb-component { margin-bottom: 10px; border: 1px dashed #999; } .js-lpb-component:not(.lpb-layout) > .field { padding: 5px 15px; } .js-lpb-component:not(.lpb-layout) > .lpb-controls + .field { border-top: 1px dashed #999; } .lp-builder:not(.is-navigating) .js-lpb-component:hover .js-lpb-region:hover, .lp-builder:not(.is-navigating) .js-lpb-component:focus-within .js-lpb-region:focus-within, .js-lpb-component:hover .js-lpb-region, .js-lpb-component:focus-within .js-lpb-region { outline-width: 0; } /* Controls */ .lpb-controls { opacity: 1; z-index: 50; } .lpb-controls:hover, .lpb-controls:focus-within { z-index: 60; } .lpb-controls:not(.is-layout) { position: relative; box-shadow: none; background-color: #ededed; }
- ๐ฌ๐งUnited Kingdom Vitor Faria
@tivi22 I think that this should be seen as a separate issue as what you are describing is not what the issue description states.
It is just my opinion but you should create a new ticket for that and propose there your solution.
Also it might be a good idea to try and understand why the type labels are not showing instead of adding some CSS on top of it. Not saying that it might not be the solution but there might already be code that does what you want but is not because of some unknown bug. - Status changed to Needs work
about 1 year ago 3:56pm 9 December 2023 - ๐บ๐ธUnited States justin2pin
Thanks for this. I think I'd rather see the paragraph labels added in the
LayoutParagraphsBuilder::buildComponent
method, which only runs when constructing the Layout Paragraphs builder interface, than in a hook that will run for every entity every time it is rendered. Flagging as needs work. - last update
about 1 year ago 55 pass - ๐ฎ๐ณIndia sakthi_dev
Updated by addressing comment in #15. Please review.
- ๐บ๐ธUnited States nmillin
I noticed the code was only for show_paragraph_labels and not show_layout_labels. I've enhanced the code sakthi_dev did (will try to push to MR) that shows the layout when the setting is checked. Part of this is adding an additional check to existing code to make sure the paragraph is not a layout.
Let me know if anyone has any questions and great to find this issue!
-Nate
- last update
about 1 year ago 55 pass - Status changed to Needs review
about 1 year ago 3:31pm 13 December 2023 - ๐บ๐ธUnited States nmillin
Marking as Needs review since sakthi_dev addressed feedback in #15.
- Status changed to Needs work
about 1 year ago 6:34pm 13 December 2023 - ๐บ๐ธUnited States justin2pin
This is great - a few thoughts:
- This needs tests.
- Would also be helpful to have screenshots showing how this looks by default.
- I'd rather use a<div>
or<span>
tag with a class than a strong tag. - last update
about 1 year ago 55 pass - ๐บ๐ธUnited States nmillin
Sure!
Screenshots
The default (per config/install/layout_paragraphs.settings.yml) is to not show the paragraph labels and not show the layout labels. I've included screenshots of how this looks with both labels showing and with a mouse hover.Div & a class
I've pushed a commit to the MR doing this. Naming things is hard, so let me know if there should be any changes.Tests
I'll poke at this. I'm guessing a new test in BuilderTest.php would be best. Let me know if this is the wrong direction.Thanks!
- last update
about 1 year ago 28 pass, 6 fail - last update
about 1 year ago 48 pass, 2 fail - Status changed to Needs review
about 1 year ago 2:42pm 15 December 2023 - ๐บ๐ธUnited States nmillin
sigh... the config change took forever to figure out why it wasn't working in the tests. I found https://www.drupal.org/node/2951441 โ (paragraphs module) that is similar. drupal_flush_all_caches() is what is required for the config to work in the second test.
I've added screenshots from the local test results I did. Removed the Needs Tests tag to reflect that tests were added and marking as needs review.
Let me know if there should be any changes!
- last update
about 1 year ago 48 pass, 2 fail - First commit to issue fork.
- last update
6 months ago 51 pass, 2 fail - ๐ฆ๐บAustralia realityloop
Re-rolled https://git.drupalcode.org/project/layout_paragraphs/-/merge_requests/132 so it applies to current dev and passes again
34:30 31:21 Running