On narrow devices, a background color (--color-gray-050-o-40) is added to the tab container. At full width, it is white.

Vertical tabs

The issue is much more noticeable when the details element gets focus.
See https://www.drupal.org/project/drupal/issues/3081500#comment-14828986

Testing steps:
1. Goto configure block page
2. On md screen size scroll down to the visibility tabs.
3. Click on any tab such as "Content type"
4. There is a grey background on part of the container. This should be white as on larger screens.

Proposed solution:
Remove the grey background on smaller screens.

Comments

Chi created an issue. See original summary.

pameeela’s picture

Title: Clara: Wrong background for active vertical tab » Claro: Wrong background for active vertical tab
Issue tags: +CSS novice
vinitk’s picture

background color above 85em, we have transparent background

  @media screen and (min-width: 85em){
.js .claro-details__wrapper--vertical-tabs-item {
  margin: 0;
  border-top: 0;
 background-color: transparent;

Just a query/understanding on design aspect,
What is the need or use of background color on narrow device, cant we keep same in all screen?

rishu_kumar’s picture

StatusFileSize
new1.06 KB
new44.47 KB
new50.35 KB

I've create a patch for that.

some steps follow to apply patch:-
1.Download patch and apply to core.
2.There is some default file in /sites/default/files/css/ you have to delete those files because those default css files are not allowing to update
new files.
3.After that you review the issue.

I attached some screenshot also.

Thanks

rishu_kumar’s picture

Status: Active » Needs review
ameymudras’s picture

Status: Needs review » Needs work
StatusFileSize
new201.78 KB

Tested patch #4 on 10.1.x. Was able to reproduce the issue on small screen size. After apply the patch issue fixes for the narrow screen size however the issue now starts appearing for desktop size. Please see the screenshot attached.

ameymudras’s picture

Issue summary: View changes
Issue tags: +Bug Smash Initiative
rishu_kumar’s picture

StatusFileSize
new62.25 KB

Hi @ameymudras , I tried to reproduce issue as per your screenshot, But I can not able to reproduce the same. Can you please provide your testing steps, so I can resolve this as well.
See attached screenshot

ameymudras’s picture

@rishu_kumar, I tested it again on chrome and safari and I am able to see the different background colours on all the tabs except "pages". On Claro theme you can configure any block and check "Roles" tab in the visibility section.

I used Drupal pod to generate an environment using the patch you've provided.

rishu_kumar’s picture

StatusFileSize
new1.97 KB

This is my updated patch and follow same instructions like #4 comment.

Thanks

rishu_kumar’s picture

Status: Needs work » Needs review
atul_ghate’s picture

Assigned: Unassigned » atul_ghate

I will review this patch.

atul_ghate’s picture

Assigned: atul_ghate » Unassigned
StatusFileSize
new51.9 KB
new56.37 KB
new40.69 KB

I applied patch #10, it applied cleanly, and the issue was resolved (see attached images). It can be moved to RTBC.

varun verma’s picture

Assigned: Unassigned » varun verma

I will double check the patch.

raveen_thakur51’s picture

StatusFileSize
new182.76 KB
new184.81 KB

I have tested patch comment #10. And it worked fine for me. Please see attached.

raveen_thakur51’s picture

varun verma’s picture

Assigned: varun verma » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new589.74 KB
new557.92 KB
new813.47 KB

I have applied #10 patch, its working properly attached screenshots.

pameeela’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work

The background should be white like on larger screens.

One set of screenshots is all that is needed for each patch. Here, there are three sets, which makes it confusing and harder to review. Please, do not add new screenshots after they have already been added!

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new1.13 KB
new2.61 KB

Remove the bg-color as advised in #18. Attached interdiff with #10. Attached patch for same. Please review

Status: Needs review » Needs work

The last submitted patch, 19: 3327848-19.patch, failed testing. View results

gauravvvv’s picture

Status: Needs work » Needs review
deepalij’s picture

StatusFileSize
new108.36 KB
new101.19 KB

Able to reproduce the issue using steps in IS
Applied patch #19 on Drupal 10.1.x-dev
The patch applied cleanly.
The background gets removed from the active verticle tab on smaller screens
Refer to the attached screenshots

RTBC +1

alison’s picture

Status: Needs review » Reviewed & tested by the community

I confirm @DeepaliJ's findings!

RTBC ✅

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new208.08 KB

The solution appears to deviate from the original Claro designs. Perhaps someone involved with the design such as @ckrina or @saschaeggi should approve or potentially recommend a solution that preserves the design.

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new1.55 KB

The root cause seems to be that we're using incorrect media query in Claro for this rule. This implements a fix according to the designs; keeps the light blue background on mobile and overrides that with a white background on desktop.

This fix isn't entirely correct because Drupal.behaviors.verticalTabs allows configuring the breakpoint through drupalSettings. Since the variable would be needed in media query, we would have to use custom media query for this. That is not supported by any browsers so there probably isn't any value in implementing that right now.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new1.58 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

_utsavsharma’s picture

StatusFileSize
new1.14 KB
new4.05 KB

Tried to fix CCF for #25.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new1.14 KB
new1.56 KB

Patch #27, contains few irrelevant files.

core/modules/block/src/BlockMachineNameGenerator.php
core/modules/block/src/BlockMachineNameGeneratorInterface.php

I have fixed one comment in #25. Please review

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

Confirmed this issue on Drupal 10.1 and that the patch #28 solves it.

lauriii’s picture

StatusFileSize
new1.57 KB
new1.02 KB

Looks like my patch in #25 introduced an off-by-one error 😅 Because this one is a min-width and the other usage is a max-width, we need to increase the breakpoint by one px.

  • bnjmnm committed 63f4d1f3 on 10.1.x
    Issue #3327848 by rishu_kumar, Gauravvvv, lauriii, _utsavsharma,...

  • bnjmnm committed 02cfa3c7 on 10.0.x
    Issue #3327848 by rishu_kumar, Gauravvvv, lauriii, _utsavsharma,...
bnjmnm’s picture

Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed

This is committed to 10.1.x and cherry-picked to 10.0.x. Lauri points out that Drupal.behaviors.verticalTabs allows the breakpoint to be configurable, but I'd still consider this an unqualified fix as the media query now matches default breakpoint value. Having it match the configured value (of which there is no evidence of it being used) is something that deserves its own scope.

Issue credit was not granted to the many, many screenshots provided after a perfectly good set was already there. +1s without additional issue-advancing content also did not receive credit

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.