Problem/Motivation
While creating custom basic block through the layout builder using the Claro theme, form descriptions do not have proper contrast which makes them unreadable.
Regarding question in comment #6:
Can you elaborate why someone would be using Claro for their front-end theme?
One scenario is when the site is decoupled and you want the content editor to just see the same theme for the CMS "frontend" and "backend" because Drupal is not being used for the user-facing "frontend".
Steps to reproduce
- Choose Claro as the default site theme
- Home > Administration > Structure > Content types > Article > Manage display: under layout options, check layout builder
- Go to an article node and click Layout tab
- Click on Add block and create a Custom block > Basic block
- Results: Title input field description is not readable
- Expected results: Title input field description is readable
Proposed resolution
Update the CSS to ensure the styling of the description is readable.
Remaining tasks
- Create patch
- Review and test patch
- Decide if this use case is valid for core
- If so, commit
User interface changes
Can properly read the description text.
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#21 | after_patch.PNG | 55.99 KB | Devashish Jangid |
#17 | Screenshot 2022-02-14 at 3.06.15 PM.png | 415.38 KB | Satyajit1990 |
#16 | 3213556-16.patch | 889 bytes | ranjith_kumar_k_u |
#13 | 3213556--After--patch--pic.png | 22.14 KB | vikashsoni |
#13 | 3213556--Before--patch--pic.png | 21.24 KB | vikashsoni |
Comments
Comment #2
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#2 Please review the patch
Comment #3
manojithape CreditAttribution: manojithape at QED42 for Drupal India Association commentedComment #4
manojithape CreditAttribution: manojithape at QED42 for Drupal India Association commentedVerified and tested patch#2 on the drupal 9.3.x-dev version and Claro 9.3.0-dev version. Patch applied successfully and looks good to me.
Testing Steps:
Testing Results:
After applying the patch title Input field description is visible.
Please refer attached Before patch and After patch images for reference.
Moving this ticket to RTBC.
Comment #5
manojithape CreditAttribution: manojithape at QED42 for Drupal India Association commentedComment #6
larowlanClaro is an admin theme. Layout builder uses the site's front-end theme.
Can you elaborate why someone would be using Claro for their front-end theme?
Comment #7
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commentedComment #8
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#8 Please review the patch
Comment #9
kleiton_rodrigues CreditAttribution: kleiton_rodrigues at CI&T commentedComment #10
kleiton_rodrigues CreditAttribution: kleiton_rodrigues at CI&T commentedThe patch #8 applies cleanly in drupal version 9.3.x-dev, the
&
concatenates the parent class is good in#drupal-off-canvas
...Works as expected good for me
Comment #11
chetanbharambe CreditAttribution: chetanbharambe at QED42 for Drupal India Association commentedVerified and tested patch #8.
Patch applied successfully and looks good to me.
Testing Steps:
# Go to Appearance -> Set Claro theme
# Goto Extend: Install Layout builder module
# Goto: Home>Administration>Structure>Content types>Article, under layout options check layout builder.
# Go to the article node, click on layout.
# Click on Add block, create a custom block
# Observe title Input field description is not visible
Expected Results:
# Title Input field description is visible
Actual Results:
# Title Input field description is not visible
Please refer attached screenshots.
Looks good to me.
Need +1 RTBC.
Comment #12
kostyashupenkoComment #13
vikashsoni CreditAttribution: vikashsoni as a volunteer and at Zyxware Technologies commentedApplied patch #8 working fine
After patch the title field is visible
for ref sharing screenshot ....
Thanks or the patch
Comment #15
bnjmnmComment #16
ranjith_kumar_k_u CreditAttribution: ranjith_kumar_k_u at Zyxware Technologies commentedComment #17
Satyajit1990 CreditAttribution: Satyajit1990 for Salsa Digital commentedTesting Steps :
1. Go to Appearance -> Set Claro theme as admin and default theme
2. Home>Administration>Structure>Content types>Article, under layout options check layout builder.
3. Go to the article node, click on layout.
4. Create Basic Page (Content >> Add Content >> Select Basic page)
5. Fill the mandatory field Tile, Body
6. Change the draft to published and save
7. Now click on Layout tab on the created page
8. Click on Add block on configure section 1 >> Choose a block section will appear on the right side
9. Now Click on create custom block and select Basic Block and verify the Title Input field description is visible or not
Expected Results: Title Input field description is visible
Actual Results: Title Input field description is not visible
Please refer the screenshot below attached in the file
Screenshot 2022-02-14 at 3.06.15 PM.png (415.38 KB)
Comment #18
Kristen PolThanks for testing. Moving back to needs work based on #17.
Comment #19
Kristen PolWhoops. For real this time.
Comment #20
Kristen PolThere was likely something wrong with DrupalPod when testing in #17 so moving back to needs review for #16.
Comment #21
Devashish Jangid CreditAttribution: Devashish Jangid at Dotsquares Ltd. commentedVerified and tested patch #16.
Patch applied successfully and looks good to me.
Sharing screenshot for the reference.
Moving this ticket to RTBC.
Comment #22
Kristen PolThanks for testing.
I'm just now seeing #6 asking:
so tagging for issue summary update to explain the use case.
I thought that we could configure Drupal to use the frontend or backend theme for content editing... was that just an older version? I'll see if I can find the configuration option... unless it's just for older versions.
Comment #23
Kristen PolThis is the setting that let's you toggle content editing between the two themes:
Comment #24
Kristen PolOkay, I misunderstood. I was assuming that that checkbox was used for anything for editing the content but see what @larowlan was saying.
The "Use administration theme when editing or creating content" does not affect the layout builder. It's always using the frontend theme. You would have to use Claro as the frontend theme to see this issue. Since Claro is meant to be used for the admin theme and not the frontend theme, @larowlan's question remains:
I have one scenario which is when the site is decoupled and you want the content editor to just see the same theme for the CMS "frontend" and "backend" because Drupal is not being used for the user-facing "frontend".
Comment #25
Kristen PolMarking RTBC to be assessed for commit. I have updated the issue summary with a possible use case along with clarifying the steps to reproduce and filling in the issue summary template.
1. Assumes using Claro for "frontend" theme is valid (see issue summary update).
2. Tests pass.
3. Manual testing passes.
4. Assumes adding additional tests can't be added easily.
5. Code is simple CSS change though I'm not 100% this is the approach that the Claro team would endorse.
Comment #26
alexpott@kleiton_rodrigues please don't post screenshots of code applying to issues.
Thanks everyone who posted screenshots of the patch working and the bug.
Given that Claro already has work arounds for
drupal-off-canvas
I think it's fine to continue. I would question the use of layout builder on a decoupled site - it's going to be a lot of "fun" to re-building an understanding of layout builder in your frontend!Committed and pushed 035cd7de47 to 10.0.x and e76eaf19eb to 9.4.x and 088986959a to 9.3.x. Thanks!
Backported to 9.3.x since claro is not yet stable.
Comment #30
Kristen PolThanks! I forgot to tag that this was part of bugsmash!
UPDATE:
Just read...
Haha, good point :D