angular / angular/components

feat(Tabs): Extend Tabs customization in the mat-tab-header

Ouverte
#27,238 3 commentaires 10 réactions 0 personnes assignées Voir sur GitHub
area: material/tabs feature
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### Feature Description

Currently, the mat tab component does not have any way to customize the contents of the `mat-tab-header` except for `mat-tab`. And there is no way to add a custom ng-content since mat-tab-header is not accessible like mat-tab-group or mat-tab.
I would like to customize mat-tab-header (which is only a viewable element in devtools and not accessible to the developer) so that I can extend the ui to look like a firefox or chrome browser tab area.
![image](https://github.com/angular/components/assets/53593899/b7b6f98a-46a4-420f-8319-2e2cc36179e3)
As you can see in the tab area of a browser, there is obviously tabs but also buttons at the sides. For example, for chrome, there is tabs sections, the plus button, and then outside of the tabs section the dropdown menu and the minimize/max and close buttons.

Another example is https://www.telerik.com/products/winforms/tabbedform.aspx under the Overview section or https://docs.devexpress.com/WindowsForms/115183/controls-and-libraries/forms-and-user-controls/tabbed-form

Currently the tab component looks like the top section of the below picture:
![image](https://github.com/angular/components/assets/53593899/08efca13-d627-4636-a45a-01002c456fc4)
I'd like to be able to put components like buttons or dropdown menu in the tab component but outside of the pagination buttons (as shown in the bottom section of the above picture)

### Use Case

Case: I would like to be able to add a button to view all the tabs in a vertical scroll down style like chrome's dropdown menu button beside the minimize button on the right. Maybe expand it even more by adding other buttons to close all tabs or other functionalities. (basically make it look like the pictures/links mentioned under the 'feature description section of this feature request.)

Currently, the workaround would be to add dropdown menu as a tab item. this is not preferred as when there is paging, that dropdown menu tab item will move as well. And it will behave like a tab item instead of a button.
In addition, the dropdown button in the tab item will also be between the two pagination buttons when it should not as the dropdown button should be stationary independent from the tab section+paging.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par lire les composants existants mat-tab-header, mat-tab et mat-tab-group afin de comprendre comment l’en-tête et la pagination sont composés. Déterminez une API permettant de placer des boutons personnalisés ou tout autre contenu en dehors des éléments d’onglet paginés, puis vérifiez que le contenu ajouté reste fixe lorsque les onglets sont parcourus par pagination et que les contrôles demandés de type navigateur peuvent y être hébergés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.