Problem/Motivation

According to the Claro style guide, only the primary tabs are collapsed on mobile. The secondary tabs are all displayed. However, this could become very overloaded if there are many tabs.

Steps to reproduce

You will find the Claro style guide here or you can look at the screenshot below.

Proposed resolution

Maybe it would make sense to set an upper limit for secondary tabs, where you say that, for example, from 5 secondary tabs, they are also collapsed on mobile.

Issue fork drupal-3280361

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

romina_ferrario created an issue. See original summary.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

m.stenta’s picture

We may be interested in this within the farmOS distribution also. We make heavy use of tabs (both primary and secondary), and we have a lot of users on mobile. We use Gin (which inherits the secondary tab styling/behavior from Claro).

I'm curious if there is a mechanism we could use to try collapsing our secondary tabs? I'm not familiar with how this behavior gets applied to the primary tabs currently. If I find any more information I will share it here.

m.stenta’s picture

StatusFileSize
new24.03 KB

We came up with our own solution in farmOS, which basically overrides the templates and CSS to make the secondary tabs collapse in the same way that the primary ones do. Screenshot attached. (Note that we are using the Gin theme, which inherits the tab behavior from Claro).

Would this be worth pursuing as a core enhancement?

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

hille made their first commit to this issue’s fork.

hille’s picture

Status: Active » Needs review

I have changed the behaviour of the secondary tabs to be more useable with small displays.
Its basically the same as the primary tabs.

Moni_10’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new39.52 KB
new60.9 KB

Hii I've tested the above MR. Seems working fine for me. So, Moving this to RTBC
Here's before and after screenshot.

luenemann’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs subsystem maintainer review, +Needs issue summary update

The current approach of MR !4262 always collapses when the secondary tabs overflow. The proposed solution is different.

Set to Needs work (NW) for Issue summary update (IS update).

I think a claro maintainer should have a look at the proposed solution.

nayana_mvr made their first commit to this issue’s fork.

nayana_mvr’s picture

Pipeline was not shown in the Merge Request and there was an option to create pipeline. After clicking that, the .gitlab-ci.yml file changes got committed to the MR. Not sure why that happened and why that file was missing in the first place. I tried creating a new branch but that also doesn't have .gitlab-ci.yml. Can somebody please look into it? Sorry for the inconvenience caused.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Claro theme was approved for removal in #3576460: [policy, no patch] Deprecate and remove Claro.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3576668: [meta] Tasks to deprecate Claro and the removal work in #3584638: [meta] Tasks to remove the Claro theme.

smustgrave’s picture

Project: Drupal core » Claro
Version: main » 3.0.x-dev
Component: Claro theme » Code
Status: Postponed » Needs work

Claro has moved to contrib