patternfly / patternfly/patternfly-react
ToolbarItem - expand-all variant should include expand all icon
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 862
- Forks
- 392
- Merge moyen
- 4 j 8 h
- PR mergées (30 j)
- 9
Description
re: https://github.com/patternfly/patternfly-react/pull/9605/files
The expand all icon is currently something the user passes, but for us to mirror it automatically in RTL in the CSS, our component should be updated to include it for the user. This button is primarily for an expandable data-list and table, and the expand toggles in those components supply the icon, so the toolbar probably should, too, and would provide consistency in the icons used. We could probably do it a couple of ways:
- Keep everything the way it is now, but update
<ToolbarExpandIconWrapper>to include the icon for the user. And rename it to<ToolbarExpandAllIcon>? That aligns with the core class. IMO that should be updated whether we use it as a wrapper or not. - Update
<ToolbarItem variant="expand-all">to bundle the 1) toggle button, 2)<ToolbarExpandIconWrapper>/<ToolbarExpandAllIcon>, and 3) the icon. Chatting with @thatblindgeye, we could also allow tooltip props in case someone wants a tooltip for the button.
As far as I can tell, the data list and table do not allow the user to pass their own icon to the expandable toggle, so I don't know that we need to allow for that in the toolbar, either? If we do, there is a question of whether it should go in <ToolbarExpandIconWrapper>/<ToolbarExpandAllIcon> or not, which will rotate (when expanded) and mirror (in RTL) the icon the user passes.
My vote would be for the second option.
Jira Issue: PF-118
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner la variante expand-all de ToolbarItem et l’implémentation de ToolbarExpandIconWrapper, puis comparez-les avec les toggles extensibles des composants data-list et table. Déterminez quelle API proposée utiliser et vérifiez que l’icône obtenue est cohérente dans les états étendu et RTL.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100